can't pull parse strings - BUG?
Jason
jason2... at jasonjobe.com
Mon Feb 5 18:51:18 UTC 2007
Great! Strings now work.
However :-(
I added in rules to distinguish between integers and floats (reals).
# Numbers
digit+ => {
ret_tok (TK_Integer); fbreak;
};
digit+'.' digit+ => {
ret_tok (TK_Real); fbreak;
};
Those were OK but I also want to recognize numbers separated by commas
(e.g. 1,299 and 1,299.987).
So I added these rules
digit{1,3} (',' digit{3})+ {
ret_tok (TK_Integer); fbreak;
};
and
digit{1,3} (',' digit{3})+ '.' digit+ {
ret_tok (TK_Real); fbreak;
};
But this reports the following error:
ragel pullscan.rl | rlcodegen -G2 -o pullscan.c
gcc -pedantic -Wall -O3 -g -c -o pullscan.o pullscan.c
pullscan.rl: In function 'scan':
pullscan.rl:1: error: 'act' undeclared (first use in this function)
pullscan.rl:1: error: (Each undeclared identifier is reported only
once
pullscan.rl:1: error: for each function it appears in.)
make: *** [pullscan.o] Error 1
Any ideas?
thanks,
Jason
More information about the ragel-users
mailing list