[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: <?= handling in php grammar



The PHP parser comes with a custom lexer that takes care
of this kind of problems. See my homepage at
http://www.mare.ee/indrek/sablecc/

Regards,
Indrek

On Wednesday 25 February 2004 05:18, Anil T Samuel wrote:
> Hi Indrek
>
> Strings like
>
> echo "Hello";
>
> was not being accepted with the grammar you sent me; but
>
> echo 'Hello';
>
> was ok.
>
> So I modified the static_string as below
>
> {code} static_string = ''' ([all - ['\' + ''']] | '\' all)*  ''' | '"'
> ([all - ['\' + '"']] | '\' all)*  '"'; /* '4vim */
>
> This modification may not be the best; but works.
>
> Any comments ?
>
> Ta,
> Anthos