diff options
author | Jinkun Jang <jinkun.jang@samsung.com> | 2013-03-13 01:44:50 +0900 |
---|---|---|
committer | Jinkun Jang <jinkun.jang@samsung.com> | 2013-03-13 01:44:50 +0900 |
commit | 7e13e5fc62b81ffc5728006ddb560478ac3f1576 (patch) | |
tree | 813d127306e4518e2ab20cf03f7dea33d14a4210 /test/testcase.txl | |
parent | 12056158053532946b53b6249cb0e6cfd4580051 (diff) | |
download | ragel-7e13e5fc62b81ffc5728006ddb560478ac3f1576.tar.gz ragel-7e13e5fc62b81ffc5728006ddb560478ac3f1576.tar.bz2 ragel-7e13e5fc62b81ffc5728006ddb560478ac3f1576.zip |
Tizen 2.1 base
Diffstat (limited to 'test/testcase.txl')
-rw-r--r-- | test/testcase.txl | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/test/testcase.txl b/test/testcase.txl index cd02bb8..3369c15 100644 --- a/test/testcase.txl +++ b/test/testcase.txl @@ -15,8 +15,10 @@ end compounds keys 'int 'bool 'true 'false 'char 'ptr - 'if 'else 'printi 'prints + 'if 'else 'printi 'prints 'printb 'print_token 'fc 'fpc 'fbreak 'fgoto 'fcall 'fret 'fhold 'fexec + 'machine 'alphtype 'action + 'first_token_char end keys define lang_indep @@ -38,6 +40,7 @@ end define define statement [machine_stmt] + | [alphtype_stmt] | [action_stmt] | [cond_action_stmt] | [machine_def] @@ -48,6 +51,10 @@ define machine_stmt 'machine [id] '; [NL] end define +define alphtype_stmt + 'alphtype [repeat id] '; [NL] +end define + define action_stmt 'action [id] [al_host_block] end define @@ -71,10 +78,11 @@ end define define al_print_stmt [print_cmd] [al_expr] '; [NL] + | 'print_token '; [NL] end define define print_cmd - 'printi | 'prints + 'printi | 'prints | 'printb end define define al_variable_decl @@ -102,18 +110,24 @@ define al_expr_extend end define define al_expr_op - '= | '+ | '- | '* | '/ | '== | '<= | '>= + '= | '+ | '- | '* | '/ | '== | '<= | '>= | '< | '> end define define al_term + [al_term_base] [opt union] +end define + +define al_term_base [id] + | [SPOFF] [id] '( [SPON] [al_expr] ') | [opt al_sign] [number] - | [stringlit] - | [charlit] + | [stringlit] + | [charlit] | 'fc | 'true | 'false | '( [al_expr] ') + | 'first_token_char end define define al_sign |