Home | History | Annotate | Download | only in doc

Lines Matching full:parser

4 parser generator.
23 * bison: (bison). GNU parser generator (Yacc replacement).
32 This manual is for GNU Bison (version 2.3, 30 May 2006), the GNU parser
63 * Interface:: C-language interface to the parser function `yyparse'.
64 * Algorithm:: How the Bison parser works at run-time.
69 * Invocation:: How to run Bison (to produce the parser source file).
70 * C++ Language Interface:: Creating C++ parser objects.
90 * Bison Parser:: What are Bison's input and output,
151 * Multiple Parsers:: Putting more than one Bison parser in one program.
187 * Pure Decl:: Requesting a reentrant parser.
190 Parser C-Language Interface
192 * Parser Function:: How to call `yyparse' and what it returns.
197 * Internationalization:: How to let the parser speak in the user's
209 in a pure parser (*note A Pure (Reentrant) Parser: Pure Decl.).
211 The Bison Parser Algorithm
213 * Look-Ahead:: Parser looks one token ahead when deciding what to do.
217 * Parser States:: The parser is a finite-state-machine with stack.
237 Debugging Your Parser
239 * Understanding:: Understanding the structure of your parser.
240 * Tracing:: Tracing the execution of your parser.
251 * C++ Parsers:: The interface to generate C++ parser classes
256 * C++ Bison Interface:: Asking for C++ parser generation
259 * C++ Parser Interface:: Instantiating and running the parser
266 * Calc++ Parser:: A parser class
273 * How Can I Reset the Parser:: `yyparse' Keeps some State
295 "Bison" is a general-purpose parser generator that converts an
296 annotated context-free grammar into an LALR(1) or GLR parser for that
337 The output of the Bison utility--the Bison parser file--contains a
339 parser's implementation. (The actions from your grammar are inserted
342 skeleton code for the parser's implementation, the effect was to
352 This exception applies when Bison is generating code for a parser.
737 * Bison Parser:: What are Bison's input and output,
849 The Bison parser reads a sequence of tokens as its input, and groups
854 If not, the parser reports a syntax error.
933 because each is an `INTEGER'. When the parser accepts the token, it
951 the parser recognizes a match for that rule, the action is executed.
957 can be the sum of two expressions. When the parser recognizes such a
988 `%glr-parser' among the Bison declarations in your file (*note Grammar
989 Outline::), the result is a Generalized LR (GLR) parser. These parsers
994 effectively cloning the parser to follow both possibilities. Each of
1001 another parser, because the two of them have reduced the input to an
1005 recorded, but not performed. When a parser disappears, its recorded
1009 merge, reverting to the single-parser case, Bison resolves all the
1061 however, desirable for a parser to decide this, since in the latter case
1078 A simple solution to this problem is to declare the parser to use
1079 the GLR algorithm. When the GLR parser reaches the critical state, it
1090 parser reports a syntax error as usual.
1092 The effect of all this is that the parser seems to "guess" the
1098 In general, a GLR parser can take quadratic or cubic worst-case time,
1099 and the current Bison parser even takes exponential time and space for
1138 parser chooses one of the alternatives, arbitrarily the one declared
1143 The parser can be turned into a GLR parser, while also telling Bison
1147 %glr-parser
1150 No change in the grammar itself is required. Now the parser recognizes
1152 transparently. In fact, the user does not even notice when the parser
1159 done where it is intended. A GLR parser splitting inadvertently may
1160 cause problems less obvious than an LALR parser statically choosing the
1163 parser consumes tokens without performing any actions during the split,
1164 the lexer cannot obtain information via parser actions. Some cases of
1166 complications from the lexer to the parser. You must check the
1172 possible for a parser to define the enumeration constants as they are
1197 %glr-parser
1235 example above. Since this is a GLR parser, it therefore splits the
1245 At this point, the GLR parser requires a specification in the
1249 implies that `x' is a declarator. The parser therefore prints
1254 parse survives. Consider a different input string for this parser:
1261 However, at the time the Bison parser encounters `x', it does not have
1264 precedence declaration is used. Again, the parser splits into two, one
1267 `+', and the parser prints
1297 With these declarations, the resulting parser parses the first example
1304 ambiguity would be unresolvable, and the parser will report an error
1315 Bison features you might use in a semantic action in a GLR parser.
1338 effect of `YYERROR' is the same as its effect in an LALR(1) parser. In
1370 File: bison.info, Node: Locations Overview, Next: Bison Parser, Prev: GLR Parsers, Up: Concepts
1383 all tokens and groupings. Moreover, the output parser is equipped with
1398 of the output parser is to take the beginning of the first symbol, and
1402 File: bison.info, Node: Bison Parser, Next: Stages, Prev: Locations Overview, Up: Concepts
1404 1.7 Bison Output: the Parser File
1409 grammar. This file is called a "Bison parser". Keep in mind that the
1410 Bison utility and the Bison parser are two distinct programs: the Bison
1411 parser that becomes part
1414 The job of the Bison parser is to group tokens into groupings
1421 parser calls the lexical analyzer each time it wants a new token. It
1427 The Bison parser file is C code which defines a function named
1431 parser calls to report an error. In addition, a complete C program must
1433 arrange for it to call `yyparse' or the parser will never run. *Note
1434 Parser C-Language Interface: Interface.
1437 write, all symbols defined in the Bison parser file itself begin with
1440 the parser function `yyparse' itself. This also includes numerous
1447 In some cases the Bison parser file includes system headers, and in
1454 (*note Tracing Your Parser: Tracing.).
1457 File: bison.info, Node: Stages, Next: Grammar Layout, Prev: Bison Parser, Up: Concepts
1472 parser. The lexical analyzer may be written by hand in C (*note
1477 3. Write a controlling function that calls the Bison-produced parser.
1484 1. Run Bison on the grammar to produce the parser.
1612 Data Types of Semantic Values: Value Type.). The Bison parser will use
1623 parser calls them so they must be declared in the prologue.
1716 The parser function `yyparse' continues to process input until a
1808 or sequences of characters into tokens. The Bison parser gets its
1830 global variable `yylval', which is where the Bison parser will look for
1895 (*note Parser C-Language Interface: Interface.), so here is the
1907 After `yyerror' returns, the Bison parser may recover from the error
1917 2.1.6 Running Bison to Make the Parser
1920 Before running Bison to produce a parser, we need to decide how to
1931 to convert it into a parser file:
1944 2.1.7 Compiling the Parser File
1947 Here is how to compile and run the parser file:
1953 # Compile the Bison parser.
2067 recovery"--how to continue parsing after the parser detects a syntax
2197 We don't need to assign a value to `@$': the output parser does it
2212 feed the parser with the token locations, as it already does for
2265 Now, each time this function returns a token, the parser has its
2661 * Multiple Parsers:: Putting more than one Bison parser in one program.
2703 rules. These are copied to the beginning of the parser file so that
2767 The EPILOGUE is copied verbatim to the end of the parser file, just as
2769 place to put anything that you want to have in the parser file but
2774 you define them in the Epilogue. *Note Parser C-Language Interface:
2780 The Bison parser itself contains many macros and identifiers whose
2797 represented in the Bison parser by a numeric code, and the `yylex'
2868 on when the parser function returns that symbol.
2878 type becomes a C macro in the parser file, so `yylex' can use the name
3018 The Bison Parser Algorithm: Algorithm, for further explanation of this.
3095 To use more than one data type for semantic values in one parser,
3132 into the parser file. `$$' is translated to a modifiable lvalue, so it
3231 are executed before the parser even recognizes the following components.
3282 In the above example, if the parser initiates error recovery (*note
3313 conflicts since the parser must commit to a parse in order to execute
3315 actions, can coexist in a working parser because the parser can shift
3331 Now the parser is forced to decide whether to run the mid-rule action
3335 the "look-ahead" token at this time, since the parser is still deciding
3386 functional parser, it can be useful to process some additional
3427 for describing the behavior of the output parser with locations.
3492 the output parser to redefine the default action to take for each rule.
3496 reporting an unresolvable syntactic ambiguity, a GLR parser invokes
3506 is the size of the rule's right hand side. When a GLR parser reports
3583 * Pure Decl:: Requesting a reentrant parser.
3609 Bison will convert this into a `#define' directive in the parser, so
3766 Sometimes your parser needs to perform some initializations before
3792 until the parser falls on its feet. If the parser runs out of memory,
3794 stack must be discarded. Even if the parser succeeds, it must discard
3806 Invoke the braced CODE whenever the parser discards one of the
3808 associated with the discarded symbol. The additional parser
3809 parameters are also available (*note The Parser Function
3810 `yyparse': Parser Function.).
3833 right-hand side symbols) when the parser returns immediately, and
3835 * the start symbol, when the parser succeeds.
3837 The parser can "return immediately" because of an explicit call to
3910 3.7.10 A Pure (Reentrant) Parser
3920 Normally, Bison generates a parser which is not reentrant. This is
3926 Alternatively, you can generate a pure, reentrant parser. The Bison
3927 declaration `%pure-parser' says that you want the parser to be
3930 %pure-parser
3940 Whether the parser is pure has nothing to do with the grammar rules.
3941 You can generate either a pure parser or a nonreentrant parser from any
3990 In the parser file, define the macro `YYDEBUG' to 1 if it is not
3992 *Note Tracing Your Parser: Tracing.
3997 If the parser output file is named `NAME.c' then this file is
4007 both by your parser and by any other module that needs `YYSTYPE'.
4009 Unless your parser is pure, the output header declares `yylval' as
4010 an external variable. *Note A Pure (Reentrant) Parser: Pure Decl.
4023 Specify how the parser should reclaim the memory associated to
4039 Rename the external symbols used in the parser so that they start
4048 -- Directive: %no-parser
4049 Do not include any C code in the parser file; generate tables
4050 only. The parser file contains just `#define' directives and
4058 Don't generate any `#line' preprocessor commands in the parser
4059 file. Ordinarily Bison writes these commands in the parser file
4062 directive causes them to associate errors with the parser file,
4066 Specify FILE for the parser file.
4068 -- Directive: %pure-parser
4069 Request a pure (reentrant) parser program (*note A Pure
4070 (Reentrant) Parser: Pure Decl.).
4077 Generate an array of token names in the parser file. The name of
4107 The number of parser states (*note Parser States::).
4111 parser states and what is done for each type of look-ahead token in
4112 that state. *Note Understanding Your Parser: Understanding, for
4126 contain only one Bison parser. But what if you want to parse more than
4133 variables of the Bison parser to start with PREFIX instead of `yy'.
4134 You can use this to give each parser distinct names that do not
4149 of the parser source file, defining `yyparse' as `PREFIXparse', and so
4151 parser file.
4156 4 Parser C-Language Interface
4159 The Bison parser is actually a C function named `yyparse'. Here we
4163 Keep in mind that the parser uses many C identifiers starting with
4170 * Parser Function:: How to call `yyparse' and what it returns.
4175 * Internationalization:: How to let the parser speak in the user's
4179 File: bison.info, Node: Parser Function, Next: Lexical, Up: Interface
4181 4.1 The Parser Function `yyparse'
4209 If you use a reentrant parser, you can optionally pass additional
4220 Here's an example. Write this in the parser:
4225 Then call the parser like this:
4239 File: bison.info, Node: Lexical, Next: Error Reporting, Prev: Parser Function, Up: Interface
4245 input stream and returns them to the parser. Bison does not create
4266 in a pure parser (*note A Pure (Reentrant) Parser: Pure Decl.).
4279 in the parser file becomes a C macro whose definition is the proper
4349 In an ordinary (nonreentrant) parser, the semantic value of the token
4394 `last_column'. Note that the use of this feature makes the parser
4405 When you use the Bison declaration `%pure-parser' to request a pure,
4406 reentrant parser, the global communication variables `yylval' and
4407 Parser: Pure Decl.)
4427 `%lex-param' just like `%parse-param' (*note Parser Function::).
4444 If `%pure-parser' is added:
4449 and finally, if both `%pure-parser' and `%locations' are used:
4460 The Bison parser detects a "syntax error" or "parse error" whenever it
4465 The Bison parser expects to report the error by calling an error
4476 The parser can detect one other kind of error: memory exhaustion.
4479 parser normally extends its stack automatically up to a very large
4502 parsers, but not for the Yacc parser, for historical reasons. I.e., if
4503 `%locations %pure-parser' is passed then the prototypes for `yyerror'
4516 convention of `yylex' _and_ the calling convention of `%pure-parser'
4522 %pure-parser
4528 results in the following signatures for all the parser kinds:
4548 parser (*note A Pure (Reentrant) Parser: Pure Decl.) then it is a
4580 Parser Function `yyparse': Parser Function.
4584 Parser Function `yyparse': Parser Function.
4608 recovery just as if the parser itself had detected an error;
4615 The expression `YYRECOVERING ()' yields 1 when the parser is
4663 4.5 Parser Internationalization
4666 A Bison-generated parser can print diagnostics, including error and
4675 The maintainer of a package that uses a Bison-generated parser
4676 enables the internationalization of the parser's output through the
4692 to enable translations in the Bison-generated parser.
4721 5 The Bison Parser Algorithm
4725 semantic values. The stack is called the "parser stack". Pushing a
4741 For example, if the infix calculator's parser stack contains this:
4757 The parser tries, by shifts and reductions, to reduce the entire
4762 This kind of parser is known in the literature as a bottom-up parser.
4766 * Look-Ahead:: Parser looks one token ahead when deciding what to do.
4770 * Parser States:: The parser is a finite-state-machine with stack.
4782 The Bison parser does _not_ always reduce immediately as soon as the
4785 reduction is possible, the parser sometimes "looks ahead" at the next
4790 parser can perform one or more reductions of tokens and groupings on
4817 that `2 !' can be reduced to make a `term'. If instead the parser were
4857 Since the parser prefers to shift the `ELSE', the result is to attach
4865 But if the parser chose to reduce when possible rather than shift,
4941 Suppose the parser has seen the tokens `1', `-' and `2'; should it
4962 of left or right association is a matter of whether the parser chooses
5036 File: bison.info, Node: Contextual Precedence, Next: Parser States, Prev: Precedence, Up: Algorithm
5084 File: bison.info, Node: Parser States, Next: Reduce/Reduce, Prev: Contextual Precedence, Up: Algorithm
5086 5.5 Parser States
5090 The values pushed on the parser stack are not simply token type codes;
5096 Each time a look-ahead token is read, the current parser state
5099 it also specifies the new parser state, which is pushed onto the top of
5100 the parser stack. Or it can say, "Reduce using rule number N." This
5110 File: bison.info, Node: Reduce/Reduce, Next: Mystery Conflicts, Prev: Parser States, Up: Algorithm
5250 However, Bison, like most parser generators, cannot actually handle
5258 single parser state for them both. Combining the two contexts causes a
5259 conflict later. In parser terminology, this occurrence means that the
5263 But this particular deficiency is intrinsically hard to fix; parser
5269 parser states that are being confused, and adding something to make them
5287 a `param_spec', so the two contexts receive distinct parser states. As
5307 For a more detailed exposition of LALR(1) parsers and parser
5326 look-ahead, since the parser lacks the information necessary to make a
5327 decision at the point it must be made in a shift-reduce parser.
5332 When you use the `%glr-parser' declaration in your grammar file,
5333 Bison generates a parser that uses a different algorithm, called
5334 Generalized LR (or GLR). A Bison GLR parser uses the same basic
5335 algorithm for parsing as an ordinary Bison parser, but behaves
5338 reduce-reduce conflict. When a GLR parser encounters such a situation,
5357 Whenever the parser makes a transition from having multiple states
5361 that are sets (actually multisets) of possible actions. The parser
5379 Usually, nondeterminism in a grammar is local--the parser is "in doubt"
5383 parser.
5398 The Bison parser stack can run out of memory if too many tokens are
5399 shifted and not reduced. When this happens, the parser function
5407 parser stack can become before memory is exhausted. Define the macro
5412 specify a large value for `YYMAXDEPTH', the parser normally allocates a
5425 macro `YYINITDEPTH' to a positive integer. For the C LALR(1) parser,
5434 compilers. In this precise case (compiling a C parser as C++) you are
5449 In a simple interactive command parser where each input is one line,
5461 handling. The Bison parser generates an `error' token whenever a
5490 parser reads tokens and discards them until it finds a token which is
5522 To prevent an outpouring of error messages, the parser will output
5547 The expression `YYRECOVERING ()' yields 1 when the parser is
5586 parser for C decide how to parse this input?
5620 As a result, part of the Bison parser for C needs to be duplicated,
5694 The declaration of `hexflag' shown in the prologue of the parser file
5756 8 Debugging Your Parser
5759 Developing a parser can be a challenge, especially if you don't
5760 understand the algorithm (*note The Bison Parser Algorithm:
5762 can help (*note Understanding Your Parser: Understanding.), or tracing
5763 the execution of the parser can give some insight on why it behaves
5764 improperly (*note Tracing Your Parser: Tracing.).
5768 * Understanding:: Understanding the structure of your parser.
5769 * Tracing:: Tracing the execution of your parser.
5774 8.1 Understanding Your Parser
5777 As documented elsewhere (*note The Bison Parser Algorithm: Algorithm.)
5780 tune or simply fix a parser. Bison provides two different
5785 name is made by removing `.tab.c' or `.c' from the parser output file
5787 `foo.y', then the parser file is called `foo.tab.c' by default. As a
5834 nonterminals and rules are removed in order to produce a smaller parser,
5893 symbol (here, `exp'). When the parser returns to this state right
5929 (`$default'), the parser will reduce it. If it was coming from state
6019 conflict means that either the grammar is ambiguous, or the parser lacks
6113 8.2 Tracing Your Parser
6117 it runs, the `yydebug' parser-trace feature can help you figure out why.
6123 parser. This is compliant with POSIX Yacc. You could use
6153 Each step taken by the parser when `yydebug' is nonzero produces a
6157 * Each time the parser calls `yylex', what kind of token was read.
6160 the state stack (*note Parser States::).
6170 can see that the parser is functioning according to its specification in
6175 The parser file is a C program and you can use C debuggers on it,
6176 but it's not easy to interpret what it is doing. The parser function
6184 `YYPRINT', it should take three arguments. The parser will pass a
6218 The parser file's name is made by replacing the `.y' with `.tab.c' and
6280 name conventions, so that the parser output file is called
6291 `%glr-parser', Bison might not be Yacc-compatible even if this
6295 Tuning the parser:
6304 In the parser file, define the macro `YYDEBUG' to 1 if it is not
6306 *Note Tracing Your Parser: Tracing.
6318 Don't put any `#line' preprocessor commands in the parser file.
6319 Ordinarily Bison puts them in the parser file so that the C
6322 errors with the parser file, treating it as an independent source
6326 `--no-parser'
6327 Pretend that `%no-parser' was specified. *Note Decl Summary::.
6371 file containing verbose descriptions of the grammar and parser.
6376 Specify the FILE for the parser file.
6409 `--no-parser' `-n'
6449 * C++ Parsers:: The interface to generate C++ parser classes
6460 * C++ Bison Interface:: Asking for C++ parser generation
6463 * C++ Parser Interface:: Instantiating and running the parser
6472 The C++ parser LALR(1) skeleton is named `lalr1.cc'. To select it, you
6486 An auxiliary class `stack' used by the parser.
6491 declaration and implementation of the C++ parser class. The
6511 you should refer to the parser's encapsulated type
6512 `yy::parser::semantic_type'.
6529 File: bison.info, Node: C++ Location Values, Next: C++ Parser Interface, Prev: C++ Semantic Values, Up: C++ Parsers
6534 When the directive `%locations' is used, the C++ parser supports
6542 parser will never duplicate nor deallocate it. As an experimental
6591 File: bison.info, Node: C++ Parser Interface, Next: C++ Scanner Interface, Prev: C++ Location Values, Up: C++ Parsers
6593 10.1.4 C++ Parser Interface
6597 parser class in the namespace `yy'. The class name defaults to
6598 `parser', but may be changed using `%define "parser_class_name"
6601 changed since it describes an additional member of the parser class,
6604 -- Type of parser: semantic_value_type
6605 -- Type of parser: location_value_type
6608 -- Method on parser: parser (TYPE1 ARG1, ...)
6609 Build a new parser object. There are no arguments by default,
6612 -- Method on parser: int parse ()
6615 -- Method on parser: std::ostream& debug_stream ()
6616 -- Method on parser: void set_debug_stream (std::ostream& O)
6620 -- Method on parser: debug_level_type debug_level ()
6621 -- Method on parser: void set_debug_level (debug_level L)
6625 -- Method on parser: void error (const location_type& L, const
6628 user: the parser uses it to report a parser error occurring at L,
6632 File: bison.info, Node: C++ Scanner Interface, Prev: C++ Parser Interface, Up: C++ Parsers
6637 The parser invokes the scanner by calling `yylex'. Contrary to C
6639 `%pure-parser' directive. Therefore the interface is as follows.
6641 -- Method on parser: int yylex (semantic_value_type& YYLVAL,
6653 This section demonstrates the use of a C++ parser with a simple but
6666 * Calc++ Parser:: A parser class
6679 with the parser. An example of valid input follows.
6686 File: bison.info, Node: Calc++ Parsing Driver, Next: Calc++ Parser, Prev: Calc++ --- C++ Calculator, Up: A Complete C++ Example
6691 To support a pure interface with the parser (and the scanner) the
6695 the file for parsing, instantiate the parser etc.), we recommend
6701 required standard library components, and the declaration of the parser
6708 # include "calc++-parser.hh"
6712 parser expects it to be declared. We can factor both as follows.
6720 // ... and declare it for the parser's sake.
6746 Similarly for the parser itself.
6748 // Handling the parser.
6770 #include "calc++-parser.hh"
6788 yy::calcxx_parser parser (*this);
6789 parser.set_debug_level (trace_parsing);
6790 parser.parse ();
6807 File: bison.info, Node: Calc++ Parser, Next: Calc++ Scanner, Prev: Calc++ Parsing Driver, Up: A Complete C++ Example
6809 10.2.3 Calc++ Parser
6812 The parser definition file `calc++-parser.yy' starts by asking for the
6813 C++ LALR(1) skeleton, the creation of the parser header file, and
6814 specifies the name of the parser class. Because the C++ skeleton
6824 Because the parser uses the parsing driver and reciprocally, both
6826 needs detailed knowledge about the parser class (in particular its
6827 inner types), it is the parser's header which will simply use a forward
6835 The driver is passed by reference to the parser and to the scanner.
6855 Use the two following directives to enable parser tracing and verbose
6928 File: bison.info, Node: Calc++ Scanner, Next: Calc++ Top Level, Prev: Calc++ Parser, Up: A Complete C++ Example
6934 parser's to get the set of defined tokens.
6942 # include "calc++-parser.hh"
7067 * How Can I Reset the Parser:: `yyparse' Keeps some State
7080 File: bison.info, Node: Memory Exhausted, Next: How Can I Reset the Parser, Up: FAQ
7085 My parser returns with error with a `memory exhausted'
7092 File: bison.info, Node: How Can I Reset the Parser, Next: Strings are Destroyed, Prev: Memory Exhausted, Up: FAQ
7094 11.2 How Can I Reset the Parser
7106 My parser includes support for an `#include'-like feature, in
7108 although I did specify I needed a `%pure-parser'.
7173 File: bison.info, Node: Strings are Destroyed, Next: Implementing Gotos/Loops, Prev: How Can I Reset the Parser, Up: FAQ
7178 My parser seems to destroy old strings, or maybe it loses track of
7235 the distinction to make between the parser--whose job is to recover the
7242 If you want a richer model, you will probably need to use the parser
7273 the parser goes, that is all that is needed.
7359 If the bug is parser-related, you should include the smallest grammar
7398 release, compile it, and use it to build and run a parser or two. After
7472 Equip the parser for debugging. *Note Decl Summary::.
7479 Specify how the parser
7494 in grammar rules so as to allow the Bison parser to recognize an
7510 -- Directive: %glr-parser
7511 Bison declaration to produce a GLR parser. *Note Writing GLR
7540 parser file. *Note Decl Summary::.
7547 Bison declaration to set the name of the parser file. *Note Decl
7552 `yyparse' should accept. *Note The Parser Function `yyparse':
7553 Parser Function.
7559 -- Directive: %pure-parser
7560 Bison declaration to request a pure (reentrant) parser. *Note A
7561 Pure (Reentrant) Parser: Pure Decl.
7580 Bison declaration to include a token name table in the parser file.
7599 function `yyerror' is not called. *Note The Parser Function
7600 `yyparse': Parser Function.
7604 read, by making `yyparse' return 0 immediately. *Note The Parser
7605 Function `yyparse': Parser Function.
7608 Macro to discard a value from the parser stack and fake a
7614 look-ahead token. (In a pure parser, it is a local variable within
7623 Macro to define to equip the parser with tracing code. *Note
7624 Tracing Your Parser: Tracing.
7628 given a nonzero value, the parser will output information on input
7629 symbols and parser action. *Note Tracing Your Parser: Tracing.
7632 Macro to cause parser to recover immediately to its normal mode
7653 Macro for specifying the initial size of the parser stack. *Note
7669 numbers associated with a token. (In a pure parser, it is a local
7683 associated with a token. (In a pure parser, it is a local
7690 Macro for specifying the maximum size of the parser stack. *Note
7695 syntax error. (In a pure parser, it is a local variable within
7700 The parser function produced by Bison; call this function to start
7701 parsing. *Note The Parser Function `yyparse': Parser Function.
7710 The expression `YYRECOVERING ()' yields 1 when the parser is
7716 parser needs to extend its stacks. If defined to 0, the parser
7718 parser will use `alloca'. Values other than 0 and 1 are reserved
7766 machine. In the case of the parser, the input is the language
7768 grammar rules. *Note The Bison Parser Algorithm: Algorithm.
7807 from left to right. *Note The Bison Parser Algorithm: Algorithm.
7827 parser generators) can handle; a subset of LR(1). *Note
7840 Parser
7851 nonterminal, according to a grammar rule. *Note The Bison Parser
7857 various invocations. *Note A Pure (Reentrant) Parser: Pure Decl.
7873 A parser is said to shift when it makes the choice of analyzing
7875 already-recognized rule. *Note The Bison Parser Algorithm:
7901 input of the Bison parser is a stream of tokens which comes from
8392 * %glr-parser <1>: Table of Symbols. (line 91)
8393 * %glr-parser <2>: Simple GLR Parsers. (line 6)
8394 * %glr-parser: GLR Parsers. (line 6)
8409 * %no-parser: Decl Summary. (line 105)
8416 * %parse-param: Parser Function. (line 36)
8420 * %pure-parser <1>: Table of Symbols. (line 140)
8421 * %pure-parser <2>: Decl Summary. (line 125)
8422 * %pure-parser: Pure Decl. (line 6)
8466 * algorithm of parser: Algorithm. (line 6)
8482 * Bison parser: Bison Parser. (line 6)
8483 * Bison parser algorithm: Algorithm. (line 6)
8485 * Bison utility: Bison Parser. (line 6)
8509 * compiling the parser: Rpcalc Compile. (line 6)
8526 * debug_level on parser: C++ Parser Interface.
8528 * debug_stream on parser: C++ Parser Interface.
8557 * error on parser: C++ Parser Interface.
8571 * finite-state machine: Parser States. (line 6)
8638 * lexical analyzer, purpose: Bison Parser. (line 6)
8654 * location_value_type: C++ Parser Interface.
8688 * overflow of parser stack: Memory Management. (line 6)
8690 * parse on parser: C++ Parser Interface.
8692 * parser: Bison Parser. (line 6)
8693 * parser on parser: C++ Parser Interface.
8695 * parser stack: Algorithm. (line 6)
8696 * parser stack overflow: Memory Management. (line 6)
8697 * parser state: Parser States. (line 6)
8708 * pure parser: Pure Decl. (line 6)
8717 * reentrant parser: Pure Decl. (line 6)
8730 * semantic_value_type: C++ Parser Interface.
8732 * set_debug_level on parser: C++ Parser Interface.
8734 * set_debug_stream on parser: C++ Parser Interface.
8743 * stack, parser: Algorithm. (line 6)
8748 * state (of parser): Parser States. (line 6)
8771 * tracing the parser: Tracing. (line 6)
8786 * YYABORT: Parser Function. (line 29)
8789 * YYACCEPT: Parser Function. (line 26)
8826 * yylex on parser: C++ Scanner Interface.
8853 * yyparse: Parser Function. (line 6)
8882 Node: Bison Parser65046
8941 Node: Parser Function171457
8959 Node: Parser States207392
8982 Node: C++ Parser Interface264753
8987 Node: Calc++ Parser272324
8992 Node: How Can I Reset the Parser281343