[antlr-interest] Anyone has a LISP ANTLR3 grammar and can contribute it to Drools?

Ola Bini ola.bini at gmail.com
Thu Jan 24 05:52:27 PST 2008


Edson Tirelli wrote:
>
>     All,
>
>    We need a Lisp ANTLR3 grammar for the Drools open source project 
> (http://labs.jboss.com/drools/). We were going to build one from 
> scratch, but I was wondering if anyone has one ready and can 
> contribute to the project. All proper credits would be given, as 
> usual. Project's license is ASF.
>    Alternatively, an (E)BNF Lisp grammar that we can use as a base to 
> build an ANTLR3 would also be helpful. Our main worry is how to define 
> the function name token for Lisp, since lisp accepts almost anything 
> as a function name.
>
Actually, you could make it really easy for yourself and make a lisp 
that doesn't take everything as a function name. The easiest you could 
do is probably just use the CL conventions and parse everything as 
atoms, separated by spaces. Spaces in atom names can be escaped with \. 
You can also have an atom name inside bars: |foo bar|, and then strings. 
That's really all you need.

Cheers

-- 
 Ola Bini (http://ola-bini.blogspot.com) 
 JRuby Core Developer
 Developer, ThoughtWorks Studios (http://studios.thoughtworks.com)
 Practical JRuby on Rails (http://apress.com/book/view/9781590598818)

 "Yields falsehood when quined" yields falsehood when quined.




More information about the antlr-interest mailing list