[opengtl-commits] [641] fix parsing of dependent with an array |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/opengtl-commits Archives
]
Revision: 641
Author: cyrille
Date: 2009-03-16 18:02:29 +0100 (Mon, 16 Mar 2009)
Log Message:
-----------
fix parsing of dependent with an array
Modified Paths:
--------------
trunk/OpenGTL/OpenShiva/OpenShiva/Parser_p.cpp
trunk/OpenGTL/OpenShiva/tests/parse/CMakeLists.txt
Added Paths:
-----------
trunk/OpenGTL/OpenShiva/tests/parse/dependentarray.shiva
Modified: trunk/OpenGTL/OpenShiva/OpenShiva/Parser_p.cpp
===================================================================
--- trunk/OpenGTL/OpenShiva/OpenShiva/Parser_p.cpp 2009-03-16 16:51:19 UTC (rev 640)
+++ trunk/OpenGTL/OpenShiva/OpenShiva/Parser_p.cpp 2009-03-16 17:02:29 UTC (rev 641)
@@ -275,6 +275,7 @@
if( isOfType( currentToken(), GTLCore::Token::IDENTIFIER ) )
{
GTLCore::String name = currentToken().string;
+ getNextToken();
GTL_DEBUG("Dependent: " << name);
std::list<int> memberArraySize = expressionsListToIntegersList( parseArraySize(true) );
type = d->compiler->typesManager()->getArray( type, memberArraySize.size() );
@@ -288,7 +289,6 @@
d->dependents.push_back( gcd->variable() );
tree()->append( gcd );
}
- getNextToken();
} else {
GTL_DEBUG("Unexpected");
reportUnexpected( currentToken() );
Modified: trunk/OpenGTL/OpenShiva/tests/parse/CMakeLists.txt
===================================================================
--- trunk/OpenGTL/OpenShiva/tests/parse/CMakeLists.txt 2009-03-16 16:51:19 UTC (rev 640)
+++ trunk/OpenGTL/OpenShiva/tests/parse/CMakeLists.txt 2009-03-16 17:02:29 UTC (rev 641)
@@ -6,6 +6,7 @@
region.shiva
import.shiva
multipledependent.shiva
+ dependentarray.shiva
)
FOREACH( TEST_FILE ${TESTS_FILES} )
Added: trunk/OpenGTL/OpenShiva/tests/parse/dependentarray.shiva
===================================================================
--- trunk/OpenGTL/OpenShiva/tests/parse/dependentarray.shiva (rev 0)
+++ trunk/OpenGTL/OpenShiva/tests/parse/dependentarray.shiva 2009-03-16 17:02:29 UTC (rev 641)
@@ -0,0 +1,8 @@
+kernel MyKernel
+{
+ dependent float r1[4];
+ void evaluatePixel(output pixel result)
+ {
+
+ }
+}