diff options
Diffstat (limited to 'asm.peg')
| -rw-r--r-- | asm.peg | 33 |
1 files changed, 16 insertions, 17 deletions
@@ -5,13 +5,10 @@ line = | . { yy->v.kind = ASM_SYNTAX_ERROR; } ws = ([ \t]+ | comment)+ - comment = "/*" ( ! "\n" ! "*/" . )* "*/" # No support for multiline comments for now as they break our line numbers. - eolcomment = '#' (! "\n" .)+ eol = ws? eolcomment? "\n" - stmt = '.' d:directive eol {$$ = d;} | i:instr eol { $$ = i; } @@ -172,20 +169,22 @@ condition-code = | "pe" { $$.i64 = 3; } | "p" { $$.i64 = 4; } | "o" { $$.i64 = 5; } - | "nz" { $$.i64 = 6; } - | "ns" { $$.i64 = 7; } - | "np" { $$.i64 = 8; } - | "no" { $$.i64 = 9; } - | "nle" { $$.i64 = 10; } - | "nl" { $$.i64 = 11; } - | "nge" { $$.i64 = 12; } - | "ng" { $$.i64 = 13; } - | "ne" { $$.i64 = 14; } - | "nc" { $$.i64 = 15; } - | "nbe" { $$.i64 = 16; } - | "nb" { $$.i64 = 17; } - | "nae" { $$.i64 = 18; } - | "na" { $$.i64 = 19; } + | ("n" + ( + "z" { $$.i64 = 6; } + | "s" { $$.i64 = 7; } + | "p" { $$.i64 = 8; } + | "o" { $$.i64 = 9; } + | "le" { $$.i64 = 10; } + | "l" { $$.i64 = 11; } + | "ge" { $$.i64 = 12; } + | "g" { $$.i64 = 13; } + | "e" { $$.i64 = 14; } + | "c" { $$.i64 = 15; } + | "be" { $$.i64 = 16; } + | "b" { $$.i64 = 17; } + | "ae" { $$.i64 = 18; } + | "a" { $$.i64 = 19; })) | "le" { $$.i64 = 20; } | "l" { $$.i64 = 21; } | "ge" { $$.i64 = 22; } |
