On Monday 31 March 2008 12:59, Angel Ramos wrote: > Good day everyone: > I am Angel Ramos, student of electronics systems engineering > (almost graduated) in the ITESM campus Querétaro, México. I propose > for the translation issue to do a lexic(token analizer), sintactic > (parser), and semantic analysis to the source format in order to > translate it to the target format. > For the lexic analyzer I could use lex, or implement it > manually; for the parser yacc could be used or I could implement a > SLR parser manuall; finally I propose doing the semantic analysis > manually. For the whole process both grammars must be defined > correctly, > I think there's enough time to complete a couple translators, or > as many as I could. I'd love to know what you think of my proposal. > Thanks.
What we need is not a specific translator, but a system that goes both directions. We have "gnetlist" which has plugins in guile, but it only translates from gschem out. The lex and yacc approach doesn't work here because the formats being translated do not all conform to the rules imposed by lex and yacc. The formats are what they are, and cannot be changed. The translation could be worthless if it doesn't support the full language. I have done language plugins for gnucap, which mainly focus on import, and have also done some proof-of-concept hacks to show that this is a good way to go. What we need is a driver program that lets you plug both input and output formats, and the plugins for some of the important formats. If you do it the way I hope, it will not be tied to any program in particular, but provide a library that can be used by any program. _______________________________________________ geda-dev mailing list [email protected] http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev
