Update of /cvsroot/nice/Nice/src/bossa/parser
In directory sc8-pr-cvs1:/tmp/cvs-serv8204/F:/nice/src/bossa/Parser
Modified Files:
Parser.jj
Log Message:
Implemented muli line string literals.
Index: Parser.jj
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v
retrieving revision 1.208
retrieving revision 1.209
diff -C2 -d -r1.208 -r1.209
*** Parser.jj 15 Sep 2003 22:29:21 -0000 1.208
--- Parser.jj 1 Oct 2003 18:11:39 -0000 1.209
***************
*** 28,32 ****
import bossa.util.*;
! import bossa.syntax.*;
import mlsub.typing.TypeSymbol;
--- 28,32 ----
import bossa.util.*;
! import bossa.syntax.*;
import mlsub.typing.TypeSymbol;
***************
*** 268,271 ****
--- 268,285 ----
TOKEN: /* String literals */
{
+ < MULTILINESTRING:
+ "\"" "\"" "\""
+ ( (~["\"","\\"])
+ | ("\\"
+ ( ["n","t","b","r","f","\\","'","\""]
+ | ["0"-"7"] ( ["0"-"7"] )?
+ | ["0"-"3"] ["0"-"7"] ["0"-"7"]
+ )
+ )
+ | ( ["\n","\r"] )
+ )*
+ "\"" "\"" "\""
+ >
+ |
< LSTRING:
"\""
***************
*** 1512,1515 ****
--- 1526,1538 ----
}
+ StringConstantExp multiLineStringExp():
+ { Token t; String s; }
+ {
+ t = <MULTILINESTRING>
+ { s = t.image.substring(3, t.image.length() - 3);
+ return new StringConstantExp(s, true);
+ }
+ }
+
IdentExp identExp():
{ LocatedString i; }
***************
*** 2079,2082 ****
--- 2102,2106 ----
| res=charConstantExp()
| res=stringConstantExp()
+ | res=multiLineStringExp()
)
{ return res; }
|