[e-lang] Starting point for a new quasi-parser?

Kevin Reid kpreid at mac.com
Mon Oct 22 23:20:44 EDT 2007


On Oct 22, 2007, at 18:58, ihab.awad at gmail.com wrote:

> Hi folks,
>
> We would like to build a quasi-parser using E-on-Java to handle  
> Javascript so we can use this for prototyping the next version of  
> the Google Caja Javascript rewriter.

Yay. It seems to me that E has been rather short on *users* lately.  
As an implementor, I encourage you to speak up about what you notice  
as you use it.

> What is the shortest way to get to a working quasi-parser? We have  
> the E code running in the debugger and we notice the material in  
> org.quasiliteral.term uses YACC. Is there a way to use Antlr  
> instead and thus avoid having to write a lexer?

All that makes a quasi-parser is implementing the Quasi*Parser  
interfaces. The implementation can be anything you like.

http://erights.org/javadoc/org/quasiliteral/base/QuasiExprParser.html
http://erights.org/javadoc/org/quasiliteral/base/QuasiPatternParser.html

http://erights.org/javadoc/org/quasiliteral/base/MatchMaker.html
http://erights.org/javadoc/org/quasiliteral/base/ValueMaker.html

I recommend you take a look at how ENode quasiliterals work, as  
they're the same sort of thing as you'll need for JavaScript.

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>




More information about the e-lang mailing list