Der CFMLExprTransfomer implementiert das Interface ExprTransfomer,
er bildet die Parser Grammatik ab, die unten definiert ist.
Er erhaelt als Eingabe CFML Code, als String oder CFMLString,
der einen CFML Expression erhaelt und liefert ein CFXD Element zurueck,
das diesen Ausdruck abbildet.
Mithilfe der FunctionLibs, kann er Funktionsaufrufe,
die Teil eines Ausdruck sein koennen, erkennen und validieren.
Dies geschieht innerhalb der Methode function.
Falls ein Funktionsaufruf, einer Funktion innerhalb einer FunctionLib entspricht,
werden diese gegeneinander verglichen und der Aufruf wird als Build-In-Funktion uebernommen,
andernfalls wird der Funktionsaufruf als User-Defined-Funktion interpretiert.
Die Klasse Cast, Operator und ElementFactory (siehe 3.2) helfen ihm beim erstellen des Ausgabedokument CFXD.
Parser Grammatik EBNF (Extended Backus-Naur Form)
transform = spaces impOp;
impOp = eqvOp {"imp" spaces eqvOp};
eqvOp = xorOp {"eqv" spaces xorOp};
xorOp = orOp {"xor" spaces orOp};
orOp = andOp {("or" | "||") spaces andOp};
(* "||" Existiert in CFMX nicht *)
andOp = notOp {("and" | "&&") spaces notOp};
(* "&&" Existiert in CFMX nicht *)
notOp = [("not"|"!") spaces] decsionOp;
(* "!" Existiert in CFMX nicht *)
decsionOp = concatOp {("neq"|"eq"|"gte"|"gt"|"lte"|"lt"|"ct"|
"contains"|"nct"|"does not contain") spaces concatOp};
(* "ct"=conatains und "nct"=does not contain; Existiert in CFMX nicht *)
concatOp = plusMinusOp {"&" spaces plusMinusOp};
plusMinusOp = modOp {("-"|"+") spaces modOp};
modOp = divMultiOp {("mod" | "%") spaces divMultiOp};
(* modulus operator , "%" Existiert in CFMX nicht *)
divMultiOp = expoOp {("*"|"/") spaces expoOp};
expoOp = clip {("exp"|"^") spaces clip};
(*exponent operator, " exp " Existiert in CFMX nicht *)
clip = ("(" spaces impOp ")" spaces) | checker;
checker = string | number | dynamic | sharp;
string = ("'" {"##"|"''"|"#" impOp "#"| ?-"#"-"'" } "'") |
(""" {"##"|""""|"#" impOp "#"| ?-"#"-""" } """);
number = ["+"|"-"] digit {digit} {"." digit {digit}};
digit = "0"|..|"9";
dynamic = "true" | "false" | "yes" | "no" | startElement
{("." identifier | "[" structElement "]")[function] };
startElement = identifier "(" functionArg ")" | scope | identifier;
scope = "variable" | "cgi" | "url" | "form" | "session" | "application" |
"arguments" | "cookie" | "client ";
identifier = (letter | "_") {letter | "_"|digit};
structElement = "[" impOp "]";
functionArg = [impOp{"," impOp}];
sharp = "#" checker "#";
spaces = {space};
space = "\s"|"\t"|"\f"|"\t"|"\n";
letter = "a"|..|"z"|"A"|..|"Z";
{"x"}= 0 bis n mal "x"
["x"]= 0 bis 1 mal "x"
("x" | "y")"z" = "xz" oder "yz"