diff options
author | Adrian Thurston <thurston@colm.net> | 2021-12-26 21:58:54 +0000 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2021-12-26 21:58:54 +0000 |
commit | 5c753b030ab6b9435755d0fb538c0a6cca37923c (patch) | |
tree | c4b9ff3c594bf3034ca87b02b748a1eb7e0a616f | |
parent | 8db7079040e96058678e3b7efba29a2565152654 (diff) | |
download | ragel-5c753b030ab6b9435755d0fb538c0a6cca37923c.tar.gz |
need to add regular language definitions to trans.lm, removed from ragel.lm
-rw-r--r-- | test/ragel.d/trans.lm | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/ragel.d/trans.lm b/test/ragel.d/trans.lm index 660f94b8..b2897c0e 100644 --- a/test/ragel.d/trans.lm +++ b/test/ragel.d/trans.lm @@ -1,5 +1,37 @@ include 'ragel.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 ruby_comment + / '#' [^\n]* NL / + +rl s_literal + / "'" ([^'\\\n] | '\\' (any | NL))* "'" / + +rl d_literal + / '"' ([^"\\] | NL | '\\' (any | NL))* '"' / + +rl host_re_literal + / '/' ([^/\\] | NL | '\\' (any | NL))* '/' / + namespace inline lex literal `fpc `fc `fcurs `ftargs |