I have the following Grammar. It should recognize a string delimited by the single quote character ('
). However, this does not work as intended. In ANTLWorks, the console window shows the following warning:
[10:46:50] error(139): Test.g:9:15: set complement is empty
Why is that and how can I match a string which can contain any charcters but the delimiter?
grammar Test;
options
{
language=CSharp3;
output=AST;
ASTLabelType=CommonTree;
}
string: '\'' (~('\''))* '\'';