I have a DSL which is already in production but I am working on an
updated version.

We already have quite a few tests which call the parser but I never
added gUnit tests until this version.

Actually everything was working fine until my latest change where I
started messing with the token stream. I don't think I am doing
anything complicated. Also our other tests work fine so I think the
problem is in gUnit.

Basically I have a rule where I want to remove some elements from the
input string. This is done with setText(unescape(getText())).

The problem occurs in getText(). The state.tokenStartCharIndex is -1
and this is passed to substring which is called in getText(). This
leads to a StringIndexOutOfBoundsException.

I've included the grammar. There is also a Tree Grammar after this but
that isn't relevant. There are probably more problems with the grammar
but at this point I'm only interested in the gUnit errors.
I've changed some names to remove any company specific information but
the grammar itself is unchanged.

mvg,
Jasper


p.s. is it bad etiquette to post the whole grammar and tree grammar to
ask for comments?
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Attachment: X.g
Description: Binary data

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to