[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DotGNU]A design for comment , dfa2c# ?
From: |
Gopal V |
Subject: |
Re: [DotGNU]A design for comment , dfa2c# ? |
Date: |
Wed, 21 May 2003 03:12:26 +0530 |
User-agent: |
Mutt/1.2.5i |
If memory serves me right, Gopal V wrote:
> %state START
> : '<' --> opening_tag
> | alphanum --> text
> | '&' --> entity
> | NONE --> empty
> | OTHER --> error
> ;
A first cut program has been placed in
http://symonds.net/~gopalv82/code/dfagen.tgz
Untar into Portable.net dir , patch < makefiles.patch , ./auto_gen.sh
reconfigure & make
Does generate working code , though beauty wise .. I could do far
better ... And the command line parts segfault when given no params
etc... it's a 3:15 AM status snapshot ... be gentle :-)
It does include a bit of error checking and optimisations ..
like, unconnected nodes are not generated, overlapping transitions
are invalid ..
so
%state X : [a-zA-Z] --> alpha | a --> apple; is illegal
And any inline code between the the %start and the last entry of the
language will be rearranged ... some of the features of the convertor
is hard coded ... at least for now.
All the codegen functions are printf's , so anybody capable of printing
out C# code can hack this ... in short beautify this beast ... :-)
off to sleep now !,
Gopal
--
The difference between insanity and genius is measured by success