Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMC-SOG
PN-Parser
Commits
fd6e25ff
Commit
fd6e25ff
authored
Oct 14, 2018
by
Jaime Arias
Browse files
Add lexer file
parent
25aa1f98
Changes
1
Show whitespace changes
Inline
Side-by-side
src/RdPMonteur.l
0 → 100644
View file @
fd6e25ff
%{
/************* INCLUDES AND EXTERNALS *************************************/
#include <stdio.h>
#include <string.h>
#include "RdPMonteur.tab.h"
%}
%%
"(" { return('('); }
")" { return(')'); }
"{" { return('{'); }
"}" { return('}'); }
":" { return(':'); }
";" { return(';'); }
"<."[ ]*".>" { return(TOKEN);}
"<." { return('['); }
".>" { return(']'); }
"<" { return(INHIBITOR); }
"#trans" { return(TRANS);}
"#place" { return(PLACE);}
"#queue" { return(QUEUE);}
"#endtr" { return(ENDTR);}
"reset" { return(RESET);}
"loss" { return(LOSS);}
mk/[ ]*"(" { return(MK);}
cp/[ ]*"(" { return(CP);}
^in { return(IN);}
^out { return(OUT);}
[0-9]+ { sscanf(yytext,"%d",&yylval.i); return(ENTIER);}
[a-zA-Z_][a-zA-Z0-9_]* { yylval.s=strdup(yytext); return(VARIABLE);}
[ \t\n] {}
%%
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment