antlr / antlr4test-maven-plugin

A maven plugin used to test the grammars-v4 repo grammars
BSD 3-Clause "New" or "Revised" License
17 stars 16 forks source link

How can i make ".errors" file with '\n' inside? #17

Open akashipov opened 5 years ago

akashipov commented 5 years ago

When I try to test my grammar I get this error exception:

[ERROR] Failed to execute goal com.khubla.antlr:antlr4test-maven-plugin:1.11:test (VisualBasic6) on project matcher-core: Unable execute mojo: VB6_BACKDOOR_TIMEBOMB.vb.errors : expected (line 24:19 no viable alternative at input '
[ERROR] 
[ERROR] If Timer() < 1234 Then
[ERROR] 
[ERROR] End If
[ERROR] 
[ERROR] If Year(date)=2017 Then
[ERROR] \tactivateBackdoor();'), but was (line 24:19 no viable alternative at input '\n\nIf Timer() < 1234 Then\n    \nEnd If\n\nIf Year(date)=2017 Then\n\tactivateBackdoor();')

I don't understand how is it possible. '\n''s encoding like a newline but '\t''s not. And adding '\' before symbol '\n' in ".errors" file does't give any successful result (printed like '\'). I think something is wrong. Encoding file is 'utf-8', default value encoding in this plugin is 'utf-8' too.