bison-patches
[Top][All Lists]
Advanced

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

Re: PHP support


From: Akim Demaille
Subject: Re: PHP support
Date: Tue, 22 Nov 2011 11:40:37 +0100

Le 30 oct. 2011 à 03:25, Tim Landscheidt a écrit :

> Hi,

Hi Tim,

> I hope this list is the right place for this.
> 
>  In the past few weeks, I started working on "%language
> PHP". You can browse the code at
> <URI:https://github.com/scfc/bison-php> (bison's "master" is
> "upstream").

I am very curious about this.  Are you really wanting to _use_ a Bison parser 
in PHP?  Or is this some kind of experimental toy project?  Unfortunately the 
current maintainers don't spend a lot of time on Bison, and features that might 
never be maintained will finish by hindering the development of the whole 
project.

>   But the second "is" should be a "$is". I tried some
>   variants of "$$" and patsubst at different places, but
>   unfortunately, m4's levels of quoting have always exceed-
>   ed my imagination :-).

Bison is not ready for this, not at all.  The easiest would be to post-process 
the result as use some kind of new quadrigraph to denote $, say @S|@ :)

Autoconf uses this:

      s/\@<:\@/[/g;
      s/\@:>\@/]/g;
      s/address@hidden:\@/(/g;
      s/\@:\}\@/)/g;
      s/address@hidden|\@/\$/g;
      s/address@hidden:\@/#/g;
      s/\@&t\@//g;

A cleaner design requires more thinking.


reply via email to

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