1## -*- tcl -*- 2## 3## NX-based Tcl/PARAM implementation of the parsing 4## expression grammar 5## 6## TEMPLATE 7## 8## Generated from file TEST 9## for user unknown 10## 11# # ## ### ##### ######## ############# ##################### 12## Requirements 13 14package require Tcl 8.5 15package require nx 16package require pt::rde::nx ; # NX-based implementation of the 17 # PARAM virtual machine 18 # underlying the Tcl/PARAM code 19 # used below. 20 21# # ## ### ##### ######## ############# ##################### 22## 23 24nx::Class create PARSER -superclasses pt::rde::nx { 25 # # ## ### ##### ######## ############# 26 ## Public API 27 28 :public method parse {channel} { 29 :reset $channel 30 :MAIN ; # Entrypoint for the generated code. 31 return [:complete] 32 } 33 34 :public method parset {text} { 35 :reset {} 36 :data $text 37 :MAIN ; # Entrypoint for the generated code. 38 return [:complete] 39 } 40 41 # # ## ### ###### ######## ############# 42 ## BEGIN of GENERATED CODE. DO NOT EDIT. 43 44 # 45 # Grammar Start Expression 46 # 47 48 :method MAIN {} { 49 : sym_TEST 50 return 51 } 52 53 # 54 # value Symbol 'TEST' 55 # 56 57 :method sym_TEST {} { 58 # x 59 # ! 60 # 'a' 61 # (IDENTIFIER) 62 63 : si:void_symbol_start TEST 64 : sequence_6 65 : si:void_leaf_symbol_end TEST 66 return 67 } 68 69 :method sequence_6 {} { 70 # x 71 # ! 72 # 'a' 73 # (IDENTIFIER) 74 75 : si:void_state_push 76 : notahead_3 77 : si:voidvoid_part 78 : i_status_fail ; # Undefined symbol 'IDENTIFIER' 79 : si:void_state_merge 80 return 81 } 82 83 :method notahead_3 {} { 84 # ! 85 # 'a' 86 87 : i_loc_push 88 : si:next_char a 89 : si:void_notahead_exit 90 return 91 } 92 93 ## END of GENERATED CODE. DO NOT EDIT. 94 # # ## ### ###### ######## ############# 95} 96 97# # ## ### ##### ######## ############# ##################### 98## Ready 99 100package provide NX_PACKAGE 1 101return 102