Advertisement
musifter

AoC day 18 (lex file)

Dec 18th, 2020
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. %{
  2. #include <stdlib.h>
  3. #include "part1.tab.h"
  4.  
  5. #define YYSTYPE long long
  6. %}
  7. %%
  8.  
  9. [0-9]+ { yylval = atoi( yytext ); return (INT); }
  10. [+*()] { return (yytext[0]); }
  11. [\n] { return (EOL); }
  12. [ \t]+ ;
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement