• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /macosx-10.10/tcl-105/tcl_ext/tcllib/tcllib/modules/pt/tests/data/ok/peg_tclparam-tcloo/
1## -*- tcl -*-
2##
3## OO-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 OO
16package require pt::rde::oo ; # OO-based implementation of the
17			      # PARAM virtual machine
18			      # underlying the Tcl/PARAM code
19			      # used below.
20
21# # ## ### ##### ######## ############# #####################
22##
23
24oo::class create PARSER {
25    # # ## ### ##### ######## #############
26    ## Public API
27
28    superclass pt::rde::oo ; # TODO - Define this class.
29                             # Or can we inherit from a snit
30                             # class too ?
31
32    method parse {channel} {
33	my reset $channel
34	my MAIN ; # Entrypoint for the generated code.
35	return [my complete]
36    }
37
38    method parset {text} {
39	my reset
40	my data $text
41	my MAIN ; # Entrypoint for the generated code.
42	return [my complete]
43    }
44
45    # # ## ### ###### ######## #############
46    ## BEGIN of GENERATED CODE. DO NOT EDIT.
47
48    #
49    # Grammar Start Expression
50    #
51    
52    method MAIN {} {
53        my sym_TEST
54        return
55    }
56    
57    #
58    # value Symbol 'TEST'
59    #
60    
61    method sym_TEST {} {
62        # x
63        #     &
64        #         'a'
65        #     (IDENTIFIER)
66    
67        my si:void_symbol_start TEST
68        my sequence_6
69        my si:void_leaf_symbol_end TEST
70        return
71    }
72    
73    method sequence_6 {} {
74        # x
75        #     &
76        #         'a'
77        #     (IDENTIFIER)
78    
79        my si:void_state_push
80        my ahead_3
81        my si:voidvoid_part
82        my i_status_fail ; # Undefined symbol 'IDENTIFIER'
83        my si:void_state_merge
84        return
85    }
86    
87    method ahead_3 {} {
88        # &
89        #     'a'
90    
91        my i_loc_push
92        my si:next_char a
93        my i_loc_pop_rewind
94        return
95    }
96    
97    ## END of GENERATED CODE. DO NOT EDIT.
98    # # ## ### ###### ######## #############
99}
100
101# # ## ### ##### ######## ############# #####################
102## Ready
103
104package provide OO_PACKAGE 1
105return
106