Hi everyone,
Actually I just started to work with Ragel and probably don't understand
right the concept.
I'm trying to write parser for toy programming language. All was ok,
before I mess with recursive
definitions.
I want to read lisp-like expressions, e.g. ((((one)) (two)) three), and
try to write recursive definition for it.
the same at gist: https://gist.github.com/893142
%%{
machine lisp;
integer = '-'? . ('0'|[1-9][0-9]*);
string = '"' . (any - '"') . '"';
list = '(' . (integer|string|list)* . ')';
main := list;
}%%
%% write data;
%% write init;
%% write exec;
So I got following error:
test.rl:7:32: graph lookup of "list" failed
So, the question is: How to define parser for such language.
Yea, sorry my bad English.
_______________________________________________
ragel-users mailing list
[email protected]
http://www.complang.org/mailman/listinfo/ragel-users