On Thu, Jul 16, 2009 at 1:21 PM, hakan eryargi <hakan.erya...@gmail.com> wrote:
>
> i will really appreciate a simple sample if possible :)

Simple grammar that mimics the Ada approach:

grammar test;

program  :   expression EOF
         ;

expression
         :  primary ( ('AND' primary ) + | ( 'OR' primary ) +)
         ;

primary  :  VARIABLE
         |  'TRUE'
         |  'FALSE'
         |  '(' expression ')'
         ;

VARIABLE :  'a'..'z' +
         ;

First time I've really used AntlrWorks and Antlr 3 to write and
(informally) test a grammar (I've only really used Antlr 2 before) -
very cool. Kudos to Ter and Jean!!!

Stuart Dootson

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to il-antlr-interest@googlegroups.com
To unsubscribe from this group, send email to 
il-antlr-interest+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to