Commit bd11337f authored by Jayke Meijer's avatar Jayke Meijer

Added passing of yyval to lex file.

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