package org.oss.jshuntingyard.lexer;

import java.util.regex.Pattern;

public enum TokenType {
	BOOLEANVALUE("false|true|False|True|FALSE|TRUE"),
	NULL("null|Null|NULL"),
	NAN("NaN"),
	FUNCTIONNAME("[A-Za-z]+([0-9])?"),
	DIGIT("([-])?([0-9]+(\\.\\d+)?)"),
	SINGLEQUOTED("\'[^\']*+\'"),
	COMMA(","),
	OPENBRACE("\\("),
	CLOSEBRACE("\\)"),
	OPERATOR("\\+|-|\\*|/|==|!=|\\^|\\%|\\|\\||<=|>=|<|>|&&|!"),
	VARIABLE("\\$([a-zA-Z0-9])+([_])?([a-zA-Z0-9])*");
	
	private final Pattern pattern;
	
	TokenType(String regularExpression) {
		this.pattern = Pattern.compile(regularExpression);
	}
	
	public Pattern pattern() {
		return pattern;
	}
}
@@ -107,65 +107,45 @@
 UE(%22
+(?i)
 false%7C
-true%7CFalse%7CTrue%7CFALSE%7CTRUE%22),%0A%09NULL(%22null%7CNull%7CNULL
+(?i)true%22),%0A%09NULL(%22(?i)null
 %22),%0A
@@ -425,17 +425,16 @@
 9%5D)*%22);%0A
-%09
 %0A%09privat
@@ -458,17 +458,16 @@
 attern;%0A
-%09
 %0A%09TokenT
@@ -554,17 +554,16 @@
 on);%0A%09%7D%0A
-%09
 %0A%09public

case-insensitive matching