All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.joo.libra.sql.antlr.SqlLexer.g4 Maven / Gradle / Ivy

There is a newer version: 2.1.2
Show newest version
lexer grammar SqlLexer;

@header {
package org.joo.libra.sql.antlr;
}

fragment Digit: 		'0'..'9' ;
fragment Alpha: 		'[' | ']' | '.' | '_' | 'A'..'Z' | 'a'..'z' ;

AND:					('AND' | 'and') ;
OR:						('OR' | 'or') ;
NOT:					('NOT' | 'not') ;

IS_EQUALS:				('IS' | 'is') ;
IS_EQUALS_NOT:			('IS NOT' | 'is not') ;
IS_EMPTY:				('IS EMPTY' | 'is empty') ;
IS_NOT_EMPTY:			('IS NOT EMPTY' | 'is not empty') ;
CONTAINS:				('CONTAINS' | 'contains') ;
MATCHES:				('MATCHES' | 'matches') ;
TRUE:					('TRUE' | 'true') ;
FALSE:					('FALSE' | 'false') ;
UNDEFINED:				('UNDEFINED' | 'undefined') ;
NULL:					('NULL' | 'null') ;

GREATER_THAN:			'>' ;
GREATER_THAN_EQUALS:	'>=' ;
LESS_THAN:				'<' ;
LESS_THAN_EQUALS:		'<=' ;
EQUALS:					'=' ;
NOT_EQUALS:				'!=' ;
DBL_EQUALS:				'==' ;
PLUS:					'+' ;
MINUS:					'-' ;
TIMES:					'*' ;
DIVIDE:					'/' ;
LPAREN:					'(' ;
RPAREN:					')' ;
STRING:					'\'' ~('\r' | '\n' | '\'')* '\'' ;
INTEGER:				Digit+ ;
DOUBLE:					Digit+'.'Digit+ ;
VARIABLE:				Alpha+ (Alpha | Digit)* ;
WS: 					(' ' | '\t')+ -> channel(HIDDEN) ;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy