Commit a8cb8d15 authored by Custom2043's avatar Custom2043
Browse files

Fix compilation

parent 0edc4d82
......@@ -20,11 +20,18 @@ MethodDeclarator : [{MethodModifier}] Header
ignore = {' |\t|\r|\n'}
MethodModifier = "public"|"protected"|"private"|"abstract"|"static"|"final"|"synchronized"|"native"|"strictfp"|"super"|Annotation
PrimitiveType = "int"|"float"|"double"|"short"|"byte"|"boolean"|"float"
Identifier = 'a-z|A-Z|$|_' {'a-z|A-Z|0-9|$|_'}
ignore = {' |\t|\r|\n'}
Dims = {"[" "]"}
#TypeName = {Identifier "."|}
Annotation = "@" TypeName ["(" ["*"] ")"]
#Annotation = "@" TypeName ["(" ["*"] ")"]
MethodModifier = "public"|"protected"|"private"|"abstract"|"static"|"final"|"synchronized"|"native"|"strictfp"|"super"|Annotation
MethodDeclarator = [{MethodModifier}] Identifier "("
\ No newline at end of file
Type = "void"|(PrimitiveType|Identifier Dims)
MethodDeclarator = [{MethodModifier}] Type Identifier "("
\ No newline at end of file
No preview for this file type
......@@ -63,6 +63,7 @@ public class Compiler
report(new Info(InfoModel.invalidChar, t));
else if (!(t instanceof Line))
report(new Info(InfoModel.syntaxError, t));
else
{
for (Line l : lines)
......@@ -167,7 +168,6 @@ public class Compiler
found = true;
break;
}
if (!found)
report(new Info(InfoModel.tokenUndeclared, token));
else if (first && foundAfterThisLine)
......@@ -194,7 +194,7 @@ public class Compiler
currentPath.addLast(i);
i++;
compileSearchToken(currentLine, lines, tt, b, paths);
if (!(token instanceof OptionalSearchToken))
if (!(token instanceof OrSearchToken))
b = false;
if (token instanceof OrSearchToken)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment