Discussion:
[racket] How to use parser-tools/yacc-to-scheme?
亀田馬志
2015-02-26 07:12:35 UTC
Permalink
Hello.

I prepared a tiny-tiny file having this(test.l):

%{
%}
%%
a(b|c)* { printf("OK\n"); } /*Finding this pattern shows O.K.*/
. {printf("NG\n");} /*. shows ELSE */
%%
/* Nothing */

And now, as the document of Parser Tools says, try runnning these command.
(require parser-tools/yacc-to-scheme)
(trans "./test.l")
It gives me something like an error:

<unsaved editor>:3:2: lexer: No match found in input starting with:

Did I misunderstand or do something wrong?

Thanks.
SAITO Atsushi
2015-02-27 09:49:24 UTC
Permalink
You are confused lexer with parser.
That is invalid as yacc format file.
----
SAITO Atsushi
____________________
Racket Users list:
http://lists.racket-lang.org/users

Loading...