Home | History | Annotate | Download | only in doc

Lines Matching full:samp

527 the statement, each @samp{x} is an expression and so is @samp{x * x}.
550 For example, @samp{1 + 2} is a valid C expression---a valid part of a C
616 @samp{x+4} is grammatical then @samp{x+1} or @samp{x+3989} is equally
765 literals and constant identifiers for the subrange bounds (@samp{lo}
766 and @samp{hi}), but Extended Pascal (@acronym{ISO}/@acronym{IEC}
788 These two declarations look identical until the @samp{..} token.
791 @samp{a} is parsed. It is, however, desirable
793 @samp{a} must become a new identifier to represent the enumeration
794 value, while in the former case @samp{a} must be evaluated with its
797 You could parse @samp{(a)} as an ``unspecified identifier in parentheses'',
806 scope, and @samp{a} is defined in an outer scope, then both forms
807 are possible---either locally redefining @samp{a}, or using the
808 value of @samp{a} from the outer scope. So this approach cannot
816 error. If there is a @samp{..} token before the next
817 @samp{;}, the rule for enumerated types fails since it cannot
818 accept @samp{..} anywhere; otherwise, the subrange type rule
819 fails since it requires a @samp{..} token. So one of the branches
896 @samp{%%}):
995 (assuming that @samp{T} is recognized as a @code{TYPENAME} and
996 @samp{x} as an @code{ID}).
1006 identical state: they've seen @samp{prog stmt} and have the same unprocessed
1089 @samp{%merge} clauses. Otherwise, the ambiguity would be unresolvable,
1238 begin with @samp{yy} or @samp{YY}. This includes interface functions
1242 Therefore, you should avoid using C identifiers starting with @samp{yy}
1243 or @samp{YY} in the Bison grammar file except for the ones defined in
1245 @samp{malloc} and @samp{free} for anything other than their usual
1325 The @samp{%%}, @samp{%@{} and @samp{%@}} are punctuation that appears
1386 @samp{.y} extension is a convention used for Bison input files.
1402 calculator. As in C, comments are placed between @samp{/*@dots{}*/}.
1478 symbols has several alternate rules, joined by the vertical bar @samp{|}
1517 colon and the first @samp{|}; this means that @code{input} can match an
1521 @samp{/* empty */} in it.
1574 We have used @samp{|} to join all the rules for @code{exp}, but we could
1768 removing the @samp{.y} from the original file name. The file output by
1788 # @r{@samp{-lm} tells compiler to search math library for @code{pow}.}
1808 @kbd{3 7 + 3 4 5 * + - n} @r{Note the unary minus, @samp{n}}
1886 by @samp{*} and @samp{/}, and so on. @xref{Precedence, ,Operator
1891 Bison that the rule @samp{| '-' exp} has the same precedence as
2163 functions, @samp{+}, @samp{-}, @samp{*}, @samp{/} and @samp{^}. It would
2577 The Bison grammar input file conventionally has a name ending in @samp{.y}.
2611 Comments enclosed in @samp{/* @dots{} */} may appear in any of the sections.
2612 As a @acronym{GNU} extension, @samp{//} introduces a comment that
2632 @samp{#include} to get the declarations from a header file. If you
2633 don't need any C declarations, you may omit the @samp{%@{} and
2634 @samp{%@}} delimiters that bracket this section.
2637 of @samp{%@}} that is outside a comment, a string literal, or a
2686 @samp{%%} (which precedes the grammar rules) may never be omitted even
2705 If the last section is empty, you may omit the @samp{%%} that separates it
2709 start with @samp{yy} or @samp{YY}, so it is a good idea to avoid using
2761 type @code{'+'} is used to represent the character @samp{+} as a
2793 type @code{"<="} to represent the string @samp{<=} as a token. Bison
2823 token-type macro definitions to be available there. Use the @samp{-d}
2886 says that two groupings of type @code{exp}, with a @samp{+} token in between,
2909 affected by the C digraphs @samp{<%} and @samp{%>} that represent
2910 braces. At the top level braced code must be terminated by @samp{@}}
2921 be joined with the vertical-bar character @samp{|} as follows:
2954 It is customary to write a comment @samp{/* empty */} in each rule
3037 because the action for the grouping @w{@samp{@var{x} + @var{y}}} is to add
3144 useful semantic value associated with the @samp{+} token, it could be
3147 Note that the vertical-bar character @samp{|} is really a rule
3149 difference with tools like Flex, for which @samp{|} stands for either
3151 following example, the action is triggered only when @samp{b} is found:
3226 by inserting @samp{<@var{type}>} after the @samp{$} at the beginning of the
3265 in advance, so you must use the @samp{$<@dots{}>@var{n}} construct to
3274 statement that looks like @samp{let (@var{variable}) @var{statement}} and
3291 As soon as @samp{let (@var{variable})} has been recognized, the first
3298 @samp{stmt} is component number 6.
3793 of the operator nest: whether @samp{@var{x} @var{op} @var{y} @var{op}
3799 means that @samp{@var{x} @var{op} @var{y} @var{op} @var{z}} is
4032 Compile your grammar without @code{%expect}. Use the @samp{-v} option
4217 the grammar uses the special @samp{@@@var{n}} tokens, but if your
4218 grammar does not use it, using @samp{%locations} allows for more
4224 @var{prefix} instead of @samp{yy}. The precise list of symbols renamed
4229 @samp{%name-prefix="c_"}, the names become @code{c_parse}, @code{c_lex},
4231 named @var{prefix} instead of @samp{yy}.
4331 The easy way to do this is to use the option @samp{-p @var{prefix}}
4334 instead of @samp{yy}. You can use this to give each parser distinct
4339 @code{yychar} and @code{yydebug}. For example, if you use @samp{-p c},
4348 The @samp{-p} option works by adding macro definitions to the beginning
4363 @samp{yy} and @samp{YY} for internal purposes. If you use such an
4465 To do this, use the @samp{-d} option when you run Bison, so that it will
4543 characters like @samp{"} that require escaping.
4613 If you are using the @samp{@@@var{n}}-feature (@pxref{Locations, ,
4651 If the grammar file does not use the @samp{@@} constructs to refer to
4757 @samp{%locations %pure-parser} is passed then the prototypes for
4765 If @samp{%parse-param @{int *nastiness@}} is used, then:
4868 a message @samp{cannot back up} and performs ordinary error
4891 the @samp{YYERROR;} statement. @xref{Error Recovery}.
4956 @c use @samp{@@3.first_line}.
4986 For example, the shell command @samp{export LC_ALL=fr_CA.UTF-8} might
5002 @samp{share/aclocal/bison-i18n.m4} in Bison's installation directory.
5016 causes @samp{configure} to find the value of the
5024 @samp{bindtextdomain} with domain name @samp{bison-runtime}.
5033 @samp{BISON_LOCALEDIR} to be defined as a string through the
5038 function, make @samp{BISON_LOCALEDIR} available as a C preprocessor macro,
5039 either in @samp{DEFS} or in @samp{AM_CPPFLAGS}. For example:
5070 samp{1 + 5 *}, with a
5071 @samp{3} to come. The stack will have four elements, one for each token
5146 factorial operators (@samp{!}), and allow parentheses for grouping.
5163 Suppose that the tokens @w{@samp{1 + 2}} have been read and shifted; what
5164 should be done? If the following token is @samp{)}, then the first three
5166 course, because shifting the @samp{)} would produce a sequence of symbols
5169 If the following token is @samp{!}, then it must be shifted immediately so
5170 that @w{@samp{2 !}} can be reduced to make a @code{term}. If instead the
5171 parser were to reduce before shifting, @w{@samp{1 + 2}} would become an
5172 @code{expr}. It would then be impossible to shift the @samp{!} because
5301 input @w{@samp{1 - 2 * 3}} can be parsed in two different ways):
5315 Suppose the parser has seen the tokens @samp{1}, @samp{-} and @samp{2};
5317 depends on the next token. Of course, if the next token is @samp{)}, we
5319 token sequence @w{@samp{- 2 )}} or anything starting with that. But if
5320 the next token is @samp{*} or @samp{<}, we have a choice: either
5327 The result is (in effect) @w{@samp{1 - (2 @var{op} 3)}}. On the other
5329 is @w{@samp{(1 - 2) @var{op} 3}}. Clearly, then, the choice of shift or
5331 @samp{-} and @var{op}: @samp{*} should be shifted first, but not
5332 @samp{<}.
5335 What about input such as @w{@samp{1 - 2 - 5}}; should this be
5336 @w{@samp{(1 - 2) - 5}} or should it be @w{@samp{1 - (2 - 5)}}? For most
5341 contains @w{@samp{1 - 2}} and the look-ahead token is @samp{-}: shifting
5406 precedence level. The verbose output file made by @samp{-v}
5772 When you use the @samp{%glr-parser} declaration in your grammar file,
5806 has the highest dynamic precedence, as set by the @samp{%dprec}
5809 rules by the @samp{%merge} declaration,
5991 @samp{yyerrok;} is a valid C statement.
5996 this token. Write the statement @samp{yyclearin;} in the error rule's
6004 with @samp{yyclearin;}.
6119 construct @samp{hex (@var{hex-expr})}. After the keyword @code{hex} comes
6121 particular, the token @samp{a1b} must be treated as an integer rather than
6185 If there is a syntax error in the middle of a @samp{hex (@var{expr})}
6187 completed @samp{hex (@var{expr})} will never run. So @code{hexflag} would
6249 Bison}. Its name is made by removing @samp{.tab.c} or @samp{.c} from
6250 the parser output file name, and adding @samp{.output} instead.
6373 item is a production rule together with a point (marked by @samp{.})
6434 the rule 5, @samp{exp: NUM;}, is completed. Whatever the look-ahead token
6435 (@samp{$default}), the parser will reduce it. If it was coming from
6437 jump to state 2 (@samp{exp: go to state 2}).
6457 because of the item @samp{exp -> exp . '+' exp}, if the look-ahead if
6458 @samp{+}, it will be shifted on the parse stack, and the automaton
6459 control will jump to state 4, corresponding to the item @samp{exp -> exp
6515 As was announced in beginning of the report, @samp{State 8 conflicts:
6534 Indeed, there are two actions associated to the look-ahead @samp{/}:
6538 ambiguous, as, since we did not specify the precedence of @samp{/}, the
6539 sentence @samp{NUM + NUM / NUM} can be parsed as @samp{NUM + (NUM /
6540 NUM)}, which corresponds to shifting @samp{/}, or as @samp{(NUM + NUM) /
6553 one such state: if the look-ahead is @samp{*} or @samp{/} then the action
6556 look-ahead token is @samp{*}, since we specified that @samp{*} has higher
6557 precedence than @samp{+}. More generally, some items are eligible only
6629 precedence of @samp{/} with respect to @samp{+}, @samp{-}, and
6630 @samp{*}, but also because the
6631 associativity of @samp{/} is not specified.
6650 @samp{-DYYDEBUG=1} as a compiler option or you could put @samp{#define
6655 Use the @samp{-t} option when you run Bison (@pxref{Invocation,
6658 @item the directive @samp{%debug}
6701 produced by the Bison @samp{-v} option (@pxref{Invocation, ,Invoking
6760 @samp{.y}. The parser file's name is made by replacing the @samp{.y}
6761 with @samp{.tab.c} and removing any leading directory. Thus, the
6762 @samp{bison foo.y} file name yields
6763 @file{foo.tab.c}, and the @samp{bison hack/foo.y} file name yields
6770 @samp{-o} or @samp{-d}.
6801 option names. Long option names are indicated with @samp{--} instead of
6802 @samp{-}. Abbreviations for option names are allowed as long as they
6804 @samp{--file-prefix}, connect the option name and the argument with
6805 @samp{=}.
6844 like @samp{%glr-parser}, Bison might not be Yacc-compatible even if
6937 described under the @samp{-v} and @samp{-d} options.
6946 The behavior of @var{--graph} is the same than @samp{-g}. The only
7031 to Bison, or include the directive @samp{%skeleton "lalr1.cc"} in the
7033 entities in the @samp{yy} namespace. Use the @samp{%name-prefix}
7048 (Assuming the extension of the input file was @samp{.yy}.) The
7055 @samp{%defines} directive.
7105 feature you may change it to @samp{@var{type}*} using @samp{%define
7134 @samp{@var{file}:@var{line}.@var{column}}, or
7135 @samp{@var{line}.@var{column}} if @var{file} is null.
7170 @samp{%define "parser_class_name" "@var{name}"}. The interface of
7183 @samp{%parse-param @{@var{type1} @var{arg1}@}} was used.
7222 @samp{%lex-param @{@var{type1} @var{arg1}@}} yield additional arguments.
7496 The code between @samp{%@{} and @samp{%@}} after the introduction of the
7497 @samp{%union} is output in the @file{*.cc} file; it needs detailed
7753 My parser returns with error with a @samp{memory exhausted}
7776 My parser includes support for an @samp{#include}-like feature, in
7840 @samp{YY_FLUSH_BUFFER} after each change to @code{yyin}. If your
7843 functions like @samp{yy_switch_to_buffer} that manipulate multiple
7849 start condition, through a call to @samp{BEGIN (0)}.
7856 them. Instead of reporting @samp{"foo", "bar"}, it reports
7857 @samp{"bar", "bar"}, or even @samp{"foo\nbar", "bar"}.
7900 option @samp{%array}) Flex generates a different behavior:
7968 simple means to do it: recall that anything between @samp{%@{ ... %@}}
8142 All code listed between @samp{%@{} and @samp{%@}} is copied directly to
8167 The predefined nonterminal whose only rule is @samp{$accept: @var{start}
8178 Assign a precedence to rules that lack an explicit @samp{%prec}
8259 Do not assign a precedence to rules that lack an explicit @samp{%prec}
8427 You can ignore this variable if you don't use the @samp{@@} feature in the
8562 @samp{a+b+c} first computes @samp{a+b} and then combines with
8563 @samp{c}. @xref{Precedence, ,Operator Precedence}.
8567 example, @samp{expseq1 : expseq1 ',' exp;}. @xref{Recursion, ,Recursive
8627 example, @samp{expseq1: exp ',' expseq1;}. @xref{Recursion, ,Recursive
8693 @c LocalWords: yyerror pxref LR yylval cindex dfn LALR samp gpl BNF xref