[antlr-interest] what would ANTLR ref guide revised edition have?

devdoer bird devdoer2 at gmail.com
Wed Feb 16 04:54:04 PST 2011


Sorry ,I changed grammar as below with red font.
2011/2/16 devdoer bird <devdoer2 at gmail.com>

> Thanks.
>
> But I found it also failed in eclipse plugin.
>
> I tried the following grammar.
> ---------------
> otherFilterSpec
>   : OTHERFILTER '('  CONST_STRING  ')'
>   ;
>
> fragment DIGIT : '0'..'9';
> fragment LOWER  : 'a'..'z';
> fragment UPPER  : 'A'..'Z';
>
> CONST_STRING : '"' (LOWER|UPPER|DIGIT)* '"';
> ---------------
> parsed ok.
>
> but the following:
> ---------------
>  otherFilterSpec
>   : OTHERFILTER '('   *constString *  ')' // sorry,
>    ;
>
> constString: ' " '  (LOWER|UPPER|DIGIT)* ' " ';
>
>
> fragment DIGIT : '0'..'9';
> fragment LOWER  : 'a'..'z';
> fragment UPPER  : 'A'..'Z';
>
> CONST_STRING : '"' (LOWER|UPPER|DIGIT)* '"';
> ---------------
> failed.
> I don't know why changing from rule to TOKEN works.
> 2011/2/16 Douglas Godfrey <douglasgodfrey at gmail.com>
>
> How about an example Symbol Table class that can handle C++ or Java style
>> languages
>> with nested scopes and drill down access to nested classes via name spaces
>> and compound names.
>>
>> On Tue, Feb 15, 2011 at 6:36 PM, Terence Parr <parrt at cs.usfca.edu> wrote:
>>
>> > Howdy. I'm thinking about revising the ref guide for ANTLR 3 (ANTLR v4
>> > might be awhile so I should update book).  Any suggestions to improve?
>>  One
>> > obvious thing: discuss not just java target :)
>> >
>> > Ter
>> >
>> > List: http://www.antlr.org/mailman/listinfo/antlr-interest
>> > Unsubscribe:
>> > http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>> >
>>
>> List: http://www.antlr.org/mailman/listinfo/antlr-interest
>> Unsubscribe:
>> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>>
>
>


More information about the antlr-interest mailing list