Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %{
- #include <stdio.h>
- #include "y.tab.h"
- #include <string.h>
- %}
- %%
- "var"|"int" {return TIP;}
- "fct_begin" {return BGINF;}
- "fct_end" {return ENDF;}
- "=" {return EGAL;}
- "+" {return PLUS;}
- "-" {return MINUS;}
- "*" {return INM;}
- "/" {return IMP;}
- "mod" {return MOD;}
- "print" {return PRINT;}
- [_a-zA-Z][_a-zA-Z0-9]* {return ID;}
- "-"?[1-9][0-9]* {return NR;}
- [ \t] ;
- \n {yylineno++;}
- . {return yytext[0];}
Add Comment
Please, Sign In to add comment