bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

doc: stmt, not stmnt


From: Akim Demaille
Subject: doc: stmt, not stmnt
Date: Fri, 16 Mar 2012 14:40:31 +0100

Will install, unless someone is unhappy with it.
An internet quick survey shows that stmt is more
common than stmnt, and it was already used in other
places in bison.texinfo.

Pushed in next.

From 3b0274f014ce5e13ac55c16bdaca45c99dd823d0 Mon Sep 17 00:00:00 2001
From: Akim Demaille <address@hidden>
Date: Fri, 16 Mar 2012 14:31:44 +0100
Subject: [PATCH 3/3] doc: stmt, not stmnt.

* doc/bison.texinfo: s/stmnt/stmt/g.  This is a
much more common abbreviation for "statement".
---
 doc/bison.texinfo |   26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/doc/bison.texinfo b/doc/bison.texinfo
index d71f1cc..fbe586b 100644
--- a/doc/bison.texinfo
+++ b/doc/bison.texinfo
@@ -8074,21 +8074,21 @@ in the current context, the parse can continue.
 For example:
 
 @example
-stmnts:
+stmts:
   /* empty string */
-| stmnts '\n'
-| stmnts exp '\n'
-| stmnts error '\n'
+| stmts '\n'
+| stmts exp '\n'
+| stmts error '\n'
 @end example
 
 The fourth rule in this example says that an error followed by a newline
-makes a valid addition to any @code{stmnts}.
+makes a valid addition to any @code{stmts}.
 
 What happens if a syntax error occurs in the middle of an @code{exp}?  The
 error recovery rule, interpreted strictly, applies to the precise sequence
-of a @code{stmnts}, an @code{error} and a newline.  If an error occurs in
+of a @code{stmts}, an @code{error} and a newline.  If an error occurs in
 the middle of an @code{exp}, there will probably be some additional tokens
-and subexpressions on the stack after the last @code{stmnts}, and there
+and subexpressions on the stack after the last @code{stmts}, and there
 will be tokens to read before the next newline.  So the rule is not
 applicable in the ordinary way.
 
@@ -8096,7 +8096,7 @@ But Bison can force the situation to fit the rule, by 
discarding part of
 the semantic context and part of the input.  First it discards states
 and objects from the stack until it gets back to a state in which the
 @code{error} token is acceptable.  (This means that the subexpressions
-already parsed are discarded, back to the last complete @code{stmnts}.)
+already parsed are discarded, back to the last complete @code{stmts}.)
 At this point the @code{error} token can be shifted.  Then, if the old
 lookahead token is not acceptable to be shifted next, the parser reads
 tokens and discards them until it finds a token which is acceptable.  In
@@ -8110,7 +8110,7 @@ error recovery.  A simple and useful strategy is simply 
to skip the rest of
 the current input line or current statement if an error is detected:
 
 @example
-stmnt: error ';'  /* On error, skip until ';' is read.  */
+stmt: error ';'  /* On error, skip until ';' is read.  */
 @end example
 
 It is also useful to recover to the matching close-delimiter of an
@@ -8129,11 +8129,11 @@ primary:
 Error recovery strategies are necessarily guesses.  When they guess wrong,
 one syntax error often leads to another.  In the above example, the error
 recovery rule guesses that an error is due to bad input within one
address@hidden  Suppose that instead a spurious semicolon is inserted in the
-middle of a valid @code{stmnt}.  After the error recovery rule recovers
address@hidden  Suppose that instead a spurious semicolon is inserted in the
+middle of a valid @code{stmt}.  After the error recovery rule recovers
 from the first error, another syntax error will be found straightaway,
 since the text following the spurious semicolon is also an invalid
address@hidden
address@hidden
 
 To prevent an outpouring of error messages, the parser will output no error
 message for another syntax error that happens shortly after the first; only
@@ -12147,7 +12147,7 @@ London, Department of Computer Science, TR-00-12 
(December 2000).
 @c LocalWords: strncmp intval tindex lvalp locp llocp typealt YYBACKUP subrange
 @c LocalWords: YYEMPTY YYEOF YYRECOVERING yyclearin GE def UMINUS maybeword loc
 @c LocalWords: Johnstone Shamsa Sadaf Hussain Tomita TR uref YYMAXDEPTH inline
address@hidden LocalWords: YYINITDEPTH stmnts ref stmnt initdcl maybeasm notype 
Lookahead
address@hidden LocalWords: YYINITDEPTH stmts ref initdcl maybeasm notype 
Lookahead
 @c LocalWords: hexflag STR exdent itemset asis DYYDEBUG YYFPRINTF args Autoconf
 @c LocalWords: infile ypp yxx outfile itemx tex leaderfill Troubleshouting sqrt
 @c LocalWords: hbox hss hfill tt ly yyin fopen fclose ofirst gcc ll lookahead
-- 
1.7.9.2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]