[ragel-users] One question.
Gordeev Vladimir
gordeev.vladimir.v at gmail.com
Tue Mar 29 20:15:27 UTC 2011
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.colm.net/pipermail/ragel-users/attachments/20110329/4eb64c4f/attachment-0001.html>
-------------- next part --------------
_______________________________________________
ragel-users mailing list
ragel-users at complang.org
http://www.complang.org/mailman/listinfo/ragel-users
More information about the ragel-users
mailing list