this may be a very simple question but I am struggling heavily just matching the pipe character in my Grammar File. My grammar involves the following:
pipeCommand : call (PIPE call)+
;
where call
can match any string not including '|'. I have also defined PIPE as:
PIPE : '|';
When testing my the grammar using with the input echo | test
, I receive the error:
line 1:5 mismatched input '|' expecting '|'
I am unable to find anything so far to solve the problem. Is this a problem with lexing modes or I am completely wrong? Many thanks in advance.