java - Issues parsing a test file with ANTLRv4 -


i've defined grammar in antlrv4, written small example file test it's parsing, , giving me error:

line 1:0 mismatched input 'import' expecting 'class' 

the test file http://pastebin.com/thpuexl5

the grammar file http://pastebin.com/6pauhzrt

i have no idea why grammar i've written trying match 'class' instead of 'import' though i've defined import should come first.


Comments

Popular posts from this blog

sql - Postgresql error: "failed to find conversion function from unknown to text" -

Phantomjs login, redirect and render page after pageLoad finishes -

javascript - Why in IE loading image not show at center bottom of page? -