Re: parse last line
Tue, 21 Feb 1995 18:50:52 GMT

          From comp.compilers

Related articles
parse last line (Aaron Wohl) (1995-02-17)
Re: parse last line (Zerksis D. Umrigar) (1995-02-21)
Re: parse last line (1995-02-21)
| List of all articles for this month |

Newsgroups: comp.compilers
Keywords: lex, parse
Organization: Texas Instruments
References: 95-02-134
Date: Tue, 21 Feb 1995 18:50:52 GMT

<> writes:
> How do folks handle parsing the last line of input?
> I am using lex/yacc for a new compiler for an obscure basic dialect
> that up until now has only been interpreted. It is fairly common
> for the basic programs to not have and end of line character on the
> last line. My grammar looks like:


Change your grammar to make EOL a statement separator instead of a
statement ender.


    | stmtlist EOL stmt


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.