Commit 8b0c5d11 authored by Jayke Meijer's avatar Jayke Meijer

added Lex file.

parent 52c837f7
%{
#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]+ {;}
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