Internal Error, Grammatica 1.5

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Internal Error, Grammatica 1.5

Kevin Kelley-5
Hi, I'm trying out Grammatica and liking it, and being new to it I quickly
tripped it up with some malformed input.  Anyway, in 1.5 this test case:

  %header%

  GRAMMARTYPE = "LL"

  %tokens%

  DOC_LINE        = <<'**' any* eos>>

generates this output:

INTERNAL ERROR: An internal error in Grammatica has been found.
    Please report this error to the maintainers (see the web
    site for instructions). Be sure to include the Grammatica
    version number, as well as the information below:

net.percederberg.grammatica.GrammarException: token 'DOC_LINE' is invalid,
as regular expression contains error(s): Dangling meta character '*' near
index 2
'**' any* eos
  ^, on line 8
        at
net.percederberg.grammatica.Grammar.createTokenizer(Grammar.java:229)
        at net.percederberg.grammatica.Grammatica.debug(Grammatica.java:423)
        at net.percederberg.grammatica.Grammatica.main(Grammatica.java:170)

Tool completed with exit code 2


Just passing it on, thanks!

Kevin
 



_______________________________________________
Grammatica-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/grammatica-users
Reply | Threaded
Open this post in threaded view
|

Re: Internal Error, Grammatica 1.5

Per Cederberg
Thanks for the bug report. It is really the error message that is in
error here it seems, since it should just complain about invalid
regular expression syntax:

    '**' any* eos

isn't a valid regexp, but this would be:

    '\*\*' any\* eos

But perhaps you mean to match two * characters and then read until end of line:

    \*\*[^\n]*

Cheers,

/Per

On Wed, Apr 22, 2009 at 9:35 PM, Kevin <[hidden email]> wrote:

> Hi, I'm trying out Grammatica and liking it, and being new to it I quickly
> tripped it up with some malformed input.  Anyway, in 1.5 this test case:
>
>  %header%
>
>  GRAMMARTYPE = "LL"
>
>  %tokens%
>
>  DOC_LINE        = <<'**' any* eos>>
>
> generates this output:
>
> INTERNAL ERROR: An internal error in Grammatica has been found.
>    Please report this error to the maintainers (see the web
>    site for instructions). Be sure to include the Grammatica
>    version number, as well as the information below:
>
> net.percederberg.grammatica.GrammarException: token 'DOC_LINE' is invalid,
> as regular expression contains error(s): Dangling meta character '*' near
> index 2
> '**' any* eos
>  ^, on line 8
>        at
> net.percederberg.grammatica.Grammar.createTokenizer(Grammar.java:229)
>        at net.percederberg.grammatica.Grammatica.debug(Grammatica.java:423)
>        at net.percederberg.grammatica.Grammatica.main(Grammatica.java:170)
>
> Tool completed with exit code 2
>
>
> Just passing it on, thanks!
>
> Kevin
>
>
>
>
> _______________________________________________
> Grammatica-users mailing list
> [hidden email]
> http://lists.nongnu.org/mailman/listinfo/grammatica-users
>


_______________________________________________
Grammatica-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/grammatica-users
Reply | Threaded
Open this post in threaded view
|

Re: Internal Error, Grammatica 1.5

Leszek Doniec
Per,

you are really fast :)

Cheers,
Leszek

2009/4/22 Per Cederberg <[hidden email]>
Thanks for the bug report. It is really the error message that is in
error here it seems, since it should just complain about invalid
regular expression syntax:

   '**' any* eos

isn't a valid regexp, but this would be:

   '\*\*' any\* eos

But perhaps you mean to match two * characters and then read until end of line:

   \*\*[^\n]*

Cheers,

/Per

On Wed, Apr 22, 2009 at 9:35 PM, Kevin <[hidden email]> wrote:
> Hi, I'm trying out Grammatica and liking it, and being new to it I quickly
> tripped it up with some malformed input.  Anyway, in 1.5 this test case:
>
>  %header%
>
>  GRAMMARTYPE = "LL"
>
>  %tokens%
>
>  DOC_LINE        = <<'**' any* eos>>
>
> generates this output:
>
> INTERNAL ERROR: An internal error in Grammatica has been found.
>    Please report this error to the maintainers (see the web
>    site for instructions). Be sure to include the Grammatica
>    version number, as well as the information below:
>
> net.percederberg.grammatica.GrammarException: token 'DOC_LINE' is invalid,
> as regular expression contains error(s): Dangling meta character '*' near
> index 2
> '**' any* eos
>  ^, on line 8
>        at
> net.percederberg.grammatica.Grammar.createTokenizer(Grammar.java:229)
>        at net.percederberg.grammatica.Grammatica.debug(Grammatica.java:423)
>        at net.percederberg.grammatica.Grammatica.main(Grammatica.java:170)
>
> Tool completed with exit code 2
>
>
> Just passing it on, thanks!
>
> Kevin
>
>
>
>
> _______________________________________________
> Grammatica-users mailing list
> [hidden email]
> http://lists.nongnu.org/mailman/listinfo/grammatica-users
>


_______________________________________________
Grammatica-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/grammatica-users


_______________________________________________
Grammatica-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/grammatica-users