Opened 10 years ago
Closed 10 years ago
#2796 closed Bug (No Bug)
Syntax error not detected
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.3.12.4 | Severity: | None |
Keywords: | syntax error | Cc: |
Description
Local $this = true, $should ($this ? $should : $not.be (valid autoit, see [(])) - no syntax error)
Discovered after examining these new tables.
Attachments (0)
Change History (6)
comment:1 follow-up: ↓ 2 Changed 10 years ago by Jpm
comment:2 in reply to: ↑ 1 ; follow-up: ↓ 4 Changed 10 years ago by anonymous
Replying to Jpm:
something not correct in the potes repro script.
(True ? 1 : unchecked context)
Au3Check.exe complains ("unbalanced paranthesis"), but AutoIt3.exe can execute it. Isn't that is the reference implementation?
Right now I'm asking myself how it is possible to write something that can ignore syntax errors. Does it simply skip tokens that don't modify the state of the interpreter, without parsing the whole expression?
comment:3 Changed 10 years ago by Mat
This is not a bug. The code that's executed will either be valid, or exit with a syntax error and the code that is not executed doesn't matter to the interpreter. Why do you think it should parse the non-executed code?
That's why we have tools like Au3Check.
This also opens up some exciting opportunities to do some clever stuff.
comment:4 in reply to: ↑ 2 ; follow-up: ↓ 5 Changed 10 years ago by Jpm
Replying to anonymous:
Replying to Jpm:
something not correct in the potes repro script.
(True ? 1 : unchecked context)Au3Check.exe complains ("unbalanced paranthesis"), but AutoIt3.exe can execute it. Isn't that is the reference implementation?
Right now I'm asking myself how it is possible to write something that can ignore syntax errors. Does it simply skip tokens that don't modify the state of the interpreter, without parsing the whole expression?
I agree the unbalanced is too much but the other error messages are true at least that what Au3check wants to do. Slight difference with AutoIt as just an expression is wrong.
a statement must have an assignment. Only direct call to functions are allowed as func().
Au3Check as a lot of limitation due to a one pass design, but it try to match as much as possible AutoIt syntax the best he can.
comment:5 in reply to: ↑ 4 Changed 10 years ago by anonymous
Replying to Mat:
This also opens up some exciting opportunities to do some clever stuff.
Which opportunities do you mean?
Local $value = 1 ? 0 :-( (False And :-)
The syntax check of the interpreter is inconsistent: a simple point is always an error, even if the interpreter never could reach the line containing the point.
comment:6 Changed 10 years ago by jchd18
- Resolution set to No Bug
- Status changed from new to closed
You clearly don't understand how an interpretor works.
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
something not correct in the potes repro script.
Can you update it
Thanks