mirror of https://github.com/tLDP/LDP
Fix typos
This commit is contained in:
parent
1cfb6ff48c
commit
ae86c97ea6
|
@ -422,7 +422,7 @@ output the message passed, but there are smarter things to do. See
|
|||
the 'Further reading' section at the end.
|
||||
|
||||
The function yywrap() can be used to continue reading from another file. It
|
||||
is called at EOF and you can than open another file, and return 0. Or you
|
||||
is called at EOF and you can then open another file, and return 0. Or you
|
||||
can return 1, indicating that this is truly the end. For more about this,
|
||||
see the 'How do Lex and YACC work internally' chapter.
|
||||
|
||||
|
@ -934,7 +934,7 @@ and integers - but not simultaneously.
|
|||
|
||||
Remember that we told YACC previously what type yylval was supposed to be by
|
||||
defining YYSTYPE. We could conceivably define YYSTYPE to be a union this
|
||||
way, by YACC has an easier method for doing this: the %union statement.
|
||||
way, but YACC has an easier method for doing this: the %union statement.
|
||||
|
||||
Based on Example 4, we now write the Example 7 YACC grammar. First the
|
||||
intro:
|
||||
|
@ -975,7 +975,7 @@ heat return TOKHEAT;
|
|||
on|off yylval.number=!strcmp(yytext,"on"); return STATE;
|
||||
target return TOKTARGET;
|
||||
temperature return TOKTEMPERATURE;
|
||||
[a-z0-9]+ yylval.string=strdup(yytext);return WORD;
|
||||
[a-z0-9]+ yylval.string=strdup(yytext); return WORD;
|
||||
\n /* ignore end of line */;
|
||||
[ \t]+ /* ignore whitespace */;
|
||||
%%
|
||||
|
|
Loading…
Reference in New Issue