If you are considering using a parser generator, you might want to look at SableCC (sablecc.org), if you havent' already. I used it in a project a long time ago and the most difficult part of using it was defining the grammar :)
After shopping around (very briefly) for parser generators we settled on SableCC for the following reasons. - Very intuitive to use compared to other parser generators - Object oriented (based on the Visitor pattern) - No runtime dependencies on any parser generator libraries Disclaimer: I should mention that all the above info is based on the work we did with SableCC around 5 years ago. The parser generator landscape has probably (surely?) changed a lot since them. If you decide to use it and require any help I can try and brush up my rustic SableCC knowledge. :) - Akbar On 7/19/06, Tim Fennell <[EMAIL PROTECTED]> wrote: > The problem is that I really need a lot more flexibility than the JSP > 2.0 EL gives. I need to be able to do things like: > - traverse the expression and get the type of each node > - be able to decompose the expression into nodes, so that I can > manipulate Lists/Maps with generics correctly > - set values using the expression(!) > - set values, and correctly instantiate null intermediate values > > While I'd like to keep the syntax the same as the EL (and subset of > OGNL that Stripes uses/promotes), what I think I really need is a > expression parser that then lets me work with the expression... > > -t > > On Jul 19, 2006, at 1:35 PM, Aaron Porter wrote: > > > Tim Fennell wrote: > >> Hey, > >> > >> Does anyone on this list have experience writing parsers in Java? To > >> give a little background to that question, I'm considering (and have > >> ... > >> > >> In fact it'd probably just be a subset of the new Unified EL grammar > >> to be consistent. Anyone have good suggestions on the easiest way to > >> create a parser for an EL? > >> > >> -t > >> > > Tim, > > Why not just use the built in EL parser? If I remember correctly, > > when I > > was looking into it for expression validation it looked trivial to use > > your own context. You'd just have to create a VariableResolver to pass > > into ExpressionEvaluator.evaluate(). It looks like the > > VariableResolver > > receives an identifier and returns an Object. > > > > Aaron > > > > ---------------------------------------------------------------------- > > --- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to > > share your > > opinions on IT & business topics through brief surveys -- and earn > > cash > > http://www.techsay.com/default.php? > > page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > > Stripes-development mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/stripes-development > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Stripes-development mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/stripes-development > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Stripes-development mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-development
