X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=tests%2Fjava15.g;h=3b33aca75c72cc62c9f54be660ff1f8094637499;hp=f89658eedbb00fc8a3b4a39d0c79c743f44331cb;hb=HEAD;hpb=2c1c0293545f3d12c23220fd05c663e6aa3f3de1 diff --git a/tests/java15.g b/tests/java15.g index f89658e..3b33aca 100644 --- a/tests/java15.g +++ b/tests/java15.g @@ -23,7 +23,7 @@ ClassDecl = Class:: Modifiers "class" TypeDecl ClassBody /ws InterfaceDecl = Interface:: Modifiers "interface" TypeDecl ClassBody /ws TypeDecl = Identifier - | GenericTypeDecl:: Identifier "<" (TypeArg +/ Comma) ">" /ws + | GenericTypeDecl:: Identifier "<" (TypeArg +/ comma) ">" /ws TypeArg = Identifier | Extends:: Identifier "extends" Type /ws @@ -43,17 +43,17 @@ MethodDecl = Method:: MethodHeader (";" | MethodBody) /ws MethodHeader = MethodHeader:: Modifiers Type Identifier Args /ws MethodBody = "{" "}" /ws -Args = "(" (Arg+/Comma) ")" /ws +Args = "(" (Arg+/comma) ")" /ws | "(" ws! ")" Arg = Arg:: Type Identifier /ws Type = BareType | GenericType | ArrayType BareType = Type:: TypeName | "boolean" | "int" | "double" | "float" | "char" | "short" | "long" | "void" -GenericType = GenericType:: TypeName "<" (Type+/Comma) ">" /ws +GenericType = GenericType:: TypeName "<" (Type+/comma) ">" /ws ArrayType = ArrayOf:: (BareType | GenericType) "[]" /ws ws = [\r\n ]** -Comma = ws! "," ws! +comma = ws! "," ws! JavaLetter = [a-zA-Z_$] Identifier = JavaLetter++