From dfa99c2bcb012dc73ba2a5a9c89adc313508077d Mon Sep 17 00:00:00 2001 From: villberg Date: Wed, 25 Jun 2014 08:42:20 +0000 Subject: [PATCH] refs #5019 git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@29733 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../fi/semantum/sysdyn/solver/NodeClass.java | 1 + .../src/fi/semantum/sysdyn/solver/Parser.java | 25 +++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/NodeClass.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/NodeClass.java index 532c053a..8d2e49a0 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/NodeClass.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/NodeClass.java @@ -33,6 +33,7 @@ public enum NodeClass { subscript_2, component_clause, component_declaration, + component_list, array_subscripts, declaration, class_definition, diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Parser.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Parser.java index 5bc59bce..e2c722d7 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Parser.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Parser.java @@ -257,9 +257,20 @@ public class Parser { IExpression[] subscripts = (third instanceof IExpression[])? (IExpression[])third : null; int declarationStart = (third instanceof IExpression[]) ? 3 : 2; ArrayList clauses = new ArrayList(); - for(int i=declarationStart;i declarations2 = new ArrayList(); + if(third instanceof ArrayList) { + ArrayList decls = (ArrayList)third; + declarations2.addAll(decls); + } else { + for(int i=declarationStart;i result = new ArrayList(); + for(int i=0;i