ViiP
ViiP

Reputation: 3

difference between ParseException and TokenManagerError (javaCC)

What is the difference between ParseException and TokenManagerError? Topic: javaCC, generate parser, error message An example to explain would be good.

Tries to read in literature or error message, googel, chat, found nothing at least

Upvotes: 0

Views: 41

Answers (1)

Theodore Norvell
Theodore Norvell

Reputation: 16251

A TokenManagerError is thrown when the input sequences of characters can not be turned into a sequence of Tokens -- i.e., when lexical analysis fails.

A ParseException occurs when the input sequence of tokens can't be matched -- i.e., when parsing fails.

See the FAQ for advice on how and why to avoid TokenManagerErrors.

Upvotes: 0

Related Questions