This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A generic reader for Guile?


On Thu, 8 Jul 1999, Telford Tendys wrote:
> Yup, the table is just token numbers and states. A few points though...
> the .y file that is used as input has sections for code as well as
> grammer rules, I'm not sure if scheme code will be digested through
> that, maybe some place-holder C code can go in and then get scraped
> back out on the back end. Also, for scheme nicity the tokens should
> be symbols rather than numbers (well it doesn't really matter I guess).

    Yeah, I don't think bison would deal well with scheme code in the
actions. The parser/lexer are hand written, and (despite the manual) does
make some checks on the validity of the C code.  I can't remember exactly what
they were, but I'm pretty sure it was more than simply balancing brackets
etc.
    Basically, I was thinking what you were talking about - just use the
no-parser option and have it put out the tables.  

> A lot of the outputs are always formatted in C code <shrug> you probably
> already know that. More munging to go on the backend.
> 
   The actions are just stuck in a big switch statement.  If bison had a
clean parser, it probably wouldn't be that big of a deal to pop have it
write out to different language skeletons.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]