lexer grammar Cql; options { language=Java; } @header { package gr.uoa.di.driver.cql; } T8 : '>' ; T9 : '=' ; T10 : 'and' ; T11 : 'or' ; T12 : 'not' ; T13 : 'prox' ; T14 : '/' ; T15 : '(' ; T16 : ')' ; T17 : '<' ; T18 : '>=' ; T19 : '<=' ; T20 : '<>' ; // $ANTLR src "Cql.g3" 103 QUOTE : '"' ; // $ANTLR src "Cql.g3" 104 WHITESPACE : ( ' ' | '\t' | '\r' | '\n' | '\f' ) {skip();} ; /* STRING is double quotes followed by a sequence of any characters except double quotes, where backslash (\) escapes the following character (include double quote characters). The resultant value includes all backslash characters except those releasing a double quotes character. This allows other systems to interpret the backslash characters. The surrounding double quotes are also not included. */ // $ANTLR src "Cql.g3" 114 STRING : QUOTE! ( '\\'! QUOTE | ~(QUOTE) )* QUOTE! ; /* IDENTIFIER is any sequence of characters excluding whitespace characers (as defined by the current character set), '(', ')', '=', '<', '>', and '"' (double quotes). If the final sequence is a reserved word, that token is returned instead. (Note that '.' is part of an identifier, and a series of digits is also an identifier.) Reserved words are 'and', 'or', 'not', and 'prox' (case insensitive). When a reserved word is used in term, the term value is the word, in the exact case as specified in a query. */ // $ANTLR src "Cql.g3" 128 IDENTIFIER : ( ~(' ' | '\t' | '\r' | '\n' | '\f' | '(' | ')' | '=' | '<' | '>' | '/' | '"') )+ ;