On 03/23/2011 05:41 AM, maulattu wrote:
> Ok Jim, let me understand if I'm missing something with a short example.
> Take this little section of the grammar
> 
> parameter_with_index
>     : parameterName = 'PARAM_' parameterIndex '=' numericLiteral
>     ;
> 
> 
> It shall be changed to
> 
> parameter_with_index
>     : parameterNameLiteral  parameterIndex separator numericLiteral
>     ;
> parameterNameLiteral
>     :    PARAM_TOKEN
>     ;
> separator
>     :    SEPARATOR_TOKEN
>     ;
> SEPARATOR_TOKEN
>     :    '='
>     ;
> PARAM_TOKEN
>     :    'PARAM_'
>     ;
> 
> is it right?

No,

prameter_with_index
        : PARAM_TOKEN parameterIndex SEPERATOR_TOKEN numericLiteral
        ;

PARAM_TOKEN
        : 'PARAM_'
        ;

SEPERATOR_TOKEN
        : '='
        ;

should be sufficient.  No need for the extra 2 rules.

> Thank you all for your precious suggestions :)

-- 
Kevin J. Cummings
[email protected]
[email protected]
[email protected]
Registered Linux User #1232 (http://counter.li.org)

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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to