Tobias Stoll
Tobias Stoll

Reputation: 1

Disabling Exceptions in ANTLR C# target

Is it somehow possible to disable the exceptions that are thrown from ANTLR C# target? Or are they necessary that the parser can work fine? It would be good if the exceptions can be disabled somehow, because they cause bad performance, and it's annoying to disable the antlr exceptions each time when debugging.

Upvotes: 0

Views: 122

Answers (1)

Sam Harwell
Sam Harwell

Reputation: 99859

These exceptions cannot be disabled. In addition, no exceptions are thrown for valid input sequences to minimize the runtime overhead associated with the exceptions.

Not only is the C# target the fastest of all the ANTLR 3 targets, but under extensive long-term testing, the exceptions/handling mechanism necessary for error recovery has never appeared as a performance bottleneck.

Upvotes: 1

Related Questions