[antlr-interest] a simple (not for me :)) grammar problem

Fırat Küçük firatkucuk at gmail.com
Sun Jan 6 15:23:05 PST 2008


hi,
the problem is related to following grammar:

grammar Sample;

start: (FLOAT | INTEGER) DOT IDENTIFIER;

FLOAT: NUMBER DOT NUMBER;
INTEGER: NUMBER;
IDENTIFIER: LETTER+;
DOT: '.';
fragment NUMBER: DIGIT+;
fragment LETTER: 'a' .. 'z';
fragment DIGIT: '0' .. '9';


let us try:

3.hello

result:
line 1:2 required (...)+ loop did not match anything at character 'h'
line 1:3 mismatched input 'ello' expecting set null


what should i do?

-- 
Öğr. Gör. Fırat Küçük
ADAMYO Distance Learning
SAKARYA University / TURKEY


More information about the antlr-interest mailing list