Lines Matching full:parsers
105 * Debugging:: Understanding or debugging Bison parsers.
126 * GLR Parsers:: Writing parsers for general context-free languages.
133 Writing @acronym{GLR} Parsers
135 * Simple GLR Parsers:: Using @acronym{GLR} parsers on unambiguous grammars.
136 * Merging GLR Parses:: Using @acronym{GLR} parsers to resolve ambiguities.
138 * Compiler Requirements:: @acronym{GLR} parsers require a modern C compiler.
189 * Multiple Parsers:: Putting more than one Bison parser in one program.
289 * C++ Parsers:: The interface to generate C++ parser classes
292 C++ Parsers
319 * Other Languages:: Parsers in Java and others
337 Bison, you can use it to develop a wide range of language parsers, from those
359 The distribution terms for Bison-generated parsers permit using the
360 parsers in nonfree programs. Before Bison version 2.2, these extra
362 parsers in C@. And before Bison version 1.24, Bison-generated
363 parsers could be used only in programs that were free software.
410 * GLR Parsers:: Writing parsers for general context-free languages.
461 Parsers for @acronym{LALR}(1) grammars are @dfn{deterministic}, meaning
471 parsing (for Generalized @acronym{LR}). Bison's @acronym{GLR} parsers
681 @node GLR Parsers
682 @section Writing @acronym{GLR} Parsers
704 (@acronym{GLR}) parser. These parsers handle Bison grammars that
706 declarations) identically to @acronym{LALR}(1) parsers. However, when
708 @acronym{GLR} parsers use the simple expedient of doing both,
710 the resulting parsers can again split, so that at any given time, there
711 can be any number of possible parses being explored. The parsers
714 parsers eventually meets one of two possible fates: either it runs into
719 During the time that there are multiple parsers, semantic actions are
722 reduction makes two parsers identical, causing them to merge, Bison
723 records both sets of semantic actions. Whenever the last two parsers
731 * Simple GLR Parsers:: Using @acronym{GLR} parsers on unambiguous grammars.
732 * Merging GLR Parses:: Using @acronym{GLR} parsers to resolve ambiguities.
734 * Compiler Requirements:: @acronym{GLR} parsers require a modern C compiler.
737 @node Simple GLR Parsers
1002 Unlike the example from the previous section (@pxref{Simple GLR Parsers}),
1004 ambiguous. One of the parsers eventually reduces @code{stmt : expr ';'} and
1005 the other reduces @code{stmt : decl}, after which both parsers are in an
1030 construct, as shown in the previous section (@pxref{Simple GLR Parsers}).
1037 assuming @code{x} is a @code{declarator}. The second of these parsers
1046 actions of the two possible parsers, rather than choosing one over the
1103 @cindex @acronym{GLR} parsers and @code{yychar}
1105 @cindex @acronym{GLR} parsers and @code{yylval}
1107 @cindex @acronym{GLR} parsers and @code{yylloc}
1118 @cindex @acronym{GLR} parsers and @code{yyclearin}
1130 @cindex @acronym{GLR} parsers and @code{YYERROR}
1140 describes a special usage of @code{YYLLOC_DEFAULT} in @acronym{GLR} parsers.
1143 @subsection Considerations when Compiling @acronym{GLR} Parsers
1145 @cindex @acronym{GLR} parsers and @code{inline}
1147 The @acronym{GLR} parsers require a compiler for @acronym{ISO} C89 or
1150 up to the user of these parsers to handle
2588 * Multiple Parsers:: Putting more than one Bison parser in one program.
3562 @cindex @acronym{GLR} parsers and @code{YYLLOC_DEFAULT}
3930 lost. While this behavior can be tolerable for batch parsers, such as
4016 For normal @acronym{LALR}(1) parsers, reduce/reduce conflicts are more
4018 reduce/reduce conflicts for these parsers. With @acronym{GLR}
4019 parsers, however, both kinds of conflicts are routine; otherwise,
4022 in @acronym{GLR} parsers, using the declaration:
4043 number which Bison printed. With @acronym{GLR} parsers, add an
4096 Parsers}, for the details of this. The variable @code{yynerrs} also
4225 in C parsers
4230 and so on. In C++ parsers, it is only the surrounding namespace which is
4232 @xref{Multiple Parsers, ,Multiple Parsers in the Same Program}.
4323 @node Multiple Parsers
4324 @section Multiple Parsers in the Same Program
4344 name is used in different parsers. For example, @code{YYSTYPE} is not
4345 renamed, but defining this in different ways in different parsers causes
4630 @subsection Calling Conventions for Pure Parsers
4635 Parser}.) In such parsers the two global variables are replaced by
4753 Obviously, in location tracking pure parsers, @code{yyerror} should have
4756 parsers, but not for the Yacc parser, for historical reasons. I.e., if
4761 void yyerror (char const *msg); /* Yacc parsers. */
4762 void yyerror (YYLTYPE *locp, char const *msg); /* GLR parsers. */
4768 void yyerror (int *nastiness, char const *msg); /* Yacc parsers. */
4769 void yyerror (int *nastiness, char const *msg); /* GLR parsers. */
4772 Finally, @acronym{GLR} and Yacc parsers share the same @code{yyerror} calling
4773 convention for absolutely pure parsers, i.e., when the calling
4861 It is also disallowed in @acronym{GLR} parsers.
5696 produce parsers that are very large. In practice, Bison is more useful
5744 For a more detailed exposition of @acronym{LALR}(1) parsers and parser
5758 Bison produces @emph{deterministic} parsers that choose uniquely
5764 sequence of reductions cannot have deterministic parsers in this sense.
5781 effectively @emph{splits} into a several parsers, one for each possible
5782 shift or reduction. These parsers then proceed as usual, consuming
5830 For a more detailed exposition of @acronym{GLR} parsers, please see: Elizabeth
5832 Generalised @acronym{LR} Parsers, Royal Holloway, University of
5849 Because Bison parsers have growing stacks, hitting the upper limit
5886 @acronym{LALR}(1) parsers in C produced by Bison cannot grow when compiled
6018 (known as @dfn{kludges}) may enable you to write Bison parsers for such
6241 Bison parsers are @dfn{shift/reduce automata}. In some cases (much more
6662 useful when Bison will output parsers for languages that don't use a
7008 * C++ Parsers:: The interface to generate C++ parser classes
7012 @node C++ Parsers
7013 @section C++ Parsers
7051 parsers (@pxref{Invocation}).
7216 parsers, C++ parsers are always pure: there is no point in using the
7744 * Other Languages:: Parsers in Java and others
8196 time to resolve reduce/reduce conflicts. @xref{GLR Parsers, ,Writing
8197 @acronym{GLR} Parsers}.
8228 Parsers, ,Writing @acronym{GLR} Parsers}.
8243 for Pure Parsers}.
8250 @xref{GLR Parsers, ,Writing @acronym{GLR} Parsers}.
8418 macro is deprecated, and is supported only for Yacc like parsers.
8419 @xref{Pure Calling,, Calling Conventions for Pure Parsers}.
8468 is supported only for Yacc like parsers. @xref{Pure Calling,, Calling
8469 Conventions for Pure Parsers}.
8538 algorithm cannot by effectively splitting off multiple parsers, trying all
8539 possible parsers, and discarding those that fail in the light of additional