Oh sorry I misunderstood. I get it now. Thanks for the report.

-Adrian

On 14-06-28 11:47 AM, Josh Haberman wrote:
HI Adrian,

I wasn't meaning to suggest that my test case was valid Ragel input. I
sent the repro because the Ragel source contains this comment where
this error message is generated:

   /* Machine failed before finding a token. I'm not yet sure if this
    * is reachable. */
   scan_error() << "scanner error" << endl;
   exit(1);

Since you weren't sure whether this error is reachable, I thought it
would be useful to you to know that it is indeed reachable, and to
have a repro for how it can be reached.

Also, the error message "scanner error" isn't a very useful
diagnostic; I was hoping that a repro would make it easier to emit an
error message that helps the user know what they did wrong.

It also refers to a source location that doesn't actually exist
(test.rl:2:10) -- in my test input, line 2 only has 7 columns.

Hope this is helpful,
Josh

On Sat, Jun 28, 2014 at 6:46 AM, thurston <thurs...@complang.org> wrote:
Hi Josh, those are unterminated write statements. Two percents begin ragel
code.


-------- Original message --------
From: Josh Haberman
Date:06-28-2014 4:40 AM (GMT-05:00)
To: ragel-users@complang.org
Subject: [ragel-users] "scanner error"

I was trying out Ragel for the first time today and run into the
somewhat perplexing error message "scanner error".

Since the code contains a comment questioning whether this error is
reachable, I wanted to give you a repro that reaches it -- here's my
reduced test case:

%%machine m;
%%write
%%write

$ ragel -C -o test.out test.rl
test.rl:2:10: scanner error

This repro is for 6.8 (git appears to be 6.7 -- source repo is older?)

Josh

_______________________________________________
ragel-users mailing list
ragel-users@complang.org
http://www.complang.org/mailman/listinfo/ragel-users

_______________________________________________
ragel-users mailing list
ragel-users@complang.org
http://www.complang.org/mailman/listinfo/ragel-users
_______________________________________________
ragel-users mailing list
ragel-users@complang.org
http://www.complang.org/mailman/listinfo/ragel-users


_______________________________________________
ragel-users mailing list
ragel-users@complang.org
http://www.complang.org/mailman/listinfo/ragel-users

Reply via email to