Skip to content

Commit

Permalink
Fixed whitespace issue with kajtez statement
Browse files Browse the repository at this point in the history
  • Loading branch information
tkohout committed May 31, 2016
1 parent 751cb9a commit 94c15f8
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 122 deletions.
2 changes: 1 addition & 1 deletion src/main/java/cz/cvut/fit/ostrajava/Parser/OSTRAJava.jj
Expand Up @@ -2469,7 +2469,7 @@ void IfStatement() :
{/*@bgen(jjtree) IfStatement */
try {
/*@egen*/
"kaj" "(" Expression() ")" Block() ( LOOKAHEAD(2) "kajtez (" Expression() ")" Block() )* [ LOOKAHEAD(1) "boinak" Block() ]/*@bgen(jjtree)*/
"kaj" "(" Expression() ")" Block() ( LOOKAHEAD(3) "kajtez" "(" Expression() ")" Block() )* [ LOOKAHEAD(1) "boinak" Block() ]/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/cz/cvut/fit/ostrajava/Parser/OSTRAJava.jjt
Expand Up @@ -787,7 +787,7 @@ void IfStatement() :
*/
{}
{
"kaj" "(" Expression() ")" Block() ( LOOKAHEAD(2) "kajtez (" Expression() ")" Block() )* [ LOOKAHEAD(1) "boinak" Block() ]
"kaj" "(" Expression() ")" Block() ( LOOKAHEAD(3) "kajtez" "(" Expression() ")" Block() )* [ LOOKAHEAD(1) "boinak" Block() ]
}

void WhileStatement() :
Expand Down
12 changes: 7 additions & 5 deletions src/main/java/cz/cvut/fit/ostrajava/Parser/OSTRAJavaParser.java
Expand Up @@ -2823,12 +2823,13 @@ final public void IfStatement() throws ParseException {/*@bgen(jjtree) IfStateme
Block();
label_22:
while (true) {
if (jj_2_10(2)) {
if (jj_2_10(3)) {
;
} else {
break label_22;
}
jj_consume_token(82);
jj_consume_token(ELSEIF);
jj_consume_token(LPAREN);
Expression();
jj_consume_token(RPAREN);
Block();
Expand Down Expand Up @@ -3679,7 +3680,8 @@ private boolean jj_3R_82()

private boolean jj_3_10()
{
if (jj_scan_token(82)) return true;
if (jj_scan_token(ELSEIF)) return true;
if (jj_scan_token(LPAREN)) return true;
if (jj_3R_31()) return true;
return false;
}
Expand Down Expand Up @@ -4356,7 +4358,7 @@ private void jj_add_error_token(int kind, int pos) {
/** Generate ParseException. */
public ParseException generateParseException() {
jj_expentries.clear();
boolean[] la1tokens = new boolean[83];
boolean[] la1tokens = new boolean[82];
if (jj_kind >= 0) {
la1tokens[jj_kind] = true;
jj_kind = -1;
Expand All @@ -4376,7 +4378,7 @@ public ParseException generateParseException() {
}
}
}
for (int i = 0; i < 83; i++) {
for (int i = 0; i < 82; i++) {
if (la1tokens[i]) {
jj_expentry = new int[1];
jj_expentry[0] = i;
Expand Down
Expand Up @@ -248,7 +248,6 @@ public interface OSTRAJavaParserConstants {
"<LETTER>",
"<DIGIT>",
"\":\"",
"\"kajtez (\"",
};

}

0 comments on commit 94c15f8

Please sign in to comment.