File: grammar.yo

package info (click to toggle)
bisonc%2B%2B 4.09.02-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 5,412 kB
  • ctags: 2,871
  • sloc: cpp: 9,459; ansic: 1,434; makefile: 1,091; sh: 286; yacc: 84; lex: 60
file content (198 lines) | stat: -rw-r--r-- 6,464 bytes parent folder | download | duplicates (2)
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
55
56
57
58
59
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
includefile(grammar/intro.yo)

lsect(OUTLINE)(Outline of a Bisonc++ Grammar File)
includefile(grammar/outline.yo)

lsect(SYMBOLS)(Symbols, Terminal and Nonterminal Symbols)
includefile(grammar/symbols.yo)

lsect(RULES)(Syntax of Grammar Rules)
includefile(grammar/syntax.yo)

lsect(RECURSIVE)(Writing recursive rules)
includefile(grammar/recursive.yo)

lsect(DIRECTIVES)(Bisonc++ Directives)
includefile(directives/intro.yo)

    subsect(%baseclass-preinclude: specifying a header included by the
            baseclass)    
    includefile(directives/preinclude.yo)

    lsubsect(PARSERCLASS)
            (%class-name: defining the name of the parser class)
    includefile(directives/parserclass.yo)

    subsect(%debug: adding debugging code to the `parse()' member)
    includefile(directives/debug.yo)

    subsect(%error-verbose: dumping the parser's state stack)
    includefile(directives/errorverbose.yo)

    lsubsect(EXPECT)(%expect: suppressing conflict warnings)
    includefile(directives/expect.yo)

    subsect(%flex: using the traditional `flex++'  interface)
    includefile(directives/flex.yo)

    lsubsect(INCLUDE)(%include: splitting the input file)
    includefile(directives/include.yo)

    lsubsect(PRECEDENCE)(%left, %right, %nonassoc: defining operator
        precedence)
    includefile(directives/precedence.yo)

    lsubsect(LOCSTRUCT)
            (%locationstruct: specifying a dedicated location struct)
    includefile(directives/locstruct.yo)

    lsubsect(LSPNEEDED)(%lsp-needed: using the default location type)
    includefile(directives/lneeded.yo)

    lsubsect(LTYPE)(%ltype: using an existing location type)
    includefile(directives/ltype.yo)

    subsect(%namespace: using a namespace)
    includefile(directives/namespace.yo)

    subsect(%negative-dollar-indices: using constructions like $-1)
    includefile(directives/negative.yo)

    subsect(%no-lines: suppressing `#line' directives)
    includefile(directives/lines.yo)

    subsect(%prec: overruling default precedences)
    includefile(directives/prec.yo)

    subsect(%polymorphic: using polymorphism to define multiple semantic
            values) 
    includefile(directives/polymorphic.yo)

    subsect(%print-tokens: displaying tokens and matched text) 
    includefile(directives/print.yo)

    subsect(%required-tokens: defining the minimum number of tokens between
        error reports) 
    includefile(directives/required.yo)

    lsubsect(SCANNER)(%scanner: using a standard scanner interface)
    includefile(directives/scanner.yo)

    subsect(%scanner-matched-text-function: define the name of the scanner's
        member returning the matched texttoken) 
    includefile(directives/scannermatchedtextfunction.yo)

    subsect(%scanner-token-function: define the name of the scanner's token
            function) 
    includefile(directives/scannertokenfunction.yo)

    subsect(%start: defining the start rule)
    includefile(directives/start.yo)

    subsect(%stype: specifying the semantic stack type)
    includefile(directives/stype.yo)

    lsubsect(TOKTYPENAMES)(%token: defining token names)
    includefile(directives/tokens.yo)

        lsubsubsect(IMPROPER)(Improper token names)
        includefile(directives/improper.yo)

    lsubsect(TYPE)(%type: associating semantic values to (non)terminals)
    includefile(directives/nonterms.yo)

    lsubsect(UNION)(%union: using a 'union' to define multiple semantic values) 
    includefile(directives/union.yo)

    subsect(%weak-tags: %polymorphic declaring 'enum Tag__')
    includefile(directives/weaktags.yo)

    subsect(Directives controlling the names of generated files)
    includefile(directives/output.yo)

        lsubsubsect(BCHEADER)
            (%baseclass-header: defining the parser's base class header)
        includefile(directives/baseclass.yo)

        lsubsubsect(CHEADER)
            (%class-header: defining the parser's class header)
        includefile(directives/classhdr.yo)

        lsubsubsect(FILES)
            (%filenames: specifying a generic filename)
        includefile(directives/filenames.yo)

        lsubsubsect(IHEADER)
            (%implementation-header: defining the implementation header)
        includefile(directives/imphdr.yo)

        lsubsubsect(PARSESOURCE)
               (%parsefun-source: defining the parse() function's sourcefile)
        includefile(directives/parse.yo)

        subsubsect(%target-directory: defining the directory where files must
                be written)
        includefile(directives/targetdir.yo)

lsect(DEFSEM)(Defining Language Semantics)
includefile(grammar/semantics.yo)

    lsubsect(SEMANTICTYPES)(Data Types of Semantic Values)
    includefile(grammar/datatypes.yo)

    lsubsect(MORETYPES)(More Than One Value Type)
    includefile(grammar/union.yo)

    lsubsect(POLYMORPHIC)(Polymorphism and multiple semantic values:
                        `%polymorphic') 
    includefile(grammar/polymorphic.yo)

        subsubsect(The %polymorphic directive)
        includefile(grammar/polymorphicdirective.yo)

        subsubsect(The %polymorphic and %type: associating semantic values
        with (non-)terminals) 
        includefile(grammar/polymorphictype.yo)

        subsubsect(Code generated by %polymorphic)
        includefile(grammar/code.yo)

        subsubsect(A parser using a polymorphic semantic value type)
        includefile(grammar/parser.yo)

        subsubsect(A scanner using a polymorphic semantic value type)
        includefile(grammar/scanner.yo)

    lsubsect(ACTIONS)(Actions)
    includefile(grammar/actions.yo)

    lsubsect(ACTIONTYPES)(Data Types of Values in Actions)
    includefile(grammar/actiontypes.yo)

    lsubsect(MIDACTIONS)(Actions in Mid-Rule)
    includefile(grammar/midrule.yo)

sect(Basic Grammatical Constructions)
includefile(grammar/gramcons.yo)

    subsect(Plain Alternatives)
    includefile(grammar/alternatives.yo)

    subsect(One Or More Alternatives, No Separators)
    includefile(grammar/series.yo)

    lsubsect(OPTSERIES)(Zero Or More Alternatives, No Separators)
    includefile(grammar/optseries.yo)

    subsect(One Or More Alternatives, Using Separators)
    includefile(grammar/delimseries.yo)

    subsect(Zero Or More Alternatives, Using Separators)
    includefile(grammar/optdelim.yo)

    subsect(Nested Blocks)
    includefile(grammar/nested.yo)

sect(Multiple Parsers in the Same Program)
includefile(grammar/multiple.yo)