diff options
author | Bobby Bingham <koorogi@koorogi.info> | 2017-01-18 19:20:20 -0600 |
---|---|---|
committer | Bobby Bingham <koorogi@koorogi.info> | 2017-01-18 19:20:20 -0600 |
commit | 1e0d0202e614f398f491624c84ae9a8309fa2f96 (patch) | |
tree | 1000df0a8eb39453ac48a14809dd250230f67e6c /lexer.l | |
parent | 2e0de3cc53d031ac2fa48eddc9a472b0e4c34a45 (diff) |
nqasm: allow "." to refer to current pc in immediate operand
Diffstat (limited to 'lexer.l')
-rw-r--r-- | lexer.l | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -74,6 +74,7 @@ HEX [0-9a-f] <inst>addpc/{EOI} { BEGIN(args); return T_ADDPC; } <inst>nop/{EOI} { BEGIN(args); return T_NOP; } +<args>\. { return T_DOT; } <args>@ { return T_DEREF; } <args>[-+]?{DEC}+ { return intlit(yytext, 10, &yylval.lval); } <args>0x{HEX}+ { return intlit(yytext+2, 16, &yylval.lval); } |