Commit Graph

51 Commits

Author SHA1 Message Date
Nikolai Kosjar
f15646622a GLSL: Limit recovery attempts
"switch(" was recovered with number, ), ), ), ...

Task-number: QTCREATORBUG-18967
Change-Id: I12ccea0925fb2956de7405d9c8afea5dddeaf4f9
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2018-01-18 08:05:15 +00:00
Nikolai Kosjar
315031e3f5 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>
2017-09-28 10:40:32 +00:00
Nikolai Kosjar
c354eff5e9 GLSL: Fix conversion warnings on Windows
This was actually already fixed with

  Fix compiler warnings on windows.
  commit cc04b84917.

However, glslparser.{h,cpp} were changed, which are generated from
glsl.g. Fix the warnings in the source file glsl.g so the next time the
parser is re-generated the changes are not lost.

Change-Id: If7e5f45ff1a93d1d7b6c9213697884f5a7e9ec5f
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2017-09-28 10:40:26 +00:00
Nikolai Kosjar
aca8e8643c GLSL: Re-generate parser
...by running ./make-parser.sh to make a subsequent change less noisy.

qlalr in PATH is from Qt 5.9.1.

Change-Id: Ia39181b55cd0e16207fa809f0db92cdeba3b095c
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2017-09-28 10:40:19 +00:00
David Schulz
cc04b84917 Fix compiler warnings on windows.
Ignore some warnings inside 3rd party code and fix a lot of conversion
warnings.

Change-Id: I909f2f31a4639015bf7dd028d2d435ff1d1167bc
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-04-22 07:37:31 +00:00
Tobias Hunger
f72370f20a Update License according to agreement with Free Qt Foundation
* Update remaining files in src

Change-Id: I1896f17fcf34f71c3310c87899fb5171b8e4afb1
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:59:41 +00:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
Oswald Buddenhagen
1fda2111d4 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
	src/plugins/qmldesigner/designercore/include/widgetqueryview.h
	src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h
	src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
	src/plugins/qnx/bardescriptormagicmatcher.h
	src/plugins/qt4projectmanager/profilekeywords.cpp
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h

Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
2013-01-31 16:25:33 +01:00
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
Orgad Shaneh
5f10acd5c9 GLSL: Compile with QT_NO_CAST_FROM_ASCII
Change-Id: Ib959a9aa39d8f87b0f0b5e297547913c1daa9c14
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2012-12-04 09:15:28 +01:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
Christian Kamm
e91045469d GLSL: Fix recovery token order to avoid infinite loop.
The case 'a = b ? ;' recovered with T_NUMBER, T_COMMA, T_NUMBER, ...

Task-number: QTCREATORBUG-7517
Change-Id: I3546266b21d11ce08e4af1331be94a78d3b24c19
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-08-07 09:19:57 +02:00
Eike Ziller
e0e8cf3ada Contact -> qt-project.org
Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-19 13:23:21 +02:00
Erik Verbruggen
3fa55b7ab9 Removed module names from #include directives.
Getting the #include directives ready for Qt5. This includes the
new-project wizards.

Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-15 16:24:46 +01:00
hjk
2931a499e6 Long live the king!
Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-26 19:55:36 +01:00
hjk
31600758de all: s/info@qt.nokia.com/qt-info@nokia.com/
Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-11-03 10:33:19 +01:00
Tobias Hunger
aa2acec14c Fix/add copyright headers
Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
2011-05-06 15:17:05 +02:00
Roberto Raggi
c6653f43b7 Fix possible crash when parsing layout qualifiers nodes.
Task-number: QTCREATORBUG-4563
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2011-04-18 11:17:27 +02:00
hjk
8397663964 Update license. 2011-04-13 11:49:28 +02:00
Erik Verbruggen
d6217a07ff Fixed (C)opyright headers. 2011-02-21 12:41:30 +01:00
con
d1023c7614 It's 2011 now.
Reviewed-by: hjk
2011-01-12 09:46:24 +01:00
con
23c22b7c66 License headers, part 2 2010-12-17 17:14:20 +01:00
Roberto Raggi
cf793418c3 Handle logical xor. 2010-11-30 16:10:27 +01:00
Roberto Raggi
63849faf9d Recover from unfinished do-while loops. 2010-11-29 22:23:33 +01:00
Roberto Raggi
55234b9d16 Implemented some basic code completion. 2010-11-29 18:06:21 +01:00
Roberto Raggi
90bf956cc1 Simple error recovery.
Well, it's not very advanced but it is probably good enough for now.
2010-11-29 09:56:26 +01:00
Rhys Weatherley
c173959f89 Remove type categories from the GLSL AST
Type categories are now handled at semantic analysis time
so we don't need to track them at syntax analysis time.
2010-11-29 13:04:54 +10:00
Roberto Raggi
f29924308f Added Engine::blockDiagnosticMessages() 2010-11-26 14:26:07 +01:00
Rhys Weatherley
e6f1fa0637 Fix AST for GLSL DeclarationStatement
DeclarationStatement wraps a single declaration, not a list.
2010-11-26 10:06:05 +10:00
Roberto Raggi
864c3bfc98 Added the suffix AST to the ast nodes and some initial work on the GLSL type system. 2010-11-25 12:56:16 +01:00
Rhys Weatherley
7ccc6fc7f7 Highlight reserved GLSL keywords 2010-11-23 17:05:55 +10:00
Roberto Raggi
131df3c3d0 Report the syntax errors. 2010-11-19 14:59:33 +01:00
Rhys Weatherley
2d4e75101e Use QString instead of std::string in GLSL parser 2010-11-18 17:40:09 +10:00
Rhys Weatherley
1370d1d796 Fix some bugs in GLSL AST generation in the parser 2010-11-18 14:42:39 +10:00
Rhys Weatherley
2fab4ba8ad GLSL AST nodes for function and struct decls 2010-11-18 13:36:50 +10:00
Rhys Weatherley
a666c48cf5 Variable and parameter declarations for GLSL 2010-11-17 15:23:13 +10:00
Rhys Weatherley
443be8eea6 Create AST nodes for qualified GLSL types 2010-11-15 15:02:21 +10:00
Rhys Weatherley
1f8f99df28 Build AST nodes from within the parser. 2010-11-12 14:04:09 +10:00
Rhys Weatherley
73f77a0b8e Making GLSL AST nodes while preserving lineno info
Eventually we will need some way to locate an identifier's
definition, so add "lineno" to each AST node.  May want to
change this to "position" later.  The makeAstNode<T>() function
takes care of automatically decorating nodes with line numbers.
2010-11-12 09:57:05 +10:00
Rhys Weatherley
73d570c83a Convert GLSL AST nodes into managed types 2010-11-12 09:29:50 +10:00
Roberto Raggi
c3b821a0d3 Handle parenthesized expressions. 2010-11-11 15:43:16 +01:00
Roberto Raggi
b311703234 Create AST nodes for multiplicative expressions. 2010-11-11 15:25:19 +01:00
Roberto Raggi
701ff3887d There's nothing to do for the chain rules. 2010-11-11 15:21:27 +01:00
Roberto Raggi
53218ff7c7 Introduced a simple memory pool. 2010-11-11 15:07:30 +01:00
Roberto Raggi
06df2e2d29 Use only interned (unique) strings. 2010-11-11 15:07:30 +01:00
Roberto Raggi
ca4439bcef Get rid of glsl.g.in and start working on the semantic actions. 2010-11-11 12:22:58 +01:00
Roberto Raggi
b0622d840b Include stdio and regenerated the parser. 2010-11-10 16:30:35 +01:00
Roberto Raggi
959edbe10b Introduced a simple incremental lexer for GLSL. 2010-11-10 15:57:39 +01:00