Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix all issues with the extended tests. I.e. replace various placeholder data with the real thing. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | pt-bug-7665c3532c-epsilon |
Files: | files | file ages | folders |
SHA1: |
66707cafa95af89e52d1e686808b2089 |
User & Date: | aku 2014-01-22 08:45:38.824 |
Context
2014-01-22
| ||
09:01 | Bumped versions of the modified packages. Updated ChangeLog. Closed-Leaf check-in: 8c541ca76f user: aku tags: pt-bug-7665c3532c-epsilon | |
08:45 | Fix all issues with the extended tests. I.e. replace various placeholder data with the real thing. check-in: 66707cafa9 user: aku tags: pt-bug-7665c3532c-epsilon | |
2014-01-21
| ||
22:52 | Ticket [7665c3532c]. Matching the empty string, i.e. epsilon. Extended the Literal command in the AST traversal part of the PEG importer to recognize the empty string and generate the proper PE (i.e. epsilon). Extended the Convert command of the PEG exporter to properly convert epsilon into an empty string. Extended testsuite. (Not fully tested yet) check-in: bce28f8438 user: andreask tags: pt-bug-7665c3532c-epsilon | |
Changes
Changes to modules/pt/tests/data/ok/peg_cparam-critcl/11_epsilon.
︙ | ︙ | |||
1680 1681 1682 1683 1684 1685 1686 | critcl::ccode { /* -*- c -*- */ /* * Declaring the parse functions */ | | | 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 | critcl::ccode { /* -*- c -*- */ /* * Declaring the parse functions */ static void choice_3 (RDE_PARAM p); /* * Precomputed table of strings (symbols, error messages, etc.). */ static char const* p_string [1] = { |
︙ | ︙ |
Changes to modules/pt/tests/data/ok/peg_cparam/11_epsilon.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | /* * -*- tcl -*- * Parsing Expression Grammar 'TEMPLATE'. * Generated for unknown, from file 'TEST' */ /* * Declaring the parse functions */ /* * Precomputed table of strings (symbols, error messages, etc.). */ static char const* <<string-table>> [1] = { | > | > > > > > > > > > > > > | > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | /* * -*- tcl -*- * Parsing Expression Grammar 'TEMPLATE'. * Generated for unknown, from file 'TEST' */ /* * Declaring the parse functions */ <<attributes>> void <<ns>>choice_3 (<<STATE>> <<state>>); /* * Precomputed table of strings (symbols, error messages, etc.). */ static char const* <<string-table>> [1] = { /* 0 = */ "t a" }; /* * Grammar Start Expression */ <<attributes>> void <<ns>><<main>> (<<STATE>> <<state>>) { <<prelude>> <<self>> <<ns>>choice_3 (<<state>>); return; } <<attributes>> void <<ns>>choice_3 (<<STATE>> <<state>>) { <<prelude>> /* * / * 'a' * <epsilon> */ rde_param_i_state_push_void (<<state>>); rde_param_i_next_char (<<state>>, "a", 0); if (rde_param_i_bra_void2void(<<state>>)) return; rde_param_i_status_ok (<<state>>); rde_param_i_state_merge_void (<<state>>); return; } /* */ |
Changes to modules/pt/tests/data/ok/peg_param-compact/11_epsilon.
1 2 3 4 5 6 7 8 9 | # -*- text -*- # Parsing Expression Grammar 'TEMPLATE'. # Generated for unknown, from file 'TEST' # # Grammar Start Expression # <<MAIN>>: | | | | < | < | < < < < < < < < | | < < < < < < < < < < < < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | # -*- text -*- # Parsing Expression Grammar 'TEMPLATE'. # Generated for unknown, from file 'TEST' # # Grammar Start Expression # <<MAIN>>: call choice_5 halt choice_5: # / # 'a' # <epsilon> error_clear loc_push error_push call char_1 error_pop_merge ok! jump oknoast_4 loc_pop_rewind loc_push error_push status_ok error_pop_merge ok! jump oknoast_4 loc_pop_rewind status_fail return oknoast_4: loc_pop_discard return char_1: # 'a' input_next "t a" ok! test_char "a" return # # |
Changes to modules/pt/tests/data/ok/peg_param-inlined/11_epsilon.
1 2 3 4 5 6 7 8 9 | # -*- text -*- # Parsing Expression Grammar 'TEMPLATE'. # Generated for unknown, from file 'TEST' # # Grammar Start Expression # <<MAIN>>: | | | | < | < < | < < < < < < < < < | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | # -*- text -*- # Parsing Expression Grammar 'TEMPLATE'. # Generated for unknown, from file 'TEST' # # Grammar Start Expression # <<MAIN>>: call choice_4 halt choice_4: # / # 'a' # <epsilon> error_clear loc_push error_push input_next "t a" ok! test_char "a" error_pop_merge ok! jump oknoast_3 loc_pop_rewind loc_push error_push status_ok error_pop_merge ok! jump oknoast_3 loc_pop_rewind status_fail return oknoast_3: loc_pop_discard return # # |
Changes to modules/pt/tests/data/ok/peg_param-unopt/11_epsilon.
1 2 3 4 5 6 7 8 9 | # -*- text -*- # Parsing Expression Grammar 'TEMPLATE'. # Generated for unknown, from file 'TEST' # # Grammar Start Expression # <<MAIN>>: | | | | < | < | < < < < < < < < | | < < < < < < < < < < < < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | # -*- text -*- # Parsing Expression Grammar 'TEMPLATE'. # Generated for unknown, from file 'TEST' # # Grammar Start Expression # <<MAIN>>: call choice_5 halt choice_5: # / # 'a' # <epsilon> error_clear loc_push error_push call char_1 error_pop_merge ok! jump oknoast_4 loc_pop_rewind loc_push error_push status_ok error_pop_merge ok! jump oknoast_4 loc_pop_rewind status_fail return oknoast_4: loc_pop_discard return char_1: # 'a' input_next "t a" ok! test_char "a" return # # |
Changes to modules/pt/tests/data/ok/peg_param/11_epsilon.
1 2 3 4 5 6 7 8 9 | # -*- text -*- # Parsing Expression Grammar 'TEMPLATE'. # Generated for unknown, from file 'TEST' # # Grammar Start Expression # <<MAIN>>: | | | | < | < < | < < < < < < < < < | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | # -*- text -*- # Parsing Expression Grammar 'TEMPLATE'. # Generated for unknown, from file 'TEST' # # Grammar Start Expression # <<MAIN>>: call choice_4 halt choice_4: # / # 'a' # <epsilon> error_clear loc_push error_push input_next "t a" ok! test_char "a" error_pop_merge ok! jump oknoast_3 loc_pop_rewind loc_push error_push status_ok error_pop_merge ok! jump oknoast_3 loc_pop_rewind status_fail return oknoast_3: loc_pop_discard return # # |
Changes to modules/pt/tests/data/ok/peg_peg-ast-fused/11_epsilon.
|
| | | | | | | | | < < < < < < < < < < | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | <Grammar> :: 0 32 <Header> :: 0 27 <Identifier> :: 4 16 <Ident> :: 4 15 <StartExpr> :: 17 27 <Expression> :: 18 25 <Sequence> :: 18 21 <Prefix> :: 18 21 <Suffix> :: 18 21 <Primary> :: 18 21 <Literal> :: 18 21 <Char> :: 19 19 <CharUnescaped> :: 19 19 <Sequence> :: 24 25 <Prefix> :: 24 25 <Suffix> :: 24 25 <Primary> :: 24 25 <Literal> :: 24 25 |
Changes to modules/pt/tests/data/ok/peg_peg-ast-templated-fused/11_epsilon.
|
| | | | | | | | | | | < < < < < < < < < < | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | <Grammar> :: 0 132 <Header> :: 99 122 <Identifier> :: 103 111 <Ident> :: 103 110 <StartExpr> :: 112 122 <Expression> :: 113 120 <Sequence> :: 113 116 <Prefix> :: 113 116 <Suffix> :: 113 116 <Primary> :: 113 116 <Literal> :: 113 116 <Char> :: 114 114 <CharUnescaped> :: 114 114 <Sequence> :: 119 120 <Prefix> :: 119 120 <Suffix> :: 119 120 <Primary> :: 119 120 <Literal> :: 119 120 |
Changes to modules/pt/tests/data/ok/peg_peg-ast-templated/11_epsilon.
|
| | | | | | | | | | | < < < < < < < < < < | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | <Grammar> :: 0 132 <Header> :: 99 122 <Identifier> :: 103 111 <Ident> :: 103 110 <StartExpr> :: 112 122 <Expression> :: 113 120 <Sequence> :: 113 116 <Prefix> :: 113 116 <Suffix> :: 113 116 <Primary> :: 113 116 <Literal> :: 113 116 <Char> :: 114 114 <CharUnescaped> :: 114 114 <Sequence> :: 119 120 <Prefix> :: 119 120 <Suffix> :: 119 120 <Primary> :: 119 120 <Literal> :: 119 120 |
Changes to modules/pt/tests/data/ok/peg_peg-ast/11_epsilon.
|
| | | | | | | | | < < < < < < < < < < | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | <Grammar> :: 0 32 <Header> :: 0 27 <Identifier> :: 4 16 <Ident> :: 4 15 <StartExpr> :: 17 27 <Expression> :: 18 25 <Sequence> :: 18 21 <Prefix> :: 18 21 <Suffix> :: 18 21 <Primary> :: 18 21 <Literal> :: 18 21 <Char> :: 19 19 <CharUnescaped> :: 19 19 <Sequence> :: 24 25 <Prefix> :: 24 25 <Suffix> :: 24 25 <Primary> :: 24 25 <Literal> :: 24 25 |
Changes to modules/pt/tests/data/ok/peg_peg/11_epsilon.
|
| | | 1 2 | PEG a_pe_grammar ('a' / '') END; |
Changes to modules/pt/tests/data/ok/peg_serial-print/11_epsilon.
1 2 3 | pt::grammar::peg start := / 'a' | | | 1 2 3 4 5 | pt::grammar::peg start := / 'a' <epsilon> rules |
Changes to modules/pt/tests/data/ok/peg_tclparam-snit/11_epsilon.
︙ | ︙ | |||
60 61 62 63 64 65 66 | ## BEGIN of GENERATED CODE. DO NOT EDIT. # # Grammar Start Expression # proc MAIN {} { upvar 1 myparser myparser | > > > > > > > > > > | > > > | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | ## BEGIN of GENERATED CODE. DO NOT EDIT. # # Grammar Start Expression # proc MAIN {} { upvar 1 myparser myparser choice_3 return } proc choice_3 {} { upvar 1 myparser myparser # / # 'a' # <epsilon> $myparser si:void_state_push $myparser si:next_char a $myparser si:voidvoid_branch $myparser i_status_ok $myparser si:void_state_merge return } ## END of GENERATED CODE. DO NOT EDIT. # # ## ### ###### ######## ############# } |
︙ | ︙ |
Changes to modules/pt/tests/data/ok/peg_tclparam-tcloo/0_basic_arithmetic.
︙ | ︙ | |||
32 33 34 35 36 37 38 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { my reset {} my data $text my MAIN ; # Entrypoint for the generated code. return [my complete] } # # ## ### ###### ######## ############# ## BEGIN of GENERATED CODE. DO NOT EDIT. |
︙ | ︙ |
Changes to modules/pt/tests/data/ok/peg_tclparam-tcloo/10_notahead.
︙ | ︙ | |||
32 33 34 35 36 37 38 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { my reset {} my data $text my MAIN ; # Entrypoint for the generated code. return [my complete] } # # ## ### ###### ######## ############# ## BEGIN of GENERATED CODE. DO NOT EDIT. |
︙ | ︙ |
Changes to modules/pt/tests/data/ok/peg_tclparam-tcloo/11_epsilon.
︙ | ︙ | |||
32 33 34 35 36 37 38 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { | | > > > > > > > > > > | > > > | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { my reset {} my data $text my MAIN ; # Entrypoint for the generated code. return [my complete] } # # ## ### ###### ######## ############# ## BEGIN of GENERATED CODE. DO NOT EDIT. # # Grammar Start Expression # method MAIN {} { my choice_3 return } method choice_3 {} { # / # 'a' # <epsilon> my si:void_state_push my si:next_char a my si:voidvoid_branch my i_status_ok my si:void_state_merge return } ## END of GENERATED CODE. DO NOT EDIT. # # ## ### ###### ######## ############# } |
︙ | ︙ |
Changes to modules/pt/tests/data/ok/peg_tclparam-tcloo/1_functions.
︙ | ︙ | |||
32 33 34 35 36 37 38 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { my reset {} my data $text my MAIN ; # Entrypoint for the generated code. return [my complete] } # # ## ### ###### ######## ############# ## BEGIN of GENERATED CODE. DO NOT EDIT. |
︙ | ︙ |
Changes to modules/pt/tests/data/ok/peg_tclparam-tcloo/2_fun_arithmetic.
︙ | ︙ | |||
32 33 34 35 36 37 38 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { my reset {} my data $text my MAIN ; # Entrypoint for the generated code. return [my complete] } # # ## ### ###### ######## ############# ## BEGIN of GENERATED CODE. DO NOT EDIT. |
︙ | ︙ |
Changes to modules/pt/tests/data/ok/peg_tclparam-tcloo/3_peg_itself.
︙ | ︙ | |||
32 33 34 35 36 37 38 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { my reset {} my data $text my MAIN ; # Entrypoint for the generated code. return [my complete] } # # ## ### ###### ######## ############# ## BEGIN of GENERATED CODE. DO NOT EDIT. |
︙ | ︙ |
Changes to modules/pt/tests/data/ok/peg_tclparam-tcloo/4_choice.
︙ | ︙ | |||
32 33 34 35 36 37 38 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { my reset {} my data $text my MAIN ; # Entrypoint for the generated code. return [my complete] } # # ## ### ###### ######## ############# ## BEGIN of GENERATED CODE. DO NOT EDIT. |
︙ | ︙ |
Changes to modules/pt/tests/data/ok/peg_tclparam-tcloo/5_sequence.
︙ | ︙ | |||
32 33 34 35 36 37 38 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { my reset {} my data $text my MAIN ; # Entrypoint for the generated code. return [my complete] } # # ## ### ###### ######## ############# ## BEGIN of GENERATED CODE. DO NOT EDIT. |
︙ | ︙ |
Changes to modules/pt/tests/data/ok/peg_tclparam-tcloo/6_optional.
︙ | ︙ | |||
32 33 34 35 36 37 38 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { my reset {} my data $text my MAIN ; # Entrypoint for the generated code. return [my complete] } # # ## ### ###### ######## ############# ## BEGIN of GENERATED CODE. DO NOT EDIT. |
︙ | ︙ |
Changes to modules/pt/tests/data/ok/peg_tclparam-tcloo/7_kleene.
︙ | ︙ | |||
32 33 34 35 36 37 38 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { my reset {} my data $text my MAIN ; # Entrypoint for the generated code. return [my complete] } # # ## ### ###### ######## ############# ## BEGIN of GENERATED CODE. DO NOT EDIT. |
︙ | ︙ |
Changes to modules/pt/tests/data/ok/peg_tclparam-tcloo/8_pkleene.
︙ | ︙ | |||
32 33 34 35 36 37 38 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { my reset {} my data $text my MAIN ; # Entrypoint for the generated code. return [my complete] } # # ## ### ###### ######## ############# ## BEGIN of GENERATED CODE. DO NOT EDIT. |
︙ | ︙ |
Changes to modules/pt/tests/data/ok/peg_tclparam-tcloo/9_ahead.
︙ | ︙ | |||
32 33 34 35 36 37 38 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | method parse {channel} { my reset $channel my MAIN ; # Entrypoint for the generated code. return [my complete] } method parset {text} { my reset {} my data $text my MAIN ; # Entrypoint for the generated code. return [my complete] } # # ## ### ###### ######## ############# ## BEGIN of GENERATED CODE. DO NOT EDIT. |
︙ | ︙ |
Changes to modules/pt/tests/data/ok/peg_tclparam/11_epsilon.
1 2 3 4 5 6 7 8 9 | # -*- tcl -*- # Parsing Expression Grammar 'TEMPLATE'. # Generated for unknown, from file 'TEST' # # Grammar Start Expression # <<def>> <<ns>><<main>> {} { | > > > > > > > > > > | > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # -*- tcl -*- # Parsing Expression Grammar 'TEMPLATE'. # Generated for unknown, from file 'TEST' # # Grammar Start Expression # <<def>> <<ns>><<main>> {} { <<self>> choice_3 return } <<def>> <<ns>>choice_3 {} { # / # 'a' # <epsilon> <<runtime>> si:void_state_push <<runtime>> si:next_char a <<runtime>> si:voidvoid_branch <<runtime>> i_status_ok <<runtime>> si:void_state_merge return } # # |