I have a grammar for parsing jcl
The jcl looks like below /*comment line //PR1290@ JOB (10),'ISPW COB SN900E'
lexer and parser is working perfectly fine. Suppose instead of // if jcl starts from / currently lexer is throwing 1:0 token recognition error at: '/P'
Parser will throw no viable alternative input R1290@ JOB
I am looking for throwing error similar to eclipse while editing.
public void Test(){
//test
//}
Above will say syntax error insert } to complete method body..
Something similar to this I want to point out right error message saying "jcl lines should start with // "
Example jcl line is below //NAME Operationname parameter=parametervalue
If // is missing i want to throw saying line should start with // Operation name should be either JOB or PROC if keyword is missing then enter valid keyword parameter
and if any parameter is missing i want to point out that write meaning full message to user.
I am using antlr 4.7.2 version