/** * Transfomiert einen lierale Zeichenkette. <br> * EBNF:<br> * <code>("'" {"##"|"''"|"#" impOp "#"| ?-"#"-"'" } "'") | * (""" {"##"|""""|"#" impOp "#"| ?-"#"-""" } """);</code> * * @return CFXD Element * @throws PageException */ protected Ref string() throws PageException { // Init Parameter char quoter = cfml.getCurrentLower(); // String str=""; LStringBuffer str = new LStringBuffer(); Ref value = null; while (cfml.hasNext()) { cfml.next(); // check sharp if (cfml.isCurrent('#')) { if (cfml.isNext('#')) { cfml.next(); str.append('#'); } else { cfml.next(); cfml.removeSpace(); if (!str.isEmpty() || value != null) str.append(assignOp()); else value = assignOp(); cfml.removeSpace(); if (!cfml.isCurrent('#')) throw new ExpressionException("Invalid Syntax Closing [#] not found"); } } else if (cfml.isCurrent(quoter)) { if (cfml.isNext(quoter)) { cfml.next(); str.append(quoter); } else { break; } } // all other character else { str.append(cfml.getCurrent()); } } if (!cfml.forwardIfCurrent(quoter)) throw new ExpressionException( "Invalid String Literal Syntax Closing [" + quoter + "] not found"); cfml.removeSpace(); mode = STATIC; if (value != null) { if (str.isEmpty()) return value; return new Concat(pc, value, str); } return str; }