diff options
Diffstat (limited to 'test/construct1.lm')
-rw-r--r-- | test/construct1.lm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/construct1.lm b/test/construct1.lm new file mode 100644 index 0000000..ee9b36b --- /dev/null +++ b/test/construct1.lm @@ -0,0 +1,19 @@ +##### LM ##### +rl ident_pattern /[a-zA-Z_][a-zA-Z_0-9]*/ +rl number_pattern /[0-9]+/ + +lex + ignore /[ \t\n]+/ + token id /ident_pattern/ + token number /number_pattern/ +end + +def four_ids + [id id id id] + +Constructed: four_ids = construct four_ids "a b c d" +print_xml( Constructed ) +print( '\n' ) + +##### EXP ##### +<four_ids><id>a</id><id>b</id><id>c</id><id>d</id></four_ids> |