From: <man...@il...> - 2004-05-26 15:42:29
|
Le mercredi 26 Mai 2004 16:59, Lars Hecking a =E9crit : > > My question is: do you think it could be possible to get the C parser > > used in the source of gnuplot, run swig on it, add some little code > > around, and get a usable parser ? I mean, is the C parser of gnuplot > > store the result of a command line in a structure which can be used > > easily ? > > The gnuplot parser is essentially a full-custom job, and it's spread > across several source files. E.g. every single .trm file has its own > parser for terminal options, and in general every source module has its > own parser for the options it provides. > > A number of years ago, I started to move towards a table-driven parser, > but got stuck somewhere along the line (the plot command is > particularily nasty in this regard ...). > > What I would like to have is a lex/yacc based scanner/parser for > gnuplot. This would allow to put it into its own module, and let other > apps use it. But I think no-one here has the skills to write one. Well, I was afraid to get such an answer :o( You're right, lex/yacc could be the solution, but really need someone=20 speaking this strange language instead of english ;o) Anyway, thank you very much for you help, =2D-=20 Fr=E9d=E9ric |