>>> "David PONCE" <David.Ponce@...> seems to think that:
>Eric,
>
>> I was trying to port gcc's parse.y c++ grammar to wisent the other
>> night, and quickly noticed the repetitive nature of the task.
>
>Probably a big task, but a great addition to Semantic ;-)
Yea, but at least I won't have bug reports about unsupported syntax
anymore. ;)
>> I think I'd like to set about writing a translator to handle this 4000
>> line file. The comments and C code are obvious. Is there a
>> documented list of differences between wisent and yacc?
>
>The Wisent's manual just says:
>
>"The WY grammar format is very close to the format used to describe a
>Bison's grammar. The main differences are:
>
> * The use of Emacs Lisp syntax in place of C like syntax.
> * Semantic specific Percent-keywords."
>
>More precisely there are some Bison percent keywords (like %type,
>%union, etc.) that are not supported. The manual just shows what of
>them are valid (via the grammar specification).
Good to know.
>> Should I write a wisent mode for yacc (that knows about the C code)
>> and use that to translate into wisent? That sounds like fun too.
>
>Perhaps a simple command based on `c-mode' stuff (used for yacc
>grammars), and some nice regexps would be easier to implement? It
>would do the main conversion tasks:
>
>- converts comments;
>- remove C code (what is inside braces?);
>- removes or comments out unrecognized percent syntax;
>- add templates for required percent keywords.
>
>Just to get a clean .WY format ready to be adapted to Semantic.
[ ... ]
This is what I was thinking also, but wasn't sure if there were an
advantage to using wisent to do it.
I'll let you know how it goes.
Eric
--
Eric Ludlam: zappo@..., eric@...
Home: http://www.ludlam.net Siege: http://www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: http://www.gnu.org
|