diff options
Diffstat (limited to 'src/host-js/rlparse.lm')
-rw-r--r-- | src/host-js/rlparse.lm | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/host-js/rlparse.lm b/src/host-js/rlparse.lm index 100a9223..163f44f9 100644 --- a/src/host-js/rlparse.lm +++ b/src/host-js/rlparse.lm @@ -1,6 +1,32 @@ include 'ragel.lm' include 'rlreduce.lm' +rl ident + /( alpha | '_' ) ( alpha | digit | '_' )*/ + +rl number + / digit+ / + +rl hex_number + / '0x' [0-9a-fA-F]+ / + +rl hex_char + / '0x' [0-9a-fA-F]{2} / + +rl NL / '\n' / + +rl c_comment + / '/*' ( any | NL )* :>> '*/' / + +rl cpp_comment + / '//' [^\n]* NL / + +rl s_literal + / "'" ([^'\\\n] | '\\' (any | NL))* "'" / + +rl d_literal + / '"' ([^"\\] | NL | '\\' (any | NL))* '"' / + namespace inline lex literal `fpc `fc `fcurs `ftargs @@ -44,7 +70,6 @@ namespace inline token c_any / any / end - end namespace host |