From eacd7e172761853019dfe7122f48a5275b0cabe5 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 8 Nov 2010 11:12:48 +0000 Subject: trying to fix grammar --- src/monkey/seaspider/C.jj | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'src/monkey/seaspider/C.jj') diff --git a/src/monkey/seaspider/C.jj b/src/monkey/seaspider/C.jj index 9cab0974a..781c516bb 100644 --- a/src/monkey/seaspider/C.jj +++ b/src/monkey/seaspider/C.jj @@ -123,8 +123,31 @@ TOKEN : { | <#OCTAL_LITERAL: "0" (["0"-"7"])*> | )? (["f","F","d","D"])? | "." (["0"-"9"])+ ()? (["f","F","d","D"])? | (["0"-"9"])+ (["f","F","d","D"])? | (["0"-"9"])+ ()? ["f","F","d","D"]> | <#EXPONENT: ["e","E"] (["+","-"])? (["0"-"9"])+> -| -| +| + < CHARACTER_LITERAL: + "'" + ( (~["'","\\","\n","\r"]) + | ("\\" + ( ["n","t","b","r","f","\\","'","\""] + | ["0"-"7"] ( ["0"-"7"] )? + | ["0"-"3"] ["0"-"7"] ["0"-"7"] + ) + ) + ) + "'" + > +| < STRING_LITERAL: + "\"" + ( (~["\"","\\","\n","\r"]) + | ("\\" + ( ["n","t","b","r","f","\\","'","\""] + | ["0"-"7"] ( ["0"-"7"] )? + | ["0"-"3"] ["0"-"7"] ["0"-"7"] + ) + ) + )* + "\"" + > } TOKEN : { @@ -222,7 +245,7 @@ void ParameterList() : {} void ParameterDeclaration() : {} { - TypeSpecifier() [ Array () ] + TypeSpecifier() [ [ Array () ]] } void VariableDeclaration() : {} -- cgit v1.2.3