[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to read an understand the bison report file ?
From: |
Hans Aberg |
Subject: |
Re: How to read an understand the bison report file ? |
Date: |
Wed, 27 Jun 2012 15:22:46 +0200 |
On 27 Jun 2012, at 13:26, Timothy Madden wrote:
>> Either you need to completely change the way you handle the
>> spaces/comments, or you have to use GLR, as Hans suggested.
>
> I would hate to find that I have to push all whitespace/comments into the
> content (semantic value) of the lexer tokens, so the grammar does not get to
> see it.
As Vincent pointed out, the normal way is to strip whitespace and comments in
the lexer, only retaining it in the cases it would be needed in actions.
Grammars are typically written so this is possible.
Searching for "php yacc grammar" gave several hits, including one saying that
this compiler uses a Yacc, that is, LALR(1), grammar:
http://www.phpcompiler.org/
Hans
- How to read an understand the bison report file ?, Timothy Madden, 2012/06/26
- Re: How to read an understand the bison report file ?, Hans Aberg, 2012/06/26
- Re: How to read an understand the bison report file ?, Akim Demaille, 2012/06/27
- Re: How to read an understand the bison report file ?, Akim Demaille, 2012/06/27
- Re: How to read an understand the bison report file ?, Timothy Madden, 2012/06/27
- Re: How to read an understand the bison report file ?, Vincent Zweije, 2012/06/27
- Re: How to read an understand the bison report file ?,
Hans Aberg <=
- Re: How to read an understand the bison report file ?, Akim Demaille, 2012/06/28
- Re: How to read an understand the bison report file ?, Timothy Madden, 2012/06/28
- Re: How to read an understand the bison report file ?, Akim Demaille, 2012/06/28
- Re: How to read and understand the bison report file ?, Timothy Madden, 2012/06/28
- Re: How to read and understand the bison report file ?, Akim Demaille, 2012/06/28