protected Ref string() throws PageException {
// Init Parameter
char quoter = cfml.getCurrentLower();
//String str="";
LStringBuffer str=new LStringBuffer();
while(cfml.hasNext()) {
cfml.next();
// check sharp
if(cfml.isCurrent('\\')) {
if(cfml.isNext(quoter)){
cfml.next();
str.append(quoter);
}
else if(cfml.isNext('\\')){
cfml.next();
str.append('\\');
}
else if(cfml.isNext('"')){
cfml.next();
str.append('"');
}
else if(cfml.isNext('\'')){
cfml.next();
str.append('\'');
}
else if(cfml.isNext('t')){
cfml.next();
str.append('\t');
}
else if(cfml.isNext('n')){
cfml.next();
str.append('\n');
}
else if(cfml.isNext('b')){
cfml.next();
str.append('\b');
}
else if(cfml.isNext('f')){
cfml.next();
str.append('\f');
}
else if(cfml.isNext('r')){
cfml.next();
str.append('\r');
}
else if(cfml.isNext('u')){
cfml.next();
StringBuffer sb=new StringBuffer();
int i=0;
for(;i<4 && cfml.hasNext();i++){
cfml.next();
sb.append(cfml.getCurrent());
}
if(i<4){
str.append("\\u");
str.append(sb.toString());
}
else{
int asc = NumberUtil.hexToInt(sb.toString(),-1);
if(asc!=-1)str.append((char)asc);
else {
str.append("\\u");
str.append(sb.toString());
}
}
}
else if(cfml.isNext('/')){
cfml.next();
str.append('/');
}
else {
str.append('\\');
}
}
else if(cfml.isCurrent(quoter)) {
break;
}
// all other character
else {
str.append(cfml.getCurrent());
}
}
if(!cfml.forwardIfCurrent(quoter))
throw new InterpreterException("Invalid String Literal Syntax Closing ["+quoter+"] not found");