/[bison]/bison/doc/bison.texinfo
ViewVC logotype

Diff of /bison/doc/bison.texinfo

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.73 by eggert, Wed Oct 23 05:26:32 2002 UTC revision 1.74 by eggert, Sun Nov 3 08:40:39 2002 UTC
# Line 2212  appropriate delimiters: Line 2212  appropriate delimiters:
2212  @end example  @end example
2213    
2214  Comments enclosed in @samp{/* @dots{} */} may appear in any of the sections.  Comments enclosed in @samp{/* @dots{} */} may appear in any of the sections.
2215    As a @acronym{GNU} extension, @samp{//} introduces a comment that
2216    continues until end of line.
2217    
2218  @menu  @menu
2219  * Prologue::          Syntax and usage of the prologue.  * Prologue::          Syntax and usage of the prologue.
# Line 2360  All the usual escape sequences used in c Line 2362  All the usual escape sequences used in c
2362  used in Bison as well, but you must not use the null character as a  used in Bison as well, but you must not use the null character as a
2363  character literal because its numeric code, zero, signifies  character literal because its numeric code, zero, signifies
2364  end-of-input (@pxref{Calling Convention, ,Calling Convention  end-of-input (@pxref{Calling Convention, ,Calling Convention
2365  for @code{yylex}}).  for @code{yylex}}).  Also, unlike standard C, trigraphs have no
2366    special meaning in Bison character literals, nor is backslash-newline
2367    allowed.
2368    
2369  @item  @item
2370  @cindex string token  @cindex string token
# Line 2387  does not enforce this convention, but if Line 2391  does not enforce this convention, but if
2391  read your program will be confused.  read your program will be confused.
2392    
2393  All the escape sequences used in string literals in C can be used in  All the escape sequences used in string literals in C can be used in
2394  Bison as well.  A literal string token must contain two or more  Bison as well.  However, unlike Standard C, trigraphs have no special
2395  characters; for a token containing just one character, use a character  meaning in Bison string literals, nor is backslash-newline allowed.  A
2396  token (see above).  literal string token must contain two or more characters; for a token
2397    containing just one character, use a character token (see above).
2398  @end itemize  @end itemize
2399    
2400  How you choose to write a terminal symbol has no effect on its  How you choose to write a terminal symbol has no effect on its
# Line 2691  is to compute a semantic value for the g Line 2696  is to compute a semantic value for the g
2696  semantic values associated with tokens or smaller groupings.  semantic values associated with tokens or smaller groupings.
2697    
2698  An action consists of C statements surrounded by braces, much like a  An action consists of C statements surrounded by braces, much like a
2699  compound statement in C@.  It can be placed at any position in the rule;  compound statement in C@.  An action can contain any sequence of C
2700    statements.  Bison does not look for trigraphs, though, so if your C
2701    code uses trigraphs you should ensure that they do not affect the
2702    nesting of braces or the boundaries of comments, strings, or character
2703    literals.
2704    
2705    An action can be placed at any position in the rule;
2706  it is executed at that position.  Most rules have just one action at the  it is executed at that position.  Most rules have just one action at the
2707  end of the rule, following all the components.  Actions in the middle of  end of the rule, following all the components.  Actions in the middle of
2708  a rule are tricky and used only for special purposes (@pxref{Mid-Rule  a rule are tricky and used only for special purposes (@pxref{Mid-Rule

Legend:
Removed from v.1.73  
changed lines
  Added in v.1.74

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26