diff options
Diffstat (limited to 'tools/lemon/lempar.c')
-rw-r--r-- | tools/lemon/lempar.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tools/lemon/lempar.c b/tools/lemon/lempar.c index 9c3b8e61ff..03e1722a17 100644 --- a/tools/lemon/lempar.c +++ b/tools/lemon/lempar.c @@ -5,12 +5,12 @@ ** modify it under the terms of the GNU Library General Public ** License as published by the Free Software Foundation; either ** version 2 of the License, or (at your option) any later version. -** +** ** This library is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ** Library General Public License for more details. -** +** ** You should have received a copy of the GNU Library General Public ** License along with this library; if not, write to the ** Free Software Foundation, Inc., 59 Temple Place - Suite 330, @@ -25,10 +25,10 @@ /* Next is all token values, in a form suitable for use by makeheaders. ** This section will be null unless lemon is run with the -m switch. */ -/* +/* ** These constants (all generated automatically by the parser generator) ** specify the various kinds of tokens (terminals) that the parser -** understands. +** understands. ** ** Each symbol here is a terminal symbol in the grammar. */ @@ -46,13 +46,13 @@ ** and nonterminals. "int" is used otherwise. ** YYNOCODE is a number of type YYCODETYPE which corresponds ** to no legal terminal or nonterminal number. This -** number is used to fill in empty slots of the hash +** number is used to fill in empty slots of the hash ** table. ** YYACTIONTYPE is the data type used for storing terminal ** and nonterminal numbers. "unsigned char" is ** used if there are fewer than 250 rules and ** states combined. "int" is used otherwise. -** ParseTOKENTYPE is the data type used for minor tokens given +** ParseTOKENTYPE is the data type used for minor tokens given ** directly to the parser from the tokenizer. ** YYMINORTYPE is the data type used for all minor tokens. ** This is typically a union of many types, one of @@ -107,7 +107,7 @@ static struct yyActionEntry yyActionTable[] = { ** + A pointer to the start of the action hash table in yyActionTable. ** ** + A mask used to hash the look-ahead token. The mask is an integer -** which is one less than the size of the hash table. +** which is one less than the size of the hash table. ** ** + The default action. This is the action to take if no entry for ** the given look-ahead is found in the action hash table. @@ -156,10 +156,10 @@ typedef struct yyParser yyParser; static FILE *yyTraceFILE = 0; static char *yyTracePrompt = 0; -/* +/* ** Turn parser tracing on by giving a stream to which to write the trace ** and a prompt to preface each trace message. Tracing is turned off -** by making either argument NULL +** by making either argument NULL ** ** Inputs: ** <ul> @@ -182,7 +182,7 @@ void ParseTrace(FILE *TraceFILE, char *zTracePrompt){ /* For tracing shifts, the names of all terminals and nonterminals ** are required. The following table supplies these names */ -static char *yyTokenName[] = { +static char *yyTokenName[] = { %% }; #define YYTRACE(X) if( yyTraceFILE ) fprintf(yyTraceFILE,"%sReduce [%s].\n",yyTracePrompt,X); @@ -190,7 +190,7 @@ static char *yyTokenName[] = { #define YYTRACE(X) #endif -/* +/* ** This function allocates a new parser. ** The only argument is a pointer to a function which works like ** malloc. @@ -221,7 +221,7 @@ static void yy_destructor(YYCODETYPE yymajor, YYMINORTYPE *yypminor){ /* Here is inserted the actions which take place when a ** terminal or non-terminal is destroyed. This can happen ** when the symbol is popped from the stack during a - ** reduce or during error processing or when a parser is + ** reduce or during error processing or when a parser is ** being destroyed before it is finished parsing. ** ** Note: during a reduce, the only symbols destroyed are those @@ -259,7 +259,7 @@ static int yy_pop_parser_stack(yyParser *pParser){ return yymajor; } -/* +/* ** Deallocate and destroy a parser. Destructors are all called for ** all stack elements before shutting the parser down. ** @@ -294,7 +294,7 @@ static int yy_find_parser_action( ){ struct yyStateEntry *pState; /* Appropriate entry in the state table */ struct yyActionEntry *pAction; /* Action appropriate for the look-ahead */ - + /* if( pParser->idx<0 ) return YY_NO_ACTION; */ pState = &yyStateTable[pParser->top->stateno]; if( iLookAhead!=YYNOCODE ){ @@ -520,7 +520,7 @@ void Parse( #ifdef YYERRORSYMBOL /* A syntax error has occurred. ** The response to an error depends upon whether or not the - ** grammar defines an error token "ERROR". + ** grammar defines an error token "ERROR". ** ** This is what we do if the grammar does define ERROR: ** |