1## -*- tcl -*- 2## 3## Snit-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 snit 16package require pt::rde ; # Implementation of the PARAM 17 # virtual machine underlying the 18 # Tcl/PARAM code used below. 19 20# # ## ### ##### ######## ############# ##################### 21## 22 23snit::type ::PARSER { 24 # # ## ### ##### ######## ############# 25 ## Public API 26 27 constructor {} { 28 # Create the runtime supporting the parsing process. 29 set myparser [pt::rde ${selfns}::ENGINE] 30 return 31 } 32 33 method parse {channel} { 34 $myparser reset $channel 35 MAIN ; # Entrypoint for the generated code. 36 return [$myparser complete] 37 } 38 39 method parset {text} { 40 $myparser reset 41 $myparser data $text 42 MAIN ; # Entrypoint for the generated code. 43 return [$myparser complete] 44 } 45 46 # # ## ### ###### ######## ############# 47 ## Configuration 48 49 pragma -hastypeinfo 0 50 pragma -hastypemethods 0 51 pragma -hasinfo 0 52 pragma -simpledispatch 1 53 54 # # ## ### ###### ######## ############# 55 ## Data structures. 56 57 variable myparser {} ; # Our instantiation of the PARAM. 58 59 # # ## ### ###### ######## ############# 60 ## BEGIN of GENERATED CODE. DO NOT EDIT. 61 62 # 63 # Grammar Start Expression 64 # 65 66 proc MAIN {} { upvar 1 myparser myparser 67 $myparser si:next_class abc 68 return 69 } 70 71 ## END of GENERATED CODE. DO NOT EDIT. 72 # # ## ### ###### ######## ############# 73} 74 75# # ## ### ##### ######## ############# ##################### 76## Ready 77 78package provide SNIT_PACKAGE 1 79return 80