help-bison
[Top][All Lists]
Advanced

[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





reply via email to

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