Skip to content
Snippets Groups Projects
Commit bd11337f authored by Jayke Meijer's avatar Jayke Meijer
Browse files

Added passing of yyval to lex file.

parent 9c4e30ea
No related branches found
No related tags found
No related merge requests found
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
%% %%
[a-z0-9$._]+: { return LABEL; } /* Label */ [a-z0-9$._]+: { yylval = yytext; return LABEL; } /* Label */
\$[a-z0-9._] { return ARG; } /* Argument of instruction */ \$[a-z0-9._] { yylval = yytext; return ARG; } /* Arg of instr */
^[a-z.]+ { return INSTR; } /* Instruction */ ^[a-z.]+ { yylval = yytext; return INSTR; } /* Instruction */
\.[^\n]* { return DIRECTIVE; } /* Assembly */ \.[^\n]* { yylval = yytext; return DIRECTIVE; } /* Assembly */
\, { return COMMA; } /* Comma */ \, { yylval = yytext; return COMMA; } /* Comma */
#[^\n]* { return COMMENT; } /* Comment */ #[^\n]* { yylval = yytext; return COMMENT; } /* Comment */
\n { return NL; } /* New line */ \n { yylval = yytext; return NL; } /* New line */
[\s\t]+ {;} [\s\t]+ { ; } /* Ignore whitespace */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment