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

added Lex file.

parent 52c837f7
No related branches found
No related tags found
No related merge requests found
%{
#include <stdio.h>
#include "y.tab.h"
%}
%%
[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 */
[\s\t]+ {;}
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