grammatica-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Grammatica-users] ERROR "An internal error in Grammatica has been found


From: Stefan Ukena
Subject: [Grammatica-users] ERROR "An internal error in Grammatica has been found" / Division by Zero
Date: Wed, 24 Mar 2004 14:50:20 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113

Hi Per,

while playing some more with my grammar I encountered the following
error (using --profile):

<snip>

Tokenizing portalhelper_grammartest.txt
  Time elapsed:  10 millisec
  Tokens found:  35
  Average speed: 3 tokens/millisec

Parsing portalhelper_grammartest.txt
  Time elapsed:  0 millisec
  Nodes found:   56
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:

java.lang.ArithmeticException: / by zero
        at
net.percederberg.grammatica.Grammatica.profile(Grammatica.java:547)
        at net.percederberg.grammatica.Grammatica.main(Grammatica.java:175)

<snap>

It's obviously a problem with the time-elapsed-value of Zero, isn't it?
Increasing the file-size of my test-file cranked it up to 60 millisecs
and no error. Just thought I'd let you know (who would ever expect that
modern computers are _that_ fast :-))

OT: Your hint in one of the previous posts about using "--tokenize" etc.
to debug the grammar was very helpfull. As was your hint to first define
all the tokens and only after that the productions. Maybe you could put
this sort of information in a more prominent place (like the docs)?

Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]