How to write an antlr4 grammar lexer rule to not match a string. For example, I have the following input string :
CREATE TABLE person ( age integer, id integer, name character varying(30)), PRIMARY KEY ( id ) );
Here, I need to skip those create table queries like above which contains "PRIMARY KEY" constraint.
Can we use regular expressions directly in lexer rules ?