GLSL: Avoid infinite loop at error recovery

For error recovery additional tokens are tried to produce a valid
grammar rule.

For the specific case in the bug report

    for(int x=0; x y

the two consecutive identifiers in the end triggered an infinite loop
since the identifier token is also part of those additional tokens that
are tried.

Circumvent this by trying a more conservative list of tokens on the
second try.

Done-by: Erik Verbruggen
Change-Id: I271dddecf947a06ed3af5f9955ee630441533342
Task-number: QTCREATORBUG-18967
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Nikolai Kosjar
2017-09-28 11:39:34 +02:00
parent c354eff5e9
commit 315031e3f5
2 changed files with 353 additions and 323 deletions

File diff suppressed because it is too large Load Diff