Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %{
- #include "yacc_parser.hh"
- %}
- %%
- if return IF;
- ei return ELSEIF;
- else return ELSE;
- endif return ENDIF;
- while return WHILE;
- loop return LOOP;
- func return FUNC;
- end return END;
- := return ASSIGN;
- \. return DOT;
- , return COMMA;
- : return COLON;
- \( return OPAREN;
- \) return CPAREN;
- (\n|\r\n?) { /* increment line count */ return LF; }
- ; return LF;
- [!?A-Za-z][!?A-Za-z0-9] { yylval.str = yytext; return NAME; }
- [0-9]+ { yylval.str = yytext; return INTEGER; }
- %%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement