Project

General

Profile

Bug #1166

AF3 compiler compiles also invalid expressions

Added by Anonymous almost 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
-
Category:
-
Start date:
01/17/2013
Due date:
% Done:

100%

Estimated time:

Description

test.org.fortiss.af3.expression.compiler.CompilerTest contains a test that fails

The compiler compiles: "aVar aFunCall() & anotherVar anotherFunCall()" even if it shouldn't.

History

#1 Updated by Anonymous almost 8 years ago

  • Status changed from New to Resolved
  • Assignee changed from Anonymous to Anonymous
  • % Done changed from 0 to 90

The problem is caused by lexer and parser.

First the lexer doesn't recognize the "&" token, so the parser only sees

aVar == aFunCall() anotherVar == anotherFunCall()

Second the parser tries to match the string with rule "term EOF", which causes a missing token error. This error is however not thrown by parser.

I modified the compileTerm() method to recognize the second case. The first case must be further investigated.

#2 Updated by Anonymous almost 8 years ago

  • Status changed from Resolved to Closed
  • Assignee deleted (Anonymous)
  • % Done changed from 90 to 100

Also available in: Atom PDF