• Home
  • Raw
  • Download

Lines Matching refs:samp

578 the statement, each @samp{x} is an expression and so is @samp{x * x}.
601 For example, @samp{1 + 2} is a valid C expression---a valid part of a C
666 @samp{x+4} is grammatical then @samp{x+1} or @samp{x+3989} is equally
811 literals and constant identifiers for the subrange bounds (@samp{lo}
812 and @samp{hi}), but Extended Pascal (ISO/IEC
834 These two declarations look identical until the @samp{..} token.
837 @samp{a} is parsed. It is, however, desirable
839 @samp{a} must become a new identifier to represent the enumeration
840 value, while in the former case @samp{a} must be evaluated with its
843 You could parse @samp{(a)} as an ``unspecified identifier in parentheses'',
852 scope, and @samp{a} is defined in an outer scope, then both forms
853 are possible---either locally redefining @samp{a}, or using the
854 value of @samp{a} from the outer scope. So this approach cannot
862 error. If there is a @samp{..} token before the next
863 @samp{;}, the rule for enumerated types fails since it cannot
864 accept @samp{..} anywhere; otherwise, the subrange type rule
865 fails since it requires a @samp{..} token. So one of the branches
944 @samp{%%}):
1048 (assuming that @samp{T} is recognized as a @code{TYPENAME} and
1049 @samp{x} as an @code{ID}).
1059 identical state: they've seen @samp{prog stmt} and have the same unprocessed
1143 @samp{%merge} clauses. Otherwise, the ambiguity would be unresolvable,
1297 itself begin with @samp{yy} or @samp{YY}. This includes interface
1302 identifiers starting with @samp{yy} or @samp{YY} in the Bison grammar
1304 avoid using the C identifiers @samp{malloc} and @samp{free} for
1384 The @samp{%%}, @samp{%@{} and @samp{%@}} are punctuation that appears
1445 @samp{.y} extension is a convention used for Bison grammar files.
1461 calculator. As in C, comments are placed between @samp{/*@dots{}*/}.
1544 symbols has several alternate rules, joined by the vertical bar @samp{|}
1584 colon and the first @samp{|}; this means that @code{input} can match an
1588 @samp{/* empty */} in it.
1643 We have used @samp{|} to join all the rules for @code{exp}, but we could
1841 @samp{.y} from the grammar file name. The parser implementation file
1861 # @r{@samp{-lm} tells compiler to search math library for @code{pow}.}
1881 @kbd{3 7 + 3 4 5 * + - n} @r{Note the unary minus, @samp{n}}
1972 by @samp{*} and @samp{/}, and so on. @xref{Precedence, ,Operator
1977 Bison that the rule @samp{| '-' exp} has the same precedence as
2257 functions, @samp{+}, @samp{-}, @samp{*}, @samp{/} and @samp{^}. It would
2714 The Bison grammar file conventionally has a name ending in @samp{.y}.
2752 Comments enclosed in @samp{/* @dots{} */} may appear in any of the sections.
2753 As a GNU extension, @samp{//} introduces a comment that continues until end
2774 use @samp{#include} to get the declarations from a header file. If
2775 you don't need any C declarations, you may omit the @samp{%@{} and
2776 @samp{%@}} delimiters that bracket this section.
2779 of @samp{%@}} that is outside a comment, a string literal, or a
3146 @samp{%%} (which precedes the grammar rules) may never be omitted even
3166 If the last section is empty, you may omit the @samp{%%} that separates it
3170 start with @samp{yy} or @samp{YY}, so it is a good idea to avoid using
3227 type @code{'+'} is used to represent the character @samp{+} as a
3259 type @code{"<="} to represent the string @samp{<=} as a token. Bison
3289 token-type macro definitions to be available there. Use the @samp{-d}
3350 says that two groupings of type @code{exp}, with a @samp{+} token in between,
3374 affected by the C digraphs @samp{<%} and @samp{%>} that represent
3375 braces. At the top level braced code must be terminated by @samp{@}}
3386 be joined with the vertical-bar character @samp{|} as follows:
3422 It is customary to write a comment @samp{/* empty */} in each rule
3509 because the action for the grouping @w{@samp{@var{x} + @var{y}}} is to add
3637 useful semantic value associated with the @samp{+} token, it could be
3643 Note that the vertical-bar character @samp{|} is really a rule
3645 difference with tools like Flex, for which @samp{|} stands for either
3647 following example, the action is triggered only when @samp{b} is found:
3723 by inserting @samp{<@var{type}>} after the @samp{$} at the beginning of the
3771 in advance, so you must use the @samp{$<@dots{}>@var{n}} construct to
3780 statement that looks like @samp{let (@var{variable}) @var{statement}} and
3803 As soon as @samp{let (@var{variable})} has been recognized, the first
3811 Note that the mid-rule action is component number 5, so the @samp{stmt} is
4344 @samp{$name.suffix} as a reference to symbol value @code{$name} followed by
4345 @samp{.suffix}, i.e., an access to the @code{suffix} field of the semantic
4346 value. In order to force Bison to recognize @samp{name.suffix} in its
4348 @samp{$[name.suffix]} must be used.
4524 of the operator nest: whether @samp{@var{x} @var{op} @var{y} @var{op}
4530 means that @samp{@var{x} @var{op} @var{y} @var{op} @var{z}} is
4607 @samp{<@var{type}>} tag. For example, you can put the following into
4867 @samp{<ival>}), per-symbol (e.g., @samp{exp}, @samp{NUM}, @samp{"float"}),
4868 typed per-default (i.e., @samp{<*>}, or untyped per-default (i.e.,
4869 @samp{<>}).
4898 Finally, the parser print @samp{<>} for any symbol, such as @code{TAGLESS},
4945 Compile your grammar without @code{%expect}. Use the @samp{-v} option
5201 @code{@var{prefix}DEBUG} with @samp{%define api.prefix @var{prefix}}, see
5252 preprocessor guard: @samp{YY_@var{PREFIX}_@var{FILE}_INCLUDED}, where
5258 For instance with @samp{%define api.prefix "calc"} and @samp{%defines
5292 the grammar uses the special @samp{@@@var{n}} tokens, but if your
5293 grammar does not use it, using @samp{%locations} allows for more
5502 I.e., if @samp{%locations %define api.pure} is passed then the prototypes for
5510 But if @samp{%locations %define api.pure %parse-param @{int *nastiness@}} is
5792 can be linked together too. Specifying @samp{%define api.prefix
5793 @var{prefix}} (or passing the option @samp{-Dapi.prefix=@var{prefix}}, see
5796 @samp{yy}, and all the macros to start by @var{PREFIX} (i.e., @var{prefix}
5797 upper-cased) instead of @samp{YY}.
5807 For example, if you use @samp{%define api.prefix c}, the names become
5875 @samp{yy} and @samp{YY} for internal purposes. If you use such an
6071 available there. To do this, use the @samp{-d} option when you run
6150 characters like @samp{"} that require escaping.
6220 If you are using the @samp{@@@var{n}}-feature (@pxref{Tracking Locations})
6258 If the grammar file does not use the @samp{@@} constructs to refer to
6433 a message @samp{cannot back up} and performs ordinary error
6453 the @samp{YYERROR;} statement. @xref{Error Recovery}.
6517 @c use @samp{@@3.first_line}.
6547 For example, the shell command @samp{export LC_ALL=fr_CA.UTF-8} might
6563 @samp{share/aclocal/bison-i18n.m4} in Bison's installation directory.
6577 causes @samp{configure} to find the value of the
6585 @samp{bindtextdomain} with domain name @samp{bison-runtime}.
6594 @samp{BISON_LOCALEDIR} to be defined as a string through the
6599 function, make @samp{BISON_LOCALEDIR} available as a C preprocessor macro,
6600 either in @samp{DEFS} or in @samp{AM_CPPFLAGS}. For example:
6631 For example, suppose the infix calculator has read @samp{1 + 5 *}, with a
6632 @samp{3} to come. The stack will have four elements, one for each token
6708 factorial operators (@samp{!}), and allow parentheses for grouping.
6727 Suppose that the tokens @w{@samp{1 + 2}} have been read and shifted; what
6728 should be done? If the following token is @samp{)}, then the first three
6730 course, because shifting the @samp{)} would produce a sequence of symbols
6733 If the following token is @samp{!}, then it must be shifted immediately so
6734 that @w{@samp{2 !}} can be reduced to make a @code{term}. If instead the
6735 parser were to reduce before shifting, @w{@samp{1 + 2}} would become an
6736 @code{expr}. It would then be impossible to shift the @samp{!} because
6818 recommend the use of @code{%expect} (except @samp{%expect 0}!), as an equal
6874 input @w{@samp{1 - 2 * 3}} can be parsed in two different ways):
6889 Suppose the parser has seen the tokens @samp{1}, @samp{-} and @samp{2};
6891 depends on the next token. Of course, if the next token is @samp{)}, we
6893 token sequence @w{@samp{- 2 )}} or anything starting with that. But if
6894 the next token is @samp{*} or @samp{<}, we have a choice: either
6901 The result is (in effect) @w{@samp{1 - (2 @var{op} 3)}}. On the other
6903 is @w{@samp{(1 - 2) @var{op} 3}}. Clearly, then, the choice of shift or
6905 @samp{-} and @var{op}: @samp{*} should be shifted first, but not
6906 @samp{<}.
6909 What about input such as @w{@samp{1 - 2 - 5}}; should this be
6910 @w{@samp{(1 - 2) - 5}} or should it be @w{@samp{1 - (2 - 5)}}? For most
6915 contains @w{@samp{1 - 2}} and the lookahead token is @samp{-}: shifting
6975 precedence level. The verbose output file made by @samp{-v}
6991 to be shifted, and the rule @samp{if_stmt: "if" expr "then" stmt}, asking
7016 of (e.g., a shift/reduce conflict due to @samp{if test then 1 else 2 + 3}
7017 being ambiguous: @samp{if test then 1 else (2 + 3)} or @samp{(if test then 1
7265 @samp{word word} can be parsed as a single @code{words} composed of two
7266 @samp{word}s, or as two one-@code{word} @code{words} (and likewise for
7275 @code{"word"} and the rule @samp{sequence: sequence words} must be resolved
7852 When you use the @samp{%glr-parser} declaration in your grammar file,
7886 has the highest dynamic precedence, as set by the @samp{%dprec}
7889 rules by the @samp{%merge} declaration,
8069 @samp{yyerrok;} is a valid C statement.
8074 this token. Write the statement @samp{yyclearin;} in the error rule's
8082 with @samp{yyclearin;}.
8201 construct @samp{hex (@var{hex-expr})}. After the keyword @code{hex} comes
8203 particular, the token @samp{a1b} must be treated as an integer rather than
8265 If there is a syntax error in the middle of a @samp{hex (@var{expr})}
8267 completed @samp{hex (@var{expr})} will never run. So @code{hexflag} would
8345 Bison}. Its name is made by removing @samp{.tab.c} or @samp{.c} from
8346 the parser implementation file name, and adding @samp{.output}
8469 item is a production rule together with a point (@samp{.}) marking
8529 the rule 5, @samp{exp: NUM;}, is completed. Whatever the lookahead token
8530 (@samp{$default}), the parser will reduce it. If it was coming from
8532 jump to state 2 (@samp{exp: go to state 2}).
8552 because of the item @samp{exp: exp . '+' exp}, if the lookahead is
8553 @samp{+} it is shifted onto the parse stack, and the automaton
8554 jumps to state 4, corresponding to the item @samp{exp: exp '+' . exp}.
8614 As was announced in beginning of the report, @samp{State 8 conflicts:
8633 Indeed, there are two actions associated to the lookahead @samp{/}:
8637 ambiguous, as, since we did not specify the precedence of @samp{/}, the
8638 sentence @samp{NUM + NUM / NUM} can be parsed as @samp{NUM + (NUM /
8639 NUM)}, which corresponds to shifting @samp{/}, or as @samp{(NUM + NUM) /
8652 one such state: if the lookahead is @samp{*} or @samp{/} then the action
8655 lookahead token is @samp{*}, since we specified that @samp{*} has higher
8656 precedence than @samp{+}. More generally, some items are eligible only
8676 Note however that while @samp{NUM + NUM / NUM} is ambiguous (which results in
8677 the conflicts on @samp{/}), @samp{NUM + NUM * NUM} is not: the conflict was
8747 precedence of @samp{/} with respect to @samp{+}, @samp{-}, and @samp{*}, but
8748 also because the associativity of @samp{/} is not specified.
8769 @samp{.tab.c} or @samp{.c} from the parser implementation file name, and
8770 adding @samp{.dot} instead. If the grammar file is @file{foo.y}, the
8870 The @samp{go to} jump transitions are represented as dotted lines bearing
8893 If not specified, its name is made by removing @samp{.tab.c} or @samp{.c}
8894 from the parser implementation file name, and adding @samp{.xml} instead.
8905 Used to output a copy of the @samp{.output} file.
8907 Used to output an xhtml enhancement of the @samp{.output} file.
8946 @samp{-DYYDEBUG=1} as a compiler option or you could put @samp{#define
8951 Parsers, ,Multiple Parsers in the Same Program}), for instance @samp{%define
8958 Use the @samp{-t} option when you run Bison (@pxref{Invocation, ,Invoking
8959 Bison}). With @samp{%define api.prefix c}, it defines @code{CDEBUG} to 1,
8962 @item the directive @samp{%debug}
9077 a valueless (@samp{()}) @code{input} non terminal (@code{nterm}).
9088 @samp{sin} as formatted per our @code{%printer} specification: @samp{sin()}.
9109 @code{exp} have @samp{1} as value.
9242 @samp{.y}. The parser implementation file's name is made by replacing
9243 the @samp{.y} with @samp{.tab.c} and removing any leading directory.
9244 Thus, the @samp{bison foo.y} file name yields @file{foo.tab.c}, and
9245 the @samp{bison hack/foo.y} file name yields @file{foo.tab.c}. It's
9251 @samp{-o} or @samp{-d}.
9282 option names. Long option names are indicated with @samp{--} instead of
9283 @samp{-}. Abbreviations for option names are allowed as long as they
9285 @samp{--file-prefix}, connect the option name and the argument with
9286 @samp{=}.
9330 like @samp{%glr-parser}, Bison might not be Yacc-compatible even if
9384 A category can be turned off by prefixing its name with @samp{no-}. For
9453 Each of these is equivalent to @samp{%define @var{name} "@var{value}"}
9586 described under the @samp{-v} and @samp{-d} options.
9673 @samp{%skeleton "lalr1.cc"}, or the synonymous command-line option
9677 When run, @command{bison} will create several entities in the @samp{yy}
9680 Use the @samp{%define namespace} directive to change the namespace
9696 (Assuming the extension of the grammar file was @samp{.yy}.) The
9703 @samp{%defines} directive.
9779 feature you may change it to @samp{@var{type}*} using @samp{%define
9813 @samp{@var{file}:@var{line}.@var{column}}, or
9814 @samp{@var{line}.@var{column}} if @var{file} is null.
9895 if traces are enabled, then there must exist an @samp{std::ostream&
9932 @samp{%define parser_class_name "@var{name}"}. The interface of
9947 @samp{typedef yy::parser::token token;} to ``import'' the token enumeration
9953 @samp{%parse-param @{@var{type1} @var{arg1}@}} was used.
9997 @samp{%lex-param @{@var{type1} @var{arg1}@}} yield additional arguments.
10275 The code between @samp{%code @{} and @samp{@}} is output in the
10918 @samp{%define stype}. Angle brackets on @code{%token}, @code{type},
11124 My parser returns with error with a @samp{memory exhausted}
11147 My parser includes support for an @samp{#include}-like feature, in
11149 although I did specify @samp{%define api.pure full}.
11225 @samp{YY_FLUSH_BUFFER} after each change to @code{yyin}. If your
11228 functions like @samp{yy_switch_to_buffer} that manipulate multiple
11234 start condition, through a call to @samp{BEGIN (0)}.
11241 them. Instead of reporting @samp{"foo", "bar"}, it reports
11242 @samp{"bar", "bar"}, or even @samp{"foo\nbar", "bar"}.
11291 option @samp{%array}) Flex generates a different behavior:
11360 simple means to do it: recall that anything between @samp{%@{ ... %@}}
11555 All code listed between @samp{%@{} and @samp{%@}} is copied verbatim
11603 The predefined nonterminal whose only rule is @samp{$accept: @var{start}
11621 Assign a precedence to rules that lack an explicit @samp{%prec}
11717 that they start with @var{prefix} instead of @samp{yy}. Contrary to
11725 example, if you use @samp{%name-prefix "c_"}, the names become
11733 Do not assign a precedence to rules that lack an explicit @samp{%prec}
11874 the @samp{YYERROR;} statement. @xref{Error Recovery}.
11923 You can ignore this variable if you don't use the @samp{@@} feature in the
12137 @samp{a+b+c} first computes @samp{a+b} and then combines with
12138 @samp{c}. @xref{Precedence, ,Operator Precedence}.
12142 example, @samp{expseq1 : expseq1 ',' exp;}. @xref{Recursion, ,Recursive
12202 example, @samp{expseq1: exp ',' expseq1;}. @xref{Recursion, ,Recursive
12308 @c LocalWords: yyerror pxref LR yylval cindex dfn LALR samp gpl BNF xref yypush