How to check input is correct or incorrect antlr4 javascript?

41 views
Skip to first unread message

Enise KILAVUZ

unread,
Nov 17, 2015, 11:01:50 AM11/17/15
to antlr-discussion

If input is incorrect, we can check this status with 
`if(parser.NumberOfSyntaxErrors > 0) ...`

in C# target.

But javascript target has no like NumberOfSyntaxErrors properties. So, how we can check given input is correct or incorrect in javascript?

Eric Vergnaud

unread,
Nov 17, 2015, 6:09:53 PM11/17/15
to antlr-discussion
Hi,

you need to add an error listener.

Eric
Reply all
Reply to author
Forward
0 new messages