Restricted version of imported ANTLR packages, compile with 3.5.2
[simantics/platform.git] / bundles / org.simantics.graph.compiler / src / org / simantics / graph / compiler / internal / parsing / GraphParser.java
index 244199b73064bedb6439ea78511d867d124102a2..8fca98c53730908640c0b053fbdd5867ccf4d52c 100644 (file)
-// $ANTLR 3.3 Nov 30, 2010 12:50:56 src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g 2011-12-19 14:53:14\r
- package org.simantics.graph.compiler.internal.parsing; \r
-\r
-import org.antlr.runtime.*;\r
-import java.util.Stack;\r
-import java.util.List;\r
-import java.util.ArrayList;\r
-import java.util.Map;\r
-import java.util.HashMap;\r
-\r
-import org.antlr.runtime.tree.*;\r
-\r
-@SuppressWarnings("unused")\r
-public class GraphParser extends Parser {\r
-    public static final String[] tokenNames = new String[] {\r
-        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "INDENT", "DEDENT", "FILE", "RESOURCE", "PROPERTY", "VARIABLE", "EMBEDDED_VALUE", "EMBEDDED_TYPE", "TEMPLATE_INSTANCE", "TEMPLATE_DEFINITION", "BLANK", "REF", "EQUALS", "INSTANCE_OF", "INHERITS", "SUBRELATION_OF", "HAS_DOMAIN", "HAS_RANGE", "DOMAIN_OF", "REQUIRES_VALUE_TYPE", "TYPE_DEFINITIONS", "TYPE_DEFINITION", "UNION_TYPE", "RECORD_TYPE", "TUPLE_TYPE", "ARRAY_TYPE", "TYPE_REFERENCE", "TYPE_ANNOTATION", "TYPE_COMPONENT", "VALUE_DEFINITIONS", "VALUE_DEFINITION", "NO_VALUE", "VARIANT", "ARRAY", "TUPLE", "TAGGED_VALUE", "RECORD", "MAP", "ASSIGNMENT", "TRUE", "FALSE", "ID", "COMMENT", "WS", "LPAREN", "RPAREN", "LBRACKET", "RBRACKET", "LCURLY", "RCURLY", "INT", "INT_RANGE", "FLOAT", "RANGE", "NEWLINE", "EXPONENT", "ESC_SEQ", "STRING", "URI", "HEX_DIGIT", "UNICODE_ESC", "'@'", "'.'", "'<T'", "'<R'", "'<--'", "'-->'", "'==>'", "'>--'", "':'", "'='", "'%'", "'$'", "'|'", "','", "'true'", "'false'"\r
-    };\r
-    public static final int EOF=-1;\r
-    public static final int T__65=65;\r
-    public static final int T__66=66;\r
-    public static final int T__67=67;\r
-    public static final int T__68=68;\r
-    public static final int T__69=69;\r
-    public static final int T__70=70;\r
-    public static final int T__71=71;\r
-    public static final int T__72=72;\r
-    public static final int T__73=73;\r
-    public static final int T__74=74;\r
-    public static final int T__75=75;\r
-    public static final int T__76=76;\r
-    public static final int T__77=77;\r
-    public static final int T__78=78;\r
-    public static final int T__79=79;\r
-    public static final int T__80=80;\r
-    public static final int INDENT=4;\r
-    public static final int DEDENT=5;\r
-    public static final int FILE=6;\r
-    public static final int RESOURCE=7;\r
-    public static final int PROPERTY=8;\r
-    public static final int VARIABLE=9;\r
-    public static final int EMBEDDED_VALUE=10;\r
-    public static final int EMBEDDED_TYPE=11;\r
-    public static final int TEMPLATE_INSTANCE=12;\r
-    public static final int TEMPLATE_DEFINITION=13;\r
-    public static final int BLANK=14;\r
-    public static final int REF=15;\r
-    public static final int EQUALS=16;\r
-    public static final int INSTANCE_OF=17;\r
-    public static final int INHERITS=18;\r
-    public static final int SUBRELATION_OF=19;\r
-    public static final int HAS_DOMAIN=20;\r
-    public static final int HAS_RANGE=21;\r
-    public static final int DOMAIN_OF=22;\r
-    public static final int REQUIRES_VALUE_TYPE=23;\r
-    public static final int TYPE_DEFINITIONS=24;\r
-    public static final int TYPE_DEFINITION=25;\r
-    public static final int UNION_TYPE=26;\r
-    public static final int RECORD_TYPE=27;\r
-    public static final int TUPLE_TYPE=28;\r
-    public static final int ARRAY_TYPE=29;\r
-    public static final int TYPE_REFERENCE=30;\r
-    public static final int TYPE_ANNOTATION=31;\r
-    public static final int TYPE_COMPONENT=32;\r
-    public static final int VALUE_DEFINITIONS=33;\r
-    public static final int VALUE_DEFINITION=34;\r
-    public static final int NO_VALUE=35;\r
-    public static final int VARIANT=36;\r
-    public static final int ARRAY=37;\r
-    public static final int TUPLE=38;\r
-    public static final int TAGGED_VALUE=39;\r
-    public static final int RECORD=40;\r
-    public static final int MAP=41;\r
-    public static final int ASSIGNMENT=42;\r
-    public static final int TRUE=43;\r
-    public static final int FALSE=44;\r
-    public static final int ID=45;\r
-    public static final int COMMENT=46;\r
-    public static final int WS=47;\r
-    public static final int LPAREN=48;\r
-    public static final int RPAREN=49;\r
-    public static final int LBRACKET=50;\r
-    public static final int RBRACKET=51;\r
-    public static final int LCURLY=52;\r
-    public static final int RCURLY=53;\r
-    public static final int INT=54;\r
-    public static final int INT_RANGE=55;\r
-    public static final int FLOAT=56;\r
-    public static final int RANGE=57;\r
-    public static final int NEWLINE=58;\r
-    public static final int EXPONENT=59;\r
-    public static final int ESC_SEQ=60;\r
-    public static final int STRING=61;\r
-    public static final int URI=62;\r
-    public static final int HEX_DIGIT=63;\r
-    public static final int UNICODE_ESC=64;\r
-\r
-    // delegates\r
-    // delegators\r
-\r
-\r
-        public GraphParser(TokenStream input) {\r
-            this(input, new RecognizerSharedState());\r
-        }\r
-        public GraphParser(TokenStream input, RecognizerSharedState state) {\r
-            super(input, state);\r
-             \r
-        }\r
-        \r
-    protected TreeAdaptor adaptor = new CommonTreeAdaptor();\r
-\r
-    public void setTreeAdaptor(TreeAdaptor adaptor) {\r
-        this.adaptor = adaptor;\r
-    }\r
-    public TreeAdaptor getTreeAdaptor() {\r
-        return adaptor;\r
-    }\r
-\r
-    public String[] getTokenNames() { return GraphParser.tokenNames; }\r
-    public String getGrammarFileName() { return "src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g"; }\r
-\r
-\r
-    public static class file_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "file"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:224:1: file : ( NEWLINE )? ( resourceDefinitions )? EOF -> ^( FILE ( resourceDefinitions )? ) ;\r
-    public final GraphParser.file_return file() throws RecognitionException {\r
-        GraphParser.file_return retval = new GraphParser.file_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token NEWLINE1=null;\r
-        Token EOF3=null;\r
-        GraphParser.resourceDefinitions_return resourceDefinitions2 = null;\r
-\r
-\r
-        CommonTree NEWLINE1_tree=null;\r
-        CommonTree EOF3_tree=null;\r
-        RewriteRuleTokenStream stream_NEWLINE=new RewriteRuleTokenStream(adaptor,"token NEWLINE");\r
-        RewriteRuleTokenStream stream_EOF=new RewriteRuleTokenStream(adaptor,"token EOF");\r
-        RewriteRuleSubtreeStream stream_resourceDefinitions=new RewriteRuleSubtreeStream(adaptor,"rule resourceDefinitions");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:224:6: ( ( NEWLINE )? ( resourceDefinitions )? EOF -> ^( FILE ( resourceDefinitions )? ) )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:224:8: ( NEWLINE )? ( resourceDefinitions )? EOF\r
-            {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:224:8: ( NEWLINE )?\r
-            int alt1=2;\r
-            int LA1_0 = input.LA(1);\r
-\r
-            if ( (LA1_0==NEWLINE) ) {\r
-                alt1=1;\r
-            }\r
-            switch (alt1) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:224:8: NEWLINE\r
-                    {\r
-                    NEWLINE1=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_file1230); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE1);\r
-\r
-\r
-                    }\r
-                    break;\r
-\r
-            }\r
-\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:224:17: ( resourceDefinitions )?\r
-            int alt2=2;\r
-            int LA2_0 = input.LA(1);\r
-\r
-            if ( (LA2_0==ID||LA2_0==LPAREN||LA2_0==LBRACKET||LA2_0==LCURLY||LA2_0==INT||LA2_0==FLOAT||(LA2_0>=STRING && LA2_0<=URI)||LA2_0==65||(LA2_0>=75 && LA2_0<=76)||(LA2_0>=79 && LA2_0<=80)) ) {\r
-                alt2=1;\r
-            }\r
-            switch (alt2) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:224:17: resourceDefinitions\r
-                    {\r
-                    pushFollow(FOLLOW_resourceDefinitions_in_file1233);\r
-                    resourceDefinitions2=resourceDefinitions();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) stream_resourceDefinitions.add(resourceDefinitions2.getTree());\r
-\r
-                    }\r
-                    break;\r
-\r
-            }\r
-\r
-            EOF3=(Token)match(input,EOF,FOLLOW_EOF_in_file1236); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_EOF.add(EOF3);\r
-\r
-\r
-\r
-            // AST REWRITE\r
-            // elements: resourceDefinitions\r
-            // token labels: \r
-            // rule labels: retval\r
-            // token list labels: \r
-            // rule list labels: \r
-            // wildcard labels: \r
-            if ( state.backtracking==0 ) {\r
-            retval.tree = root_0;\r
-            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-            root_0 = (CommonTree)adaptor.nil();\r
-            // 224:42: -> ^( FILE ( resourceDefinitions )? )\r
-            {\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:224:45: ^( FILE ( resourceDefinitions )? )\r
-                {\r
-                CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(FILE, "FILE"), root_1);\r
-\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:224:52: ( resourceDefinitions )?\r
-                if ( stream_resourceDefinitions.hasNext() ) {\r
-                    adaptor.addChild(root_1, stream_resourceDefinitions.nextTree());\r
-\r
-                }\r
-                stream_resourceDefinitions.reset();\r
-\r
-                adaptor.addChild(root_0, root_1);\r
-                }\r
-\r
-            }\r
-\r
-            retval.tree = root_0;}\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "file"\r
-\r
-    public static class resourceDefinitions_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "resourceDefinitions"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:226:1: resourceDefinitions : resourceDefinition ( NEWLINE resourceDefinition )* ;\r
-    public final GraphParser.resourceDefinitions_return resourceDefinitions() throws RecognitionException {\r
-        GraphParser.resourceDefinitions_return retval = new GraphParser.resourceDefinitions_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token NEWLINE5=null;\r
-        GraphParser.resourceDefinition_return resourceDefinition4 = null;\r
-\r
-        GraphParser.resourceDefinition_return resourceDefinition6 = null;\r
-\r
-\r
-        CommonTree NEWLINE5_tree=null;\r
-\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:227:6: ( resourceDefinition ( NEWLINE resourceDefinition )* )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:227:8: resourceDefinition ( NEWLINE resourceDefinition )*\r
-            {\r
-            root_0 = (CommonTree)adaptor.nil();\r
-\r
-            pushFollow(FOLLOW_resourceDefinition_in_resourceDefinitions1260);\r
-            resourceDefinition4=resourceDefinition();\r
-\r
-            state._fsp--;\r
-            if (state.failed) return retval;\r
-            if ( state.backtracking==0 ) adaptor.addChild(root_0, resourceDefinition4.getTree());\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:227:27: ( NEWLINE resourceDefinition )*\r
-            loop3:\r
-            do {\r
-                int alt3=2;\r
-                int LA3_0 = input.LA(1);\r
-\r
-                if ( (LA3_0==NEWLINE) ) {\r
-                    alt3=1;\r
-                }\r
-\r
-\r
-                switch (alt3) {\r
-               case 1 :\r
-                   // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:227:28: NEWLINE resourceDefinition\r
-                   {\r
-                   NEWLINE5=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_resourceDefinitions1263); if (state.failed) return retval;\r
-                   pushFollow(FOLLOW_resourceDefinition_in_resourceDefinitions1266);\r
-                   resourceDefinition6=resourceDefinition();\r
-\r
-                   state._fsp--;\r
-                   if (state.failed) return retval;\r
-                   if ( state.backtracking==0 ) adaptor.addChild(root_0, resourceDefinition6.getTree());\r
-\r
-                   }\r
-                   break;\r
-\r
-               default :\r
-                   break loop3;\r
-                }\r
-            } while (true);\r
-\r
-\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "resourceDefinitions"\r
-\r
-    public static class resourceDefinition_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "resourceDefinition"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:230:1: resourceDefinition : ( resource ( localProperty )* ( INDENT property ( NEWLINE property )* DEDENT )? -> ^( RESOURCE resource ( localProperty )* ( property )* ) | template -> ^( RESOURCE ^( BLANK template ) template ) );\r
-    public final GraphParser.resourceDefinition_return resourceDefinition() throws RecognitionException {\r
-        GraphParser.resourceDefinition_return retval = new GraphParser.resourceDefinition_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token INDENT9=null;\r
-        Token NEWLINE11=null;\r
-        Token DEDENT13=null;\r
-        GraphParser.resource_return resource7 = null;\r
-\r
-        GraphParser.localProperty_return localProperty8 = null;\r
-\r
-        GraphParser.property_return property10 = null;\r
-\r
-        GraphParser.property_return property12 = null;\r
-\r
-        GraphParser.template_return template14 = null;\r
-\r
-\r
-        CommonTree INDENT9_tree=null;\r
-        CommonTree NEWLINE11_tree=null;\r
-        CommonTree DEDENT13_tree=null;\r
-        RewriteRuleTokenStream stream_DEDENT=new RewriteRuleTokenStream(adaptor,"token DEDENT");\r
-        RewriteRuleTokenStream stream_NEWLINE=new RewriteRuleTokenStream(adaptor,"token NEWLINE");\r
-        RewriteRuleTokenStream stream_INDENT=new RewriteRuleTokenStream(adaptor,"token INDENT");\r
-        RewriteRuleSubtreeStream stream_template=new RewriteRuleSubtreeStream(adaptor,"rule template");\r
-        RewriteRuleSubtreeStream stream_resource=new RewriteRuleSubtreeStream(adaptor,"rule resource");\r
-        RewriteRuleSubtreeStream stream_property=new RewriteRuleSubtreeStream(adaptor,"rule property");\r
-        RewriteRuleSubtreeStream stream_localProperty=new RewriteRuleSubtreeStream(adaptor,"rule localProperty");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:231:5: ( resource ( localProperty )* ( INDENT property ( NEWLINE property )* DEDENT )? -> ^( RESOURCE resource ( localProperty )* ( property )* ) | template -> ^( RESOURCE ^( BLANK template ) template ) )\r
-            int alt7=2;\r
-            int LA7_0 = input.LA(1);\r
-\r
-            if ( (LA7_0==ID||LA7_0==LPAREN||LA7_0==LBRACKET||LA7_0==LCURLY||LA7_0==INT||LA7_0==FLOAT||(LA7_0>=STRING && LA7_0<=URI)||(LA7_0>=75 && LA7_0<=76)||(LA7_0>=79 && LA7_0<=80)) ) {\r
-                alt7=1;\r
-            }\r
-            else if ( (LA7_0==65) ) {\r
-                alt7=2;\r
-            }\r
-            else {\r
-                if (state.backtracking>0) {state.failed=true; return retval;}\r
-                NoViableAltException nvae =\r
-                    new NoViableAltException("", 7, 0, input);\r
-\r
-                throw nvae;\r
-            }\r
-            switch (alt7) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:231:7: resource ( localProperty )* ( INDENT property ( NEWLINE property )* DEDENT )?\r
-                    {\r
-                    pushFollow(FOLLOW_resource_in_resourceDefinition1300);\r
-                    resource7=resource();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) stream_resource.add(resource7.getTree());\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:232:7: ( localProperty )*\r
-                    loop4:\r
-                    do {\r
-                        int alt4=2;\r
-                        int LA4_0 = input.LA(1);\r
-\r
-                        if ( (LA4_0==ID||LA4_0==URI||(LA4_0>=67 && LA4_0<=75)) ) {\r
-                            alt4=1;\r
-                        }\r
-\r
-\r
-                        switch (alt4) {\r
-                       case 1 :\r
-                           // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:232:7: localProperty\r
-                           {\r
-                           pushFollow(FOLLOW_localProperty_in_resourceDefinition1308);\r
-                           localProperty8=localProperty();\r
-\r
-                           state._fsp--;\r
-                           if (state.failed) return retval;\r
-                           if ( state.backtracking==0 ) stream_localProperty.add(localProperty8.getTree());\r
-\r
-                           }\r
-                           break;\r
-\r
-                       default :\r
-                           break loop4;\r
-                        }\r
-                    } while (true);\r
-\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:233:7: ( INDENT property ( NEWLINE property )* DEDENT )?\r
-                    int alt6=2;\r
-                    int LA6_0 = input.LA(1);\r
-\r
-                    if ( (LA6_0==INDENT) ) {\r
-                        alt6=1;\r
-                    }\r
-                    switch (alt6) {\r
-                        case 1 :\r
-                            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:233:8: INDENT property ( NEWLINE property )* DEDENT\r
-                            {\r
-                            INDENT9=(Token)match(input,INDENT,FOLLOW_INDENT_in_resourceDefinition1318); if (state.failed) return retval; \r
-                            if ( state.backtracking==0 ) stream_INDENT.add(INDENT9);\r
-\r
-                            pushFollow(FOLLOW_property_in_resourceDefinition1320);\r
-                            property10=property();\r
-\r
-                            state._fsp--;\r
-                            if (state.failed) return retval;\r
-                            if ( state.backtracking==0 ) stream_property.add(property10.getTree());\r
-                            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:233:24: ( NEWLINE property )*\r
-                            loop5:\r
-                            do {\r
-                                int alt5=2;\r
-                                int LA5_0 = input.LA(1);\r
-\r
-                                if ( (LA5_0==NEWLINE) ) {\r
-                                    alt5=1;\r
-                                }\r
-\r
-\r
-                                switch (alt5) {\r
-                               case 1 :\r
-                                   // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:233:25: NEWLINE property\r
-                                   {\r
-                                   NEWLINE11=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_resourceDefinition1323); if (state.failed) return retval; \r
-                                   if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE11);\r
-\r
-                                   pushFollow(FOLLOW_property_in_resourceDefinition1325);\r
-                                   property12=property();\r
-\r
-                                   state._fsp--;\r
-                                   if (state.failed) return retval;\r
-                                   if ( state.backtracking==0 ) stream_property.add(property12.getTree());\r
-\r
-                                   }\r
-                                   break;\r
-\r
-                               default :\r
-                                   break loop5;\r
-                                }\r
-                            } while (true);\r
-\r
-                            DEDENT13=(Token)match(input,DEDENT,FOLLOW_DEDENT_in_resourceDefinition1329); if (state.failed) return retval; \r
-                            if ( state.backtracking==0 ) stream_DEDENT.add(DEDENT13);\r
-\r
-\r
-                            }\r
-                            break;\r
-\r
-                    }\r
-\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: property, localProperty, resource\r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 234:5: -> ^( RESOURCE resource ( localProperty )* ( property )* )\r
-                    {\r
-                        // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:234:8: ^( RESOURCE resource ( localProperty )* ( property )* )\r
-                        {\r
-                        CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                        root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(RESOURCE, "RESOURCE"), root_1);\r
-\r
-                        adaptor.addChild(root_1, stream_resource.nextTree());\r
-                        // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:234:28: ( localProperty )*\r
-                        while ( stream_localProperty.hasNext() ) {\r
-                            adaptor.addChild(root_1, stream_localProperty.nextTree());\r
-\r
-                        }\r
-                        stream_localProperty.reset();\r
-                        // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:234:43: ( property )*\r
-                        while ( stream_property.hasNext() ) {\r
-                            adaptor.addChild(root_1, stream_property.nextTree());\r
-\r
-                        }\r
-                        stream_property.reset();\r
-\r
-                        adaptor.addChild(root_0, root_1);\r
-                        }\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-                    break;\r
-                case 2 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:235:7: template\r
-                    {\r
-                    pushFollow(FOLLOW_template_in_resourceDefinition1358);\r
-                    template14=template();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) stream_template.add(template14.getTree());\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: template, template\r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 235:16: -> ^( RESOURCE ^( BLANK template ) template )\r
-                    {\r
-                        // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:235:19: ^( RESOURCE ^( BLANK template ) template )\r
-                        {\r
-                        CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                        root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(RESOURCE, "RESOURCE"), root_1);\r
-\r
-                        // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:235:30: ^( BLANK template )\r
-                        {\r
-                        CommonTree root_2 = (CommonTree)adaptor.nil();\r
-                        root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(BLANK, "BLANK"), root_2);\r
-\r
-                        adaptor.addChild(root_2, stream_template.nextTree());\r
-\r
-                        adaptor.addChild(root_1, root_2);\r
-                        }\r
-                        adaptor.addChild(root_1, stream_template.nextTree());\r
-\r
-                        adaptor.addChild(root_0, root_1);\r
-                        }\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-                    break;\r
-\r
-            }\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "resourceDefinition"\r
-\r
-    public static class localProperty_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "localProperty"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:238:1: localProperty : relation resource -> ^( PROPERTY relation ^( RESOURCE resource ) ) ;\r
-    public final GraphParser.localProperty_return localProperty() throws RecognitionException {\r
-        GraphParser.localProperty_return retval = new GraphParser.localProperty_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        GraphParser.relation_return relation15 = null;\r
-\r
-        GraphParser.resource_return resource16 = null;\r
-\r
-\r
-        RewriteRuleSubtreeStream stream_relation=new RewriteRuleSubtreeStream(adaptor,"rule relation");\r
-        RewriteRuleSubtreeStream stream_resource=new RewriteRuleSubtreeStream(adaptor,"rule resource");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:239:5: ( relation resource -> ^( PROPERTY relation ^( RESOURCE resource ) ) )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:239:7: relation resource\r
-            {\r
-            pushFollow(FOLLOW_relation_in_localProperty1393);\r
-            relation15=relation();\r
-\r
-            state._fsp--;\r
-            if (state.failed) return retval;\r
-            if ( state.backtracking==0 ) stream_relation.add(relation15.getTree());\r
-            pushFollow(FOLLOW_resource_in_localProperty1395);\r
-            resource16=resource();\r
-\r
-            state._fsp--;\r
-            if (state.failed) return retval;\r
-            if ( state.backtracking==0 ) stream_resource.add(resource16.getTree());\r
-\r
-\r
-            // AST REWRITE\r
-            // elements: resource, relation\r
-            // token labels: \r
-            // rule labels: retval\r
-            // token list labels: \r
-            // rule list labels: \r
-            // wildcard labels: \r
-            if ( state.backtracking==0 ) {\r
-            retval.tree = root_0;\r
-            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-            root_0 = (CommonTree)adaptor.nil();\r
-            // 240:5: -> ^( PROPERTY relation ^( RESOURCE resource ) )\r
-            {\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:240:8: ^( PROPERTY relation ^( RESOURCE resource ) )\r
-                {\r
-                CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(PROPERTY, "PROPERTY"), root_1);\r
-\r
-                adaptor.addChild(root_1, stream_relation.nextTree());\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:240:28: ^( RESOURCE resource )\r
-                {\r
-                CommonTree root_2 = (CommonTree)adaptor.nil();\r
-                root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(RESOURCE, "RESOURCE"), root_2);\r
-\r
-                adaptor.addChild(root_2, stream_resource.nextTree());\r
-\r
-                adaptor.addChild(root_1, root_2);\r
-                }\r
-\r
-                adaptor.addChild(root_0, root_1);\r
-                }\r
-\r
-            }\r
-\r
-            retval.tree = root_0;}\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "localProperty"\r
-\r
-    public static class property_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "property"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:243:1: property : ( relation ( resourceDefinition -> ^( PROPERTY relation resourceDefinition ) | INDENT resourceDefinitions DEDENT -> ^( PROPERTY relation resourceDefinitions ) ) | template );\r
-    public final GraphParser.property_return property() throws RecognitionException {\r
-        GraphParser.property_return retval = new GraphParser.property_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token INDENT19=null;\r
-        Token DEDENT21=null;\r
-        GraphParser.relation_return relation17 = null;\r
-\r
-        GraphParser.resourceDefinition_return resourceDefinition18 = null;\r
-\r
-        GraphParser.resourceDefinitions_return resourceDefinitions20 = null;\r
-\r
-        GraphParser.template_return template22 = null;\r
-\r
-\r
-        CommonTree INDENT19_tree=null;\r
-        CommonTree DEDENT21_tree=null;\r
-        RewriteRuleTokenStream stream_DEDENT=new RewriteRuleTokenStream(adaptor,"token DEDENT");\r
-        RewriteRuleTokenStream stream_INDENT=new RewriteRuleTokenStream(adaptor,"token INDENT");\r
-        RewriteRuleSubtreeStream stream_resourceDefinition=new RewriteRuleSubtreeStream(adaptor,"rule resourceDefinition");\r
-        RewriteRuleSubtreeStream stream_relation=new RewriteRuleSubtreeStream(adaptor,"rule relation");\r
-        RewriteRuleSubtreeStream stream_resourceDefinitions=new RewriteRuleSubtreeStream(adaptor,"rule resourceDefinitions");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:244:5: ( relation ( resourceDefinition -> ^( PROPERTY relation resourceDefinition ) | INDENT resourceDefinitions DEDENT -> ^( PROPERTY relation resourceDefinitions ) ) | template )\r
-            int alt9=2;\r
-            int LA9_0 = input.LA(1);\r
-\r
-            if ( (LA9_0==ID||LA9_0==URI||(LA9_0>=67 && LA9_0<=75)) ) {\r
-                alt9=1;\r
-            }\r
-            else if ( (LA9_0==65) ) {\r
-                alt9=2;\r
-            }\r
-            else {\r
-                if (state.backtracking>0) {state.failed=true; return retval;}\r
-                NoViableAltException nvae =\r
-                    new NoViableAltException("", 9, 0, input);\r
-\r
-                throw nvae;\r
-            }\r
-            switch (alt9) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:244:7: relation ( resourceDefinition -> ^( PROPERTY relation resourceDefinition ) | INDENT resourceDefinitions DEDENT -> ^( PROPERTY relation resourceDefinitions ) )\r
-                    {\r
-                    pushFollow(FOLLOW_relation_in_property1434);\r
-                    relation17=relation();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) stream_relation.add(relation17.getTree());\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:245:7: ( resourceDefinition -> ^( PROPERTY relation resourceDefinition ) | INDENT resourceDefinitions DEDENT -> ^( PROPERTY relation resourceDefinitions ) )\r
-                    int alt8=2;\r
-                    int LA8_0 = input.LA(1);\r
-\r
-                    if ( (LA8_0==ID||LA8_0==LPAREN||LA8_0==LBRACKET||LA8_0==LCURLY||LA8_0==INT||LA8_0==FLOAT||(LA8_0>=STRING && LA8_0<=URI)||LA8_0==65||(LA8_0>=75 && LA8_0<=76)||(LA8_0>=79 && LA8_0<=80)) ) {\r
-                        alt8=1;\r
-                    }\r
-                    else if ( (LA8_0==INDENT) ) {\r
-                        alt8=2;\r
-                    }\r
-                    else {\r
-                        if (state.backtracking>0) {state.failed=true; return retval;}\r
-                        NoViableAltException nvae =\r
-                            new NoViableAltException("", 8, 0, input);\r
-\r
-                        throw nvae;\r
-                    }\r
-                    switch (alt8) {\r
-                        case 1 :\r
-                            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:245:9: resourceDefinition\r
-                            {\r
-                            pushFollow(FOLLOW_resourceDefinition_in_property1444);\r
-                            resourceDefinition18=resourceDefinition();\r
-\r
-                            state._fsp--;\r
-                            if (state.failed) return retval;\r
-                            if ( state.backtracking==0 ) stream_resourceDefinition.add(resourceDefinition18.getTree());\r
-\r
-\r
-                            // AST REWRITE\r
-                            // elements: relation, resourceDefinition\r
-                            // token labels: \r
-                            // rule labels: retval\r
-                            // token list labels: \r
-                            // rule list labels: \r
-                            // wildcard labels: \r
-                            if ( state.backtracking==0 ) {\r
-                            retval.tree = root_0;\r
-                            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                            root_0 = (CommonTree)adaptor.nil();\r
-                            // 245:28: -> ^( PROPERTY relation resourceDefinition )\r
-                            {\r
-                                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:245:31: ^( PROPERTY relation resourceDefinition )\r
-                                {\r
-                                CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                                root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(PROPERTY, "PROPERTY"), root_1);\r
-\r
-                                adaptor.addChild(root_1, stream_relation.nextTree());\r
-                                adaptor.addChild(root_1, stream_resourceDefinition.nextTree());\r
-\r
-                                adaptor.addChild(root_0, root_1);\r
-                                }\r
-\r
-                            }\r
-\r
-                            retval.tree = root_0;}\r
-                            }\r
-                            break;\r
-                        case 2 :\r
-                            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:246:9: INDENT resourceDefinitions DEDENT\r
-                            {\r
-                            INDENT19=(Token)match(input,INDENT,FOLLOW_INDENT_in_property1464); if (state.failed) return retval; \r
-                            if ( state.backtracking==0 ) stream_INDENT.add(INDENT19);\r
-\r
-                            pushFollow(FOLLOW_resourceDefinitions_in_property1466);\r
-                            resourceDefinitions20=resourceDefinitions();\r
-\r
-                            state._fsp--;\r
-                            if (state.failed) return retval;\r
-                            if ( state.backtracking==0 ) stream_resourceDefinitions.add(resourceDefinitions20.getTree());\r
-                            DEDENT21=(Token)match(input,DEDENT,FOLLOW_DEDENT_in_property1468); if (state.failed) return retval; \r
-                            if ( state.backtracking==0 ) stream_DEDENT.add(DEDENT21);\r
-\r
-\r
-\r
-                            // AST REWRITE\r
-                            // elements: relation, resourceDefinitions\r
-                            // token labels: \r
-                            // rule labels: retval\r
-                            // token list labels: \r
-                            // rule list labels: \r
-                            // wildcard labels: \r
-                            if ( state.backtracking==0 ) {\r
-                            retval.tree = root_0;\r
-                            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                            root_0 = (CommonTree)adaptor.nil();\r
-                            // 246:43: -> ^( PROPERTY relation resourceDefinitions )\r
-                            {\r
-                                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:246:46: ^( PROPERTY relation resourceDefinitions )\r
-                                {\r
-                                CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                                root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(PROPERTY, "PROPERTY"), root_1);\r
-\r
-                                adaptor.addChild(root_1, stream_relation.nextTree());\r
-                                adaptor.addChild(root_1, stream_resourceDefinitions.nextTree());\r
-\r
-                                adaptor.addChild(root_0, root_1);\r
-                                }\r
-\r
-                            }\r
-\r
-                            retval.tree = root_0;}\r
-                            }\r
-                            break;\r
-\r
-                    }\r
-\r
-\r
-                    }\r
-                    break;\r
-                case 2 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:248:7: template\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    pushFollow(FOLLOW_template_in_property1494);\r
-                    template22=template();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) adaptor.addChild(root_0, template22.getTree());\r
-\r
-                    }\r
-                    break;\r
-\r
-            }\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "property"\r
-\r
-    public static class template_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "template"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:251:1: template : '@' ({...}? => ID ( resource )+ INDENT resourceDefinitions DEDENT -> ^( TEMPLATE_DEFINITION ( resource )+ resourceDefinitions ) | ( resource )+ ( INDENT resourceDefinitions DEDENT )? -> ^( TEMPLATE_INSTANCE ( resource )+ ( resourceDefinitions )? ) ) ;\r
-    public final GraphParser.template_return template() throws RecognitionException {\r
-        GraphParser.template_return retval = new GraphParser.template_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token char_literal23=null;\r
-        Token ID24=null;\r
-        Token INDENT26=null;\r
-        Token DEDENT28=null;\r
-        Token INDENT30=null;\r
-        Token DEDENT32=null;\r
-        GraphParser.resource_return resource25 = null;\r
-\r
-        GraphParser.resourceDefinitions_return resourceDefinitions27 = null;\r
-\r
-        GraphParser.resource_return resource29 = null;\r
-\r
-        GraphParser.resourceDefinitions_return resourceDefinitions31 = null;\r
-\r
-\r
-        CommonTree char_literal23_tree=null;\r
-        CommonTree ID24_tree=null;\r
-        CommonTree INDENT26_tree=null;\r
-        CommonTree DEDENT28_tree=null;\r
-        CommonTree INDENT30_tree=null;\r
-        CommonTree DEDENT32_tree=null;\r
-        RewriteRuleTokenStream stream_DEDENT=new RewriteRuleTokenStream(adaptor,"token DEDENT");\r
-        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");\r
-        RewriteRuleTokenStream stream_65=new RewriteRuleTokenStream(adaptor,"token 65");\r
-        RewriteRuleTokenStream stream_INDENT=new RewriteRuleTokenStream(adaptor,"token INDENT");\r
-        RewriteRuleSubtreeStream stream_resource=new RewriteRuleSubtreeStream(adaptor,"rule resource");\r
-        RewriteRuleSubtreeStream stream_resourceDefinitions=new RewriteRuleSubtreeStream(adaptor,"rule resourceDefinitions");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:252:5: ( '@' ({...}? => ID ( resource )+ INDENT resourceDefinitions DEDENT -> ^( TEMPLATE_DEFINITION ( resource )+ resourceDefinitions ) | ( resource )+ ( INDENT resourceDefinitions DEDENT )? -> ^( TEMPLATE_INSTANCE ( resource )+ ( resourceDefinitions )? ) ) )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:252:7: '@' ({...}? => ID ( resource )+ INDENT resourceDefinitions DEDENT -> ^( TEMPLATE_DEFINITION ( resource )+ resourceDefinitions ) | ( resource )+ ( INDENT resourceDefinitions DEDENT )? -> ^( TEMPLATE_INSTANCE ( resource )+ ( resourceDefinitions )? ) )\r
-            {\r
-            char_literal23=(Token)match(input,65,FOLLOW_65_in_template1515); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_65.add(char_literal23);\r
-\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:253:5: ({...}? => ID ( resource )+ INDENT resourceDefinitions DEDENT -> ^( TEMPLATE_DEFINITION ( resource )+ resourceDefinitions ) | ( resource )+ ( INDENT resourceDefinitions DEDENT )? -> ^( TEMPLATE_INSTANCE ( resource )+ ( resourceDefinitions )? ) )\r
-            int alt13=2;\r
-            alt13 = dfa13.predict(input);\r
-            switch (alt13) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:253:7: {...}? => ID ( resource )+ INDENT resourceDefinitions DEDENT\r
-                    {\r
-                    if ( !((input.LT(1).getText().equals("template"))) ) {\r
-                        if (state.backtracking>0) {state.failed=true; return retval;}\r
-                        throw new FailedPredicateException(input, "template", "input.LT(1).getText().equals(\"template\")");\r
-                    }\r
-                    ID24=(Token)match(input,ID,FOLLOW_ID_in_template1533); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_ID.add(ID24);\r
-\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:254:10: ( resource )+\r
-                    int cnt10=0;\r
-                    loop10:\r
-                    do {\r
-                        int alt10=2;\r
-                        int LA10_0 = input.LA(1);\r
-\r
-                        if ( (LA10_0==ID||LA10_0==LPAREN||LA10_0==LBRACKET||LA10_0==LCURLY||LA10_0==INT||LA10_0==FLOAT||(LA10_0>=STRING && LA10_0<=URI)||(LA10_0>=75 && LA10_0<=76)||(LA10_0>=79 && LA10_0<=80)) ) {\r
-                            alt10=1;\r
-                        }\r
-\r
-\r
-                        switch (alt10) {\r
-                       case 1 :\r
-                           // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:254:10: resource\r
-                           {\r
-                           pushFollow(FOLLOW_resource_in_template1535);\r
-                           resource25=resource();\r
-\r
-                           state._fsp--;\r
-                           if (state.failed) return retval;\r
-                           if ( state.backtracking==0 ) stream_resource.add(resource25.getTree());\r
-\r
-                           }\r
-                           break;\r
-\r
-                       default :\r
-                           if ( cnt10 >= 1 ) break loop10;\r
-                           if (state.backtracking>0) {state.failed=true; return retval;}\r
-                                EarlyExitException eee =\r
-                                    new EarlyExitException(10, input);\r
-                                throw eee;\r
-                        }\r
-                        cnt10++;\r
-                    } while (true);\r
-\r
-                    INDENT26=(Token)match(input,INDENT,FOLLOW_INDENT_in_template1545); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_INDENT.add(INDENT26);\r
-\r
-                    pushFollow(FOLLOW_resourceDefinitions_in_template1547);\r
-                    resourceDefinitions27=resourceDefinitions();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) stream_resourceDefinitions.add(resourceDefinitions27.getTree());\r
-                    DEDENT28=(Token)match(input,DEDENT,FOLLOW_DEDENT_in_template1549); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_DEDENT.add(DEDENT28);\r
-\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: resourceDefinitions, resource\r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 256:7: -> ^( TEMPLATE_DEFINITION ( resource )+ resourceDefinitions )\r
-                    {\r
-                        // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:256:10: ^( TEMPLATE_DEFINITION ( resource )+ resourceDefinitions )\r
-                        {\r
-                        CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                        root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TEMPLATE_DEFINITION, "TEMPLATE_DEFINITION"), root_1);\r
-\r
-                        if ( !(stream_resource.hasNext()) ) {\r
-                            throw new RewriteEarlyExitException();\r
-                        }\r
-                        while ( stream_resource.hasNext() ) {\r
-                            adaptor.addChild(root_1, stream_resource.nextTree());\r
-\r
-                        }\r
-                        stream_resource.reset();\r
-                        adaptor.addChild(root_1, stream_resourceDefinitions.nextTree());\r
-\r
-                        adaptor.addChild(root_0, root_1);\r
-                        }\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-                    break;\r
-                case 2 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:257:7: ( resource )+ ( INDENT resourceDefinitions DEDENT )?\r
-                    {\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:257:7: ( resource )+\r
-                    int cnt11=0;\r
-                    loop11:\r
-                    do {\r
-                        int alt11=2;\r
-                        int LA11_0 = input.LA(1);\r
-\r
-                        if ( (LA11_0==ID||LA11_0==LPAREN||LA11_0==LBRACKET||LA11_0==LCURLY||LA11_0==INT||LA11_0==FLOAT||(LA11_0>=STRING && LA11_0<=URI)||(LA11_0>=75 && LA11_0<=76)||(LA11_0>=79 && LA11_0<=80)) ) {\r
-                            alt11=1;\r
-                        }\r
-\r
-\r
-                        switch (alt11) {\r
-                       case 1 :\r
-                           // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:257:7: resource\r
-                           {\r
-                           pushFollow(FOLLOW_resource_in_template1574);\r
-                           resource29=resource();\r
-\r
-                           state._fsp--;\r
-                           if (state.failed) return retval;\r
-                           if ( state.backtracking==0 ) stream_resource.add(resource29.getTree());\r
-\r
-                           }\r
-                           break;\r
-\r
-                       default :\r
-                           if ( cnt11 >= 1 ) break loop11;\r
-                           if (state.backtracking>0) {state.failed=true; return retval;}\r
-                                EarlyExitException eee =\r
-                                    new EarlyExitException(11, input);\r
-                                throw eee;\r
-                        }\r
-                        cnt11++;\r
-                    } while (true);\r
-\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:258:7: ( INDENT resourceDefinitions DEDENT )?\r
-                    int alt12=2;\r
-                    int LA12_0 = input.LA(1);\r
-\r
-                    if ( (LA12_0==INDENT) ) {\r
-                        alt12=1;\r
-                    }\r
-                    switch (alt12) {\r
-                        case 1 :\r
-                            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:258:8: INDENT resourceDefinitions DEDENT\r
-                            {\r
-                            INDENT30=(Token)match(input,INDENT,FOLLOW_INDENT_in_template1585); if (state.failed) return retval; \r
-                            if ( state.backtracking==0 ) stream_INDENT.add(INDENT30);\r
-\r
-                            pushFollow(FOLLOW_resourceDefinitions_in_template1587);\r
-                            resourceDefinitions31=resourceDefinitions();\r
-\r
-                            state._fsp--;\r
-                            if (state.failed) return retval;\r
-                            if ( state.backtracking==0 ) stream_resourceDefinitions.add(resourceDefinitions31.getTree());\r
-                            DEDENT32=(Token)match(input,DEDENT,FOLLOW_DEDENT_in_template1589); if (state.failed) return retval; \r
-                            if ( state.backtracking==0 ) stream_DEDENT.add(DEDENT32);\r
-\r
-\r
-                            }\r
-                            break;\r
-\r
-                    }\r
-\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: resource, resourceDefinitions\r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 259:7: -> ^( TEMPLATE_INSTANCE ( resource )+ ( resourceDefinitions )? )\r
-                    {\r
-                        // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:259:10: ^( TEMPLATE_INSTANCE ( resource )+ ( resourceDefinitions )? )\r
-                        {\r
-                        CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                        root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TEMPLATE_INSTANCE, "TEMPLATE_INSTANCE"), root_1);\r
-\r
-                        if ( !(stream_resource.hasNext()) ) {\r
-                            throw new RewriteEarlyExitException();\r
-                        }\r
-                        while ( stream_resource.hasNext() ) {\r
-                            adaptor.addChild(root_1, stream_resource.nextTree());\r
-\r
-                        }\r
-                        stream_resource.reset();\r
-                        // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:259:40: ( resourceDefinitions )?\r
-                        if ( stream_resourceDefinitions.hasNext() ) {\r
-                            adaptor.addChild(root_1, stream_resourceDefinitions.nextTree());\r
-\r
-                        }\r
-                        stream_resourceDefinitions.reset();\r
-\r
-                        adaptor.addChild(root_0, root_1);\r
-                        }\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-                    break;\r
-\r
-            }\r
-\r
-\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "template"\r
-\r
-    public static class relation_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "relation"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:267:1: relation : ( ( ID -> ID ) ( '.' ID -> ^( REF $relation ID ) )* | URI | '<T' -> INHERITS | '<R' -> SUBRELATION_OF | '<--' -> HAS_DOMAIN | '-->' -> HAS_RANGE | '==>' -> REQUIRES_VALUE_TYPE | '>--' -> DOMAIN_OF | ':' -> INSTANCE_OF | '=' -> EQUALS | '%' ID -> ^( VARIABLE ID ) );\r
-    public final GraphParser.relation_return relation() throws RecognitionException {\r
-        GraphParser.relation_return retval = new GraphParser.relation_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token ID33=null;\r
-        Token char_literal34=null;\r
-        Token ID35=null;\r
-        Token URI36=null;\r
-        Token string_literal37=null;\r
-        Token string_literal38=null;\r
-        Token string_literal39=null;\r
-        Token string_literal40=null;\r
-        Token string_literal41=null;\r
-        Token string_literal42=null;\r
-        Token char_literal43=null;\r
-        Token char_literal44=null;\r
-        Token char_literal45=null;\r
-        Token ID46=null;\r
-\r
-        CommonTree ID33_tree=null;\r
-        CommonTree char_literal34_tree=null;\r
-        CommonTree ID35_tree=null;\r
-        CommonTree URI36_tree=null;\r
-        CommonTree string_literal37_tree=null;\r
-        CommonTree string_literal38_tree=null;\r
-        CommonTree string_literal39_tree=null;\r
-        CommonTree string_literal40_tree=null;\r
-        CommonTree string_literal41_tree=null;\r
-        CommonTree string_literal42_tree=null;\r
-        CommonTree char_literal43_tree=null;\r
-        CommonTree char_literal44_tree=null;\r
-        CommonTree char_literal45_tree=null;\r
-        CommonTree ID46_tree=null;\r
-        RewriteRuleTokenStream stream_67=new RewriteRuleTokenStream(adaptor,"token 67");\r
-        RewriteRuleTokenStream stream_66=new RewriteRuleTokenStream(adaptor,"token 66");\r
-        RewriteRuleTokenStream stream_69=new RewriteRuleTokenStream(adaptor,"token 69");\r
-        RewriteRuleTokenStream stream_68=new RewriteRuleTokenStream(adaptor,"token 68");\r
-        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");\r
-        RewriteRuleTokenStream stream_70=new RewriteRuleTokenStream(adaptor,"token 70");\r
-        RewriteRuleTokenStream stream_71=new RewriteRuleTokenStream(adaptor,"token 71");\r
-        RewriteRuleTokenStream stream_72=new RewriteRuleTokenStream(adaptor,"token 72");\r
-        RewriteRuleTokenStream stream_73=new RewriteRuleTokenStream(adaptor,"token 73");\r
-        RewriteRuleTokenStream stream_74=new RewriteRuleTokenStream(adaptor,"token 74");\r
-        RewriteRuleTokenStream stream_75=new RewriteRuleTokenStream(adaptor,"token 75");\r
-\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:268:5: ( ( ID -> ID ) ( '.' ID -> ^( REF $relation ID ) )* | URI | '<T' -> INHERITS | '<R' -> SUBRELATION_OF | '<--' -> HAS_DOMAIN | '-->' -> HAS_RANGE | '==>' -> REQUIRES_VALUE_TYPE | '>--' -> DOMAIN_OF | ':' -> INSTANCE_OF | '=' -> EQUALS | '%' ID -> ^( VARIABLE ID ) )\r
-            int alt15=11;\r
-            switch ( input.LA(1) ) {\r
-            case ID:\r
-                {\r
-                alt15=1;\r
-                }\r
-                break;\r
-            case URI:\r
-                {\r
-                alt15=2;\r
-                }\r
-                break;\r
-            case 67:\r
-                {\r
-                alt15=3;\r
-                }\r
-                break;\r
-            case 68:\r
-                {\r
-                alt15=4;\r
-                }\r
-                break;\r
-            case 69:\r
-                {\r
-                alt15=5;\r
-                }\r
-                break;\r
-            case 70:\r
-                {\r
-                alt15=6;\r
-                }\r
-                break;\r
-            case 71:\r
-                {\r
-                alt15=7;\r
-                }\r
-                break;\r
-            case 72:\r
-                {\r
-                alt15=8;\r
-                }\r
-                break;\r
-            case 73:\r
-                {\r
-                alt15=9;\r
-                }\r
-                break;\r
-            case 74:\r
-                {\r
-                alt15=10;\r
-                }\r
-                break;\r
-            case 75:\r
-                {\r
-                alt15=11;\r
-                }\r
-                break;\r
-            default:\r
-                if (state.backtracking>0) {state.failed=true; return retval;}\r
-                NoViableAltException nvae =\r
-                    new NoViableAltException("", 15, 0, input);\r
-\r
-                throw nvae;\r
-            }\r
-\r
-            switch (alt15) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:268:7: ( ID -> ID ) ( '.' ID -> ^( REF $relation ID ) )*\r
-                    {\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:268:7: ( ID -> ID )\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:268:9: ID\r
-                    {\r
-                    ID33=(Token)match(input,ID,FOLLOW_ID_in_relation1643); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_ID.add(ID33);\r
-\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: ID\r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 268:12: -> ID\r
-                    {\r
-                        adaptor.addChild(root_0, stream_ID.nextNode());\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:269:7: ( '.' ID -> ^( REF $relation ID ) )*\r
-                    loop14:\r
-                    do {\r
-                        int alt14=2;\r
-                        int LA14_0 = input.LA(1);\r
-\r
-                        if ( (LA14_0==66) ) {\r
-                            alt14=1;\r
-                        }\r
-\r
-\r
-                        switch (alt14) {\r
-                       case 1 :\r
-                           // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:269:8: '.' ID\r
-                           {\r
-                           char_literal34=(Token)match(input,66,FOLLOW_66_in_relation1658); if (state.failed) return retval; \r
-                           if ( state.backtracking==0 ) stream_66.add(char_literal34);\r
-\r
-                           ID35=(Token)match(input,ID,FOLLOW_ID_in_relation1660); if (state.failed) return retval; \r
-                           if ( state.backtracking==0 ) stream_ID.add(ID35);\r
-\r
-\r
-\r
-                           // AST REWRITE\r
-                           // elements: ID, relation\r
-                           // token labels: \r
-                           // rule labels: retval\r
-                           // token list labels: \r
-                           // rule list labels: \r
-                           // wildcard labels: \r
-                           if ( state.backtracking==0 ) {\r
-                           retval.tree = root_0;\r
-                           RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                           root_0 = (CommonTree)adaptor.nil();\r
-                           // 269:15: -> ^( REF $relation ID )\r
-                           {\r
-                               // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:269:18: ^( REF $relation ID )\r
-                               {\r
-                               CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                               root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(REF, "REF"), root_1);\r
-\r
-                               adaptor.addChild(root_1, stream_retval.nextTree());\r
-                               adaptor.addChild(root_1, stream_ID.nextNode());\r
-\r
-                               adaptor.addChild(root_0, root_1);\r
-                               }\r
-\r
-                           }\r
-\r
-                           retval.tree = root_0;}\r
-                           }\r
-                           break;\r
-\r
-                       default :\r
-                           break loop14;\r
-                        }\r
-                    } while (true);\r
-\r
-\r
-                    }\r
-                    break;\r
-                case 2 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:270:7: URI\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    URI36=(Token)match(input,URI,FOLLOW_URI_in_relation1681); if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) {\r
-                    URI36_tree = (CommonTree)adaptor.create(URI36);\r
-                    adaptor.addChild(root_0, URI36_tree);\r
-                    }\r
-\r
-                    }\r
-                    break;\r
-                case 3 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:271:7: '<T'\r
-                    {\r
-                    string_literal37=(Token)match(input,67,FOLLOW_67_in_relation1689); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_67.add(string_literal37);\r
-\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: \r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 271:12: -> INHERITS\r
-                    {\r
-                        adaptor.addChild(root_0, (CommonTree)adaptor.create(INHERITS, "INHERITS"));\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-                    break;\r
-                case 4 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:272:7: '<R'\r
-                    {\r
-                    string_literal38=(Token)match(input,68,FOLLOW_68_in_relation1701); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_68.add(string_literal38);\r
-\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: \r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 272:12: -> SUBRELATION_OF\r
-                    {\r
-                        adaptor.addChild(root_0, (CommonTree)adaptor.create(SUBRELATION_OF, "SUBRELATION_OF"));\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-                    break;\r
-                case 5 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:273:7: '<--'\r
-                    {\r
-                    string_literal39=(Token)match(input,69,FOLLOW_69_in_relation1713); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_69.add(string_literal39);\r
-\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: \r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 273:13: -> HAS_DOMAIN\r
-                    {\r
-                        adaptor.addChild(root_0, (CommonTree)adaptor.create(HAS_DOMAIN, "HAS_DOMAIN"));\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-                    break;\r
-                case 6 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:274:7: '-->'\r
-                    {\r
-                    string_literal40=(Token)match(input,70,FOLLOW_70_in_relation1725); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_70.add(string_literal40);\r
-\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: \r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 274:13: -> HAS_RANGE\r
-                    {\r
-                        adaptor.addChild(root_0, (CommonTree)adaptor.create(HAS_RANGE, "HAS_RANGE"));\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-                    break;\r
-                case 7 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:275:7: '==>'\r
-                    {\r
-                    string_literal41=(Token)match(input,71,FOLLOW_71_in_relation1737); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_71.add(string_literal41);\r
-\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: \r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 275:13: -> REQUIRES_VALUE_TYPE\r
-                    {\r
-                        adaptor.addChild(root_0, (CommonTree)adaptor.create(REQUIRES_VALUE_TYPE, "REQUIRES_VALUE_TYPE"));\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-                    break;\r
-                case 8 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:276:7: '>--'\r
-                    {\r
-                    string_literal42=(Token)match(input,72,FOLLOW_72_in_relation1749); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_72.add(string_literal42);\r
-\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: \r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 276:13: -> DOMAIN_OF\r
-                    {\r
-                        adaptor.addChild(root_0, (CommonTree)adaptor.create(DOMAIN_OF, "DOMAIN_OF"));\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-                    break;\r
-                case 9 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:277:7: ':'\r
-                    {\r
-                    char_literal43=(Token)match(input,73,FOLLOW_73_in_relation1765); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_73.add(char_literal43);\r
-\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: \r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 277:11: -> INSTANCE_OF\r
-                    {\r
-                        adaptor.addChild(root_0, (CommonTree)adaptor.create(INSTANCE_OF, "INSTANCE_OF"));\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-                    break;\r
-                case 10 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:278:7: '='\r
-                    {\r
-                    char_literal44=(Token)match(input,74,FOLLOW_74_in_relation1777); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_74.add(char_literal44);\r
-\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: \r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 278:11: -> EQUALS\r
-                    {\r
-                        adaptor.addChild(root_0, (CommonTree)adaptor.create(EQUALS, "EQUALS"));\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-                    break;\r
-                case 11 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:279:7: '%' ID\r
-                    {\r
-                    char_literal45=(Token)match(input,75,FOLLOW_75_in_relation1789); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_75.add(char_literal45);\r
-\r
-                    ID46=(Token)match(input,ID,FOLLOW_ID_in_relation1791); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_ID.add(ID46);\r
-\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: ID\r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 279:14: -> ^( VARIABLE ID )\r
-                    {\r
-                        // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:279:17: ^( VARIABLE ID )\r
-                        {\r
-                        CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                        root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(VARIABLE, "VARIABLE"), root_1);\r
-\r
-                        adaptor.addChild(root_1, stream_ID.nextNode());\r
-\r
-                        adaptor.addChild(root_0, root_1);\r
-                        }\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-                    break;\r
-\r
-            }\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "relation"\r
-\r
-    public static class resource_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "resource"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:282:1: resource : ( ({...}? => ID -> ^( BLANK ID ) | ID -> ID ) ( '.' ( ID -> ^( REF $resource ID ) | STRING -> ^( REF $resource STRING ) ) )* | URI | simpleValue -> ^( EMBEDDED_VALUE simpleValue ) | '$' basicType -> ^( EMBEDDED_TYPE basicType ) | '%' ID -> ^( VARIABLE ID ) );\r
-    public final GraphParser.resource_return resource() throws RecognitionException {\r
-        GraphParser.resource_return retval = new GraphParser.resource_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token ID47=null;\r
-        Token ID48=null;\r
-        Token char_literal49=null;\r
-        Token ID50=null;\r
-        Token STRING51=null;\r
-        Token URI52=null;\r
-        Token char_literal54=null;\r
-        Token char_literal56=null;\r
-        Token ID57=null;\r
-        GraphParser.simpleValue_return simpleValue53 = null;\r
-\r
-        GraphParser.basicType_return basicType55 = null;\r
-\r
-\r
-        CommonTree ID47_tree=null;\r
-        CommonTree ID48_tree=null;\r
-        CommonTree char_literal49_tree=null;\r
-        CommonTree ID50_tree=null;\r
-        CommonTree STRING51_tree=null;\r
-        CommonTree URI52_tree=null;\r
-        CommonTree char_literal54_tree=null;\r
-        CommonTree char_literal56_tree=null;\r
-        CommonTree ID57_tree=null;\r
-        RewriteRuleTokenStream stream_66=new RewriteRuleTokenStream(adaptor,"token 66");\r
-        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");\r
-        RewriteRuleTokenStream stream_75=new RewriteRuleTokenStream(adaptor,"token 75");\r
-        RewriteRuleTokenStream stream_STRING=new RewriteRuleTokenStream(adaptor,"token STRING");\r
-        RewriteRuleTokenStream stream_76=new RewriteRuleTokenStream(adaptor,"token 76");\r
-        RewriteRuleSubtreeStream stream_basicType=new RewriteRuleSubtreeStream(adaptor,"rule basicType");\r
-        RewriteRuleSubtreeStream stream_simpleValue=new RewriteRuleSubtreeStream(adaptor,"rule simpleValue");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:283:5: ( ({...}? => ID -> ^( BLANK ID ) | ID -> ID ) ( '.' ( ID -> ^( REF $resource ID ) | STRING -> ^( REF $resource STRING ) ) )* | URI | simpleValue -> ^( EMBEDDED_VALUE simpleValue ) | '$' basicType -> ^( EMBEDDED_TYPE basicType ) | '%' ID -> ^( VARIABLE ID ) )\r
-            int alt19=5;\r
-            switch ( input.LA(1) ) {\r
-            case ID:\r
-                {\r
-                alt19=1;\r
-                }\r
-                break;\r
-            case URI:\r
-                {\r
-                alt19=2;\r
-                }\r
-                break;\r
-            case LPAREN:\r
-            case LBRACKET:\r
-            case LCURLY:\r
-            case INT:\r
-            case FLOAT:\r
-            case STRING:\r
-            case 79:\r
-            case 80:\r
-                {\r
-                alt19=3;\r
-                }\r
-                break;\r
-            case 76:\r
-                {\r
-                alt19=4;\r
-                }\r
-                break;\r
-            case 75:\r
-                {\r
-                alt19=5;\r
-                }\r
-                break;\r
-            default:\r
-                if (state.backtracking>0) {state.failed=true; return retval;}\r
-                NoViableAltException nvae =\r
-                    new NoViableAltException("", 19, 0, input);\r
-\r
-                throw nvae;\r
-            }\r
-\r
-            switch (alt19) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:283:7: ({...}? => ID -> ^( BLANK ID ) | ID -> ID ) ( '.' ( ID -> ^( REF $resource ID ) | STRING -> ^( REF $resource STRING ) ) )*\r
-                    {\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:283:7: ({...}? => ID -> ^( BLANK ID ) | ID -> ID )\r
-                    int alt16=2;\r
-                    int LA16_0 = input.LA(1);\r
-\r
-                    if ( (LA16_0==ID) ) {\r
-                        int LA16_1 = input.LA(2);\r
-\r
-                        if ( ((input.LT(1).getText().equals("_"))) ) {\r
-                            alt16=1;\r
-                        }\r
-                        else if ( (true) ) {\r
-                            alt16=2;\r
-                        }\r
-                        else {\r
-                            if (state.backtracking>0) {state.failed=true; return retval;}\r
-                            NoViableAltException nvae =\r
-                                new NoViableAltException("", 16, 1, input);\r
-\r
-                            throw nvae;\r
-                        }\r
-                    }\r
-                    else {\r
-                        if (state.backtracking>0) {state.failed=true; return retval;}\r
-                        NoViableAltException nvae =\r
-                            new NoViableAltException("", 16, 0, input);\r
-\r
-                        throw nvae;\r
-                    }\r
-                    switch (alt16) {\r
-                        case 1 :\r
-                            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:283:9: {...}? => ID\r
-                            {\r
-                            if ( !((input.LT(1).getText().equals("_"))) ) {\r
-                                if (state.backtracking>0) {state.failed=true; return retval;}\r
-                                throw new FailedPredicateException(input, "resource", "input.LT(1).getText().equals(\"_\")");\r
-                            }\r
-                            ID47=(Token)match(input,ID,FOLLOW_ID_in_resource1821); if (state.failed) return retval; \r
-                            if ( state.backtracking==0 ) stream_ID.add(ID47);\r
-\r
-\r
-\r
-                            // AST REWRITE\r
-                            // elements: ID\r
-                            // token labels: \r
-                            // rule labels: retval\r
-                            // token list labels: \r
-                            // rule list labels: \r
-                            // wildcard labels: \r
-                            if ( state.backtracking==0 ) {\r
-                            retval.tree = root_0;\r
-                            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                            root_0 = (CommonTree)adaptor.nil();\r
-                            // 283:51: -> ^( BLANK ID )\r
-                            {\r
-                                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:283:54: ^( BLANK ID )\r
-                                {\r
-                                CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                                root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(BLANK, "BLANK"), root_1);\r
-\r
-                                adaptor.addChild(root_1, stream_ID.nextNode());\r
-\r
-                                adaptor.addChild(root_0, root_1);\r
-                                }\r
-\r
-                            }\r
-\r
-                            retval.tree = root_0;}\r
-                            }\r
-                            break;\r
-                        case 2 :\r
-                            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:284:9: ID\r
-                            {\r
-                            ID48=(Token)match(input,ID,FOLLOW_ID_in_resource1840); if (state.failed) return retval; \r
-                            if ( state.backtracking==0 ) stream_ID.add(ID48);\r
-\r
-\r
-\r
-                            // AST REWRITE\r
-                            // elements: ID\r
-                            // token labels: \r
-                            // rule labels: retval\r
-                            // token list labels: \r
-                            // rule list labels: \r
-                            // wildcard labels: \r
-                            if ( state.backtracking==0 ) {\r
-                            retval.tree = root_0;\r
-                            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                            root_0 = (CommonTree)adaptor.nil();\r
-                            // 284:12: -> ID\r
-                            {\r
-                                adaptor.addChild(root_0, stream_ID.nextNode());\r
-\r
-                            }\r
-\r
-                            retval.tree = root_0;}\r
-                            }\r
-                            break;\r
-\r
-                    }\r
-\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:285:7: ( '.' ( ID -> ^( REF $resource ID ) | STRING -> ^( REF $resource STRING ) ) )*\r
-                    loop18:\r
-                    do {\r
-                        int alt18=2;\r
-                        int LA18_0 = input.LA(1);\r
-\r
-                        if ( (LA18_0==66) ) {\r
-                            alt18=1;\r
-                        }\r
-\r
-\r
-                        switch (alt18) {\r
-                       case 1 :\r
-                           // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:285:8: '.' ( ID -> ^( REF $resource ID ) | STRING -> ^( REF $resource STRING ) )\r
-                           {\r
-                           char_literal49=(Token)match(input,66,FOLLOW_66_in_resource1855); if (state.failed) return retval; \r
-                           if ( state.backtracking==0 ) stream_66.add(char_literal49);\r
-\r
-                           // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:285:12: ( ID -> ^( REF $resource ID ) | STRING -> ^( REF $resource STRING ) )\r
-                           int alt17=2;\r
-                           int LA17_0 = input.LA(1);\r
-\r
-                           if ( (LA17_0==ID) ) {\r
-                               alt17=1;\r
-                           }\r
-                           else if ( (LA17_0==STRING) ) {\r
-                               alt17=2;\r
-                           }\r
-                           else {\r
-                               if (state.backtracking>0) {state.failed=true; return retval;}\r
-                               NoViableAltException nvae =\r
-                                   new NoViableAltException("", 17, 0, input);\r
-\r
-                               throw nvae;\r
-                           }\r
-                           switch (alt17) {\r
-                               case 1 :\r
-                                   // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:285:13: ID\r
-                                   {\r
-                                   ID50=(Token)match(input,ID,FOLLOW_ID_in_resource1858); if (state.failed) return retval; \r
-                                   if ( state.backtracking==0 ) stream_ID.add(ID50);\r
-\r
-\r
-\r
-                                   // AST REWRITE\r
-                                   // elements: ID, resource\r
-                                   // token labels: \r
-                                   // rule labels: retval\r
-                                   // token list labels: \r
-                                   // rule list labels: \r
-                                   // wildcard labels: \r
-                                   if ( state.backtracking==0 ) {\r
-                                   retval.tree = root_0;\r
-                                   RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                                   root_0 = (CommonTree)adaptor.nil();\r
-                                   // 285:16: -> ^( REF $resource ID )\r
-                                   {\r
-                                       // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:285:19: ^( REF $resource ID )\r
-                                       {\r
-                                       CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                                       root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(REF, "REF"), root_1);\r
-\r
-                                       adaptor.addChild(root_1, stream_retval.nextTree());\r
-                                       adaptor.addChild(root_1, stream_ID.nextNode());\r
-\r
-                                       adaptor.addChild(root_0, root_1);\r
-                                       }\r
-\r
-                                   }\r
-\r
-                                   retval.tree = root_0;}\r
-                                   }\r
-                                   break;\r
-                               case 2 :\r
-                                   // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:286:13: STRING\r
-                                   {\r
-                                   STRING51=(Token)match(input,STRING,FOLLOW_STRING_in_resource1883); if (state.failed) return retval; \r
-                                   if ( state.backtracking==0 ) stream_STRING.add(STRING51);\r
-\r
-\r
-\r
-                                   // AST REWRITE\r
-                                   // elements: STRING, resource\r
-                                   // token labels: \r
-                                   // rule labels: retval\r
-                                   // token list labels: \r
-                                   // rule list labels: \r
-                                   // wildcard labels: \r
-                                   if ( state.backtracking==0 ) {\r
-                                   retval.tree = root_0;\r
-                                   RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                                   root_0 = (CommonTree)adaptor.nil();\r
-                                   // 286:20: -> ^( REF $resource STRING )\r
-                                   {\r
-                                       // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:286:23: ^( REF $resource STRING )\r
-                                       {\r
-                                       CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                                       root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(REF, "REF"), root_1);\r
-\r
-                                       adaptor.addChild(root_1, stream_retval.nextTree());\r
-                                       adaptor.addChild(root_1, stream_STRING.nextNode());\r
-\r
-                                       adaptor.addChild(root_0, root_1);\r
-                                       }\r
-\r
-                                   }\r
-\r
-                                   retval.tree = root_0;}\r
-                                   }\r
-                                   break;\r
-\r
-                           }\r
-\r
-\r
-                           }\r
-                           break;\r
-\r
-                       default :\r
-                           break loop18;\r
-                        }\r
-                    } while (true);\r
-\r
-\r
-                    }\r
-                    break;\r
-                case 2 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:289:7: URI\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    URI52=(Token)match(input,URI,FOLLOW_URI_in_resource1924); if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) {\r
-                    URI52_tree = (CommonTree)adaptor.create(URI52);\r
-                    adaptor.addChild(root_0, URI52_tree);\r
-                    }\r
-\r
-                    }\r
-                    break;\r
-                case 3 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:290:7: simpleValue\r
-                    {\r
-                    pushFollow(FOLLOW_simpleValue_in_resource1932);\r
-                    simpleValue53=simpleValue();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) stream_simpleValue.add(simpleValue53.getTree());\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: simpleValue\r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 290:19: -> ^( EMBEDDED_VALUE simpleValue )\r
-                    {\r
-                        // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:290:22: ^( EMBEDDED_VALUE simpleValue )\r
-                        {\r
-                        CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                        root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(EMBEDDED_VALUE, "EMBEDDED_VALUE"), root_1);\r
-\r
-                        adaptor.addChild(root_1, stream_simpleValue.nextTree());\r
-\r
-                        adaptor.addChild(root_0, root_1);\r
-                        }\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-                    break;\r
-                case 4 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:291:7: '$' basicType\r
-                    {\r
-                    char_literal54=(Token)match(input,76,FOLLOW_76_in_resource1948); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_76.add(char_literal54);\r
-\r
-                    pushFollow(FOLLOW_basicType_in_resource1950);\r
-                    basicType55=basicType();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) stream_basicType.add(basicType55.getTree());\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: basicType\r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 291:21: -> ^( EMBEDDED_TYPE basicType )\r
-                    {\r
-                        // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:291:24: ^( EMBEDDED_TYPE basicType )\r
-                        {\r
-                        CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                        root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(EMBEDDED_TYPE, "EMBEDDED_TYPE"), root_1);\r
-\r
-                        adaptor.addChild(root_1, stream_basicType.nextTree());\r
-\r
-                        adaptor.addChild(root_0, root_1);\r
-                        }\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-                    break;\r
-                case 5 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:292:7: '%' ID\r
-                    {\r
-                    char_literal56=(Token)match(input,75,FOLLOW_75_in_resource1966); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_75.add(char_literal56);\r
-\r
-                    ID57=(Token)match(input,ID,FOLLOW_ID_in_resource1968); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_ID.add(ID57);\r
-\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: ID\r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 292:14: -> ^( VARIABLE ID )\r
-                    {\r
-                        // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:292:17: ^( VARIABLE ID )\r
-                        {\r
-                        CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                        root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(VARIABLE, "VARIABLE"), root_1);\r
-\r
-                        adaptor.addChild(root_1, stream_ID.nextNode());\r
-\r
-                        adaptor.addChild(root_0, root_1);\r
-                        }\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-                    break;\r
-\r
-            }\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "resource"\r
-\r
-    public static class type_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "type"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:306:1: type : ( arrayType | unionType );\r
-    public final GraphParser.type_return type() throws RecognitionException {\r
-        GraphParser.type_return retval = new GraphParser.type_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        GraphParser.arrayType_return arrayType58 = null;\r
-\r
-        GraphParser.unionType_return unionType59 = null;\r
-\r
-\r
-\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:307:5: ( arrayType | unionType )\r
-            int alt20=2;\r
-            int LA20_0 = input.LA(1);\r
-\r
-            if ( (LA20_0==ID||LA20_0==LPAREN||LA20_0==LCURLY) ) {\r
-                alt20=1;\r
-            }\r
-            else if ( (LA20_0==77) ) {\r
-                alt20=2;\r
-            }\r
-            else {\r
-                if (state.backtracking>0) {state.failed=true; return retval;}\r
-                NoViableAltException nvae =\r
-                    new NoViableAltException("", 20, 0, input);\r
-\r
-                throw nvae;\r
-            }\r
-            switch (alt20) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:307:7: arrayType\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    pushFollow(FOLLOW_arrayType_in_type2004);\r
-                    arrayType58=arrayType();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) adaptor.addChild(root_0, arrayType58.getTree());\r
-\r
-                    }\r
-                    break;\r
-                case 2 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:308:7: unionType\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    pushFollow(FOLLOW_unionType_in_type2012);\r
-                    unionType59=unionType();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) adaptor.addChild(root_0, unionType59.getTree());\r
-\r
-                    }\r
-                    break;\r
-\r
-            }\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "type"\r
-\r
-    public static class unionType_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "unionType"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:311:1: unionType : ( '|' unionComponent )+ -> ^( UNION_TYPE ( unionComponent )+ ) ;\r
-    public final GraphParser.unionType_return unionType() throws RecognitionException {\r
-        GraphParser.unionType_return retval = new GraphParser.unionType_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token char_literal60=null;\r
-        GraphParser.unionComponent_return unionComponent61 = null;\r
-\r
-\r
-        CommonTree char_literal60_tree=null;\r
-        RewriteRuleTokenStream stream_77=new RewriteRuleTokenStream(adaptor,"token 77");\r
-        RewriteRuleSubtreeStream stream_unionComponent=new RewriteRuleSubtreeStream(adaptor,"rule unionComponent");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:312:5: ( ( '|' unionComponent )+ -> ^( UNION_TYPE ( unionComponent )+ ) )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:313:6: ( '|' unionComponent )+\r
-            {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:313:6: ( '|' unionComponent )+\r
-            int cnt21=0;\r
-            loop21:\r
-            do {\r
-                int alt21=2;\r
-                int LA21_0 = input.LA(1);\r
-\r
-                if ( (LA21_0==77) ) {\r
-                    alt21=1;\r
-                }\r
-\r
-\r
-                switch (alt21) {\r
-               case 1 :\r
-                   // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:313:7: '|' unionComponent\r
-                   {\r
-                   char_literal60=(Token)match(input,77,FOLLOW_77_in_unionType2041); if (state.failed) return retval; \r
-                   if ( state.backtracking==0 ) stream_77.add(char_literal60);\r
-\r
-                   pushFollow(FOLLOW_unionComponent_in_unionType2043);\r
-                   unionComponent61=unionComponent();\r
-\r
-                   state._fsp--;\r
-                   if (state.failed) return retval;\r
-                   if ( state.backtracking==0 ) stream_unionComponent.add(unionComponent61.getTree());\r
-\r
-                   }\r
-                   break;\r
-\r
-               default :\r
-                   if ( cnt21 >= 1 ) break loop21;\r
-                   if (state.backtracking>0) {state.failed=true; return retval;}\r
-                        EarlyExitException eee =\r
-                            new EarlyExitException(21, input);\r
-                        throw eee;\r
-                }\r
-                cnt21++;\r
-            } while (true);\r
-\r
-\r
-\r
-            // AST REWRITE\r
-            // elements: unionComponent\r
-            // token labels: \r
-            // rule labels: retval\r
-            // token list labels: \r
-            // rule list labels: \r
-            // wildcard labels: \r
-            if ( state.backtracking==0 ) {\r
-            retval.tree = root_0;\r
-            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-            root_0 = (CommonTree)adaptor.nil();\r
-            // 314:5: -> ^( UNION_TYPE ( unionComponent )+ )\r
-            {\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:314:8: ^( UNION_TYPE ( unionComponent )+ )\r
-                {\r
-                CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(UNION_TYPE, "UNION_TYPE"), root_1);\r
-\r
-                if ( !(stream_unionComponent.hasNext()) ) {\r
-                    throw new RewriteEarlyExitException();\r
-                }\r
-                while ( stream_unionComponent.hasNext() ) {\r
-                    adaptor.addChild(root_1, stream_unionComponent.nextTree());\r
-\r
-                }\r
-                stream_unionComponent.reset();\r
-\r
-                adaptor.addChild(root_0, root_1);\r
-                }\r
-\r
-            }\r
-\r
-            retval.tree = root_0;}\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "unionType"\r
-\r
-    public static class unionComponent_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "unionComponent"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:317:1: unionComponent : ID ( ( arrayType )=> arrayType )? -> ^( TYPE_COMPONENT ID ( arrayType )? ) ;\r
-    public final GraphParser.unionComponent_return unionComponent() throws RecognitionException {\r
-        GraphParser.unionComponent_return retval = new GraphParser.unionComponent_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token ID62=null;\r
-        GraphParser.arrayType_return arrayType63 = null;\r
-\r
-\r
-        CommonTree ID62_tree=null;\r
-        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");\r
-        RewriteRuleSubtreeStream stream_arrayType=new RewriteRuleSubtreeStream(adaptor,"rule arrayType");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:317:16: ( ID ( ( arrayType )=> arrayType )? -> ^( TYPE_COMPONENT ID ( arrayType )? ) )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:317:18: ID ( ( arrayType )=> arrayType )?\r
-            {\r
-            ID62=(Token)match(input,ID,FOLLOW_ID_in_unionComponent2071); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_ID.add(ID62);\r
-\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:317:21: ( ( arrayType )=> arrayType )?\r
-            int alt22=2;\r
-            alt22 = dfa22.predict(input);\r
-            switch (alt22) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:317:22: ( arrayType )=> arrayType\r
-                    {\r
-                    pushFollow(FOLLOW_arrayType_in_unionComponent2080);\r
-                    arrayType63=arrayType();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) stream_arrayType.add(arrayType63.getTree());\r
-\r
-                    }\r
-                    break;\r
-\r
-            }\r
-\r
-\r
-\r
-            // AST REWRITE\r
-            // elements: ID, arrayType\r
-            // token labels: \r
-            // rule labels: retval\r
-            // token list labels: \r
-            // rule list labels: \r
-            // wildcard labels: \r
-            if ( state.backtracking==0 ) {\r
-            retval.tree = root_0;\r
-            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-            root_0 = (CommonTree)adaptor.nil();\r
-            // 317:49: -> ^( TYPE_COMPONENT ID ( arrayType )? )\r
-            {\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:317:52: ^( TYPE_COMPONENT ID ( arrayType )? )\r
-                {\r
-                CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TYPE_COMPONENT, "TYPE_COMPONENT"), root_1);\r
-\r
-                adaptor.addChild(root_1, stream_ID.nextNode());\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:317:72: ( arrayType )?\r
-                if ( stream_arrayType.hasNext() ) {\r
-                    adaptor.addChild(root_1, stream_arrayType.nextTree());\r
-\r
-                }\r
-                stream_arrayType.reset();\r
-\r
-                adaptor.addChild(root_0, root_1);\r
-                }\r
-\r
-            }\r
-\r
-            retval.tree = root_0;}\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "unionComponent"\r
-\r
-    public static class arrayType_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "arrayType"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:319:1: arrayType : ( basicType -> basicType ) ( LBRACKET ( arrayLength )? RBRACKET -> ^( ARRAY_TYPE $arrayType ( arrayLength )? ) )* ;\r
-    public final GraphParser.arrayType_return arrayType() throws RecognitionException {\r
-        GraphParser.arrayType_return retval = new GraphParser.arrayType_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token LBRACKET65=null;\r
-        Token RBRACKET67=null;\r
-        GraphParser.basicType_return basicType64 = null;\r
-\r
-        GraphParser.arrayLength_return arrayLength66 = null;\r
-\r
-\r
-        CommonTree LBRACKET65_tree=null;\r
-        CommonTree RBRACKET67_tree=null;\r
-        RewriteRuleTokenStream stream_LBRACKET=new RewriteRuleTokenStream(adaptor,"token LBRACKET");\r
-        RewriteRuleTokenStream stream_RBRACKET=new RewriteRuleTokenStream(adaptor,"token RBRACKET");\r
-        RewriteRuleSubtreeStream stream_arrayLength=new RewriteRuleSubtreeStream(adaptor,"rule arrayLength");\r
-        RewriteRuleSubtreeStream stream_basicType=new RewriteRuleSubtreeStream(adaptor,"rule basicType");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:320:5: ( ( basicType -> basicType ) ( LBRACKET ( arrayLength )? RBRACKET -> ^( ARRAY_TYPE $arrayType ( arrayLength )? ) )* )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:320:7: ( basicType -> basicType ) ( LBRACKET ( arrayLength )? RBRACKET -> ^( ARRAY_TYPE $arrayType ( arrayLength )? ) )*\r
-            {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:320:7: ( basicType -> basicType )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:320:8: basicType\r
-            {\r
-            pushFollow(FOLLOW_basicType_in_arrayType2108);\r
-            basicType64=basicType();\r
-\r
-            state._fsp--;\r
-            if (state.failed) return retval;\r
-            if ( state.backtracking==0 ) stream_basicType.add(basicType64.getTree());\r
-\r
-\r
-            // AST REWRITE\r
-            // elements: basicType\r
-            // token labels: \r
-            // rule labels: retval\r
-            // token list labels: \r
-            // rule list labels: \r
-            // wildcard labels: \r
-            if ( state.backtracking==0 ) {\r
-            retval.tree = root_0;\r
-            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-            root_0 = (CommonTree)adaptor.nil();\r
-            // 320:18: -> basicType\r
-            {\r
-                adaptor.addChild(root_0, stream_basicType.nextTree());\r
-\r
-            }\r
-\r
-            retval.tree = root_0;}\r
-            }\r
-\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:321:7: ( LBRACKET ( arrayLength )? RBRACKET -> ^( ARRAY_TYPE $arrayType ( arrayLength )? ) )*\r
-            loop24:\r
-            do {\r
-                int alt24=2;\r
-                int LA24_0 = input.LA(1);\r
-\r
-                if ( (LA24_0==LBRACKET) ) {\r
-                    alt24=1;\r
-                }\r
-\r
-\r
-                switch (alt24) {\r
-               case 1 :\r
-                   // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:321:8: LBRACKET ( arrayLength )? RBRACKET\r
-                   {\r
-                   LBRACKET65=(Token)match(input,LBRACKET,FOLLOW_LBRACKET_in_arrayType2122); if (state.failed) return retval; \r
-                   if ( state.backtracking==0 ) stream_LBRACKET.add(LBRACKET65);\r
-\r
-                   // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:321:17: ( arrayLength )?\r
-                   int alt23=2;\r
-                   int LA23_0 = input.LA(1);\r
-\r
-                   if ( ((LA23_0>=INT && LA23_0<=INT_RANGE)) ) {\r
-                       alt23=1;\r
-                   }\r
-                   switch (alt23) {\r
-                       case 1 :\r
-                           // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:321:17: arrayLength\r
-                           {\r
-                           pushFollow(FOLLOW_arrayLength_in_arrayType2124);\r
-                           arrayLength66=arrayLength();\r
-\r
-                           state._fsp--;\r
-                           if (state.failed) return retval;\r
-                           if ( state.backtracking==0 ) stream_arrayLength.add(arrayLength66.getTree());\r
-\r
-                           }\r
-                           break;\r
-\r
-                   }\r
-\r
-                   RBRACKET67=(Token)match(input,RBRACKET,FOLLOW_RBRACKET_in_arrayType2127); if (state.failed) return retval; \r
-                   if ( state.backtracking==0 ) stream_RBRACKET.add(RBRACKET67);\r
-\r
-\r
-\r
-                   // AST REWRITE\r
-                   // elements: arrayType, arrayLength\r
-                   // token labels: \r
-                   // rule labels: retval\r
-                   // token list labels: \r
-                   // rule list labels: \r
-                   // wildcard labels: \r
-                   if ( state.backtracking==0 ) {\r
-                   retval.tree = root_0;\r
-                   RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                   root_0 = (CommonTree)adaptor.nil();\r
-                   // 321:39: -> ^( ARRAY_TYPE $arrayType ( arrayLength )? )\r
-                   {\r
-                       // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:321:42: ^( ARRAY_TYPE $arrayType ( arrayLength )? )\r
-                       {\r
-                       CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                       root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(ARRAY_TYPE, "ARRAY_TYPE"), root_1);\r
-\r
-                       adaptor.addChild(root_1, stream_retval.nextTree());\r
-                       // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:321:66: ( arrayLength )?\r
-                       if ( stream_arrayLength.hasNext() ) {\r
-                           adaptor.addChild(root_1, stream_arrayLength.nextTree());\r
-\r
-                       }\r
-                       stream_arrayLength.reset();\r
-\r
-                       adaptor.addChild(root_0, root_1);\r
-                       }\r
-\r
-                   }\r
-\r
-                   retval.tree = root_0;}\r
-                   }\r
-                   break;\r
-\r
-               default :\r
-                   break loop24;\r
-                }\r
-            } while (true);\r
-\r
-\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "arrayType"\r
-\r
-    public static class arrayLength_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "arrayLength"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:323:1: arrayLength : ( INT | INT_RANGE );\r
-    public final GraphParser.arrayLength_return arrayLength() throws RecognitionException {\r
-        GraphParser.arrayLength_return retval = new GraphParser.arrayLength_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token set68=null;\r
-\r
-        CommonTree set68_tree=null;\r
-\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:324:5: ( INT | INT_RANGE )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:\r
-            {\r
-            root_0 = (CommonTree)adaptor.nil();\r
-\r
-            set68=(Token)input.LT(1);\r
-            if ( (input.LA(1)>=INT && input.LA(1)<=INT_RANGE) ) {\r
-                input.consume();\r
-                if ( state.backtracking==0 ) adaptor.addChild(root_0, (CommonTree)adaptor.create(set68));\r
-                state.errorRecovery=false;state.failed=false;\r
-            }\r
-            else {\r
-                if (state.backtracking>0) {state.failed=true; return retval;}\r
-                MismatchedSetException mse = new MismatchedSetException(null,input);\r
-                throw mse;\r
-            }\r
-\r
-\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "arrayLength"\r
-\r
-    public static class basicType_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "basicType"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:328:1: basicType : ( tupleType | recordType | typeReference );\r
-    public final GraphParser.basicType_return basicType() throws RecognitionException {\r
-        GraphParser.basicType_return retval = new GraphParser.basicType_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        GraphParser.tupleType_return tupleType69 = null;\r
-\r
-        GraphParser.recordType_return recordType70 = null;\r
-\r
-        GraphParser.typeReference_return typeReference71 = null;\r
-\r
-\r
-\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:329:5: ( tupleType | recordType | typeReference )\r
-            int alt25=3;\r
-            switch ( input.LA(1) ) {\r
-            case LPAREN:\r
-                {\r
-                alt25=1;\r
-                }\r
-                break;\r
-            case LCURLY:\r
-                {\r
-                alt25=2;\r
-                }\r
-                break;\r
-            case ID:\r
-                {\r
-                alt25=3;\r
-                }\r
-                break;\r
-            default:\r
-                if (state.backtracking>0) {state.failed=true; return retval;}\r
-                NoViableAltException nvae =\r
-                    new NoViableAltException("", 25, 0, input);\r
-\r
-                throw nvae;\r
-            }\r
-\r
-            switch (alt25) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:329:7: tupleType\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    pushFollow(FOLLOW_tupleType_in_basicType2181);\r
-                    tupleType69=tupleType();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) adaptor.addChild(root_0, tupleType69.getTree());\r
-\r
-                    }\r
-                    break;\r
-                case 2 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:330:7: recordType\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    pushFollow(FOLLOW_recordType_in_basicType2189);\r
-                    recordType70=recordType();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) adaptor.addChild(root_0, recordType70.getTree());\r
-\r
-                    }\r
-                    break;\r
-                case 3 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:331:7: typeReference\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    pushFollow(FOLLOW_typeReference_in_basicType2197);\r
-                    typeReference71=typeReference();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) adaptor.addChild(root_0, typeReference71.getTree());\r
-\r
-                    }\r
-                    break;\r
-\r
-            }\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "basicType"\r
-\r
-    public static class tupleType_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "tupleType"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:334:1: tupleType : LPAREN ( type ( ',' type )* )? RPAREN -> ^( TUPLE_TYPE ( type )* ) ;\r
-    public final GraphParser.tupleType_return tupleType() throws RecognitionException {\r
-        GraphParser.tupleType_return retval = new GraphParser.tupleType_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token LPAREN72=null;\r
-        Token char_literal74=null;\r
-        Token RPAREN76=null;\r
-        GraphParser.type_return type73 = null;\r
-\r
-        GraphParser.type_return type75 = null;\r
-\r
-\r
-        CommonTree LPAREN72_tree=null;\r
-        CommonTree char_literal74_tree=null;\r
-        CommonTree RPAREN76_tree=null;\r
-        RewriteRuleTokenStream stream_78=new RewriteRuleTokenStream(adaptor,"token 78");\r
-        RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");\r
-        RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");\r
-        RewriteRuleSubtreeStream stream_type=new RewriteRuleSubtreeStream(adaptor,"rule type");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:335:5: ( LPAREN ( type ( ',' type )* )? RPAREN -> ^( TUPLE_TYPE ( type )* ) )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:335:7: LPAREN ( type ( ',' type )* )? RPAREN\r
-            {\r
-            LPAREN72=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_tupleType2219); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN72);\r
-\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:335:14: ( type ( ',' type )* )?\r
-            int alt27=2;\r
-            int LA27_0 = input.LA(1);\r
-\r
-            if ( (LA27_0==ID||LA27_0==LPAREN||LA27_0==LCURLY||LA27_0==77) ) {\r
-                alt27=1;\r
-            }\r
-            switch (alt27) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:335:15: type ( ',' type )*\r
-                    {\r
-                    pushFollow(FOLLOW_type_in_tupleType2222);\r
-                    type73=type();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) stream_type.add(type73.getTree());\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:335:20: ( ',' type )*\r
-                    loop26:\r
-                    do {\r
-                        int alt26=2;\r
-                        int LA26_0 = input.LA(1);\r
-\r
-                        if ( (LA26_0==78) ) {\r
-                            alt26=1;\r
-                        }\r
-\r
-\r
-                        switch (alt26) {\r
-                       case 1 :\r
-                           // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:335:21: ',' type\r
-                           {\r
-                           char_literal74=(Token)match(input,78,FOLLOW_78_in_tupleType2225); if (state.failed) return retval; \r
-                           if ( state.backtracking==0 ) stream_78.add(char_literal74);\r
-\r
-                           pushFollow(FOLLOW_type_in_tupleType2227);\r
-                           type75=type();\r
-\r
-                           state._fsp--;\r
-                           if (state.failed) return retval;\r
-                           if ( state.backtracking==0 ) stream_type.add(type75.getTree());\r
-\r
-                           }\r
-                           break;\r
-\r
-                       default :\r
-                           break loop26;\r
-                        }\r
-                    } while (true);\r
-\r
-\r
-                    }\r
-                    break;\r
-\r
-            }\r
-\r
-            RPAREN76=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_tupleType2233); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN76);\r
-\r
-\r
-\r
-            // AST REWRITE\r
-            // elements: type\r
-            // token labels: \r
-            // rule labels: retval\r
-            // token list labels: \r
-            // rule list labels: \r
-            // wildcard labels: \r
-            if ( state.backtracking==0 ) {\r
-            retval.tree = root_0;\r
-            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-            root_0 = (CommonTree)adaptor.nil();\r
-            // 336:5: -> ^( TUPLE_TYPE ( type )* )\r
-            {\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:336:8: ^( TUPLE_TYPE ( type )* )\r
-                {\r
-                CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TUPLE_TYPE, "TUPLE_TYPE"), root_1);\r
-\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:336:21: ( type )*\r
-                while ( stream_type.hasNext() ) {\r
-                    adaptor.addChild(root_1, stream_type.nextTree());\r
-\r
-                }\r
-                stream_type.reset();\r
-\r
-                adaptor.addChild(root_0, root_1);\r
-                }\r
-\r
-            }\r
-\r
-            retval.tree = root_0;}\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "tupleType"\r
-\r
-    public static class recordType_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "recordType"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:339:1: recordType : LCURLY ( component ( ',' component )* )? RCURLY -> ^( RECORD_TYPE ( component )* ) ;\r
-    public final GraphParser.recordType_return recordType() throws RecognitionException {\r
-        GraphParser.recordType_return retval = new GraphParser.recordType_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token LCURLY77=null;\r
-        Token char_literal79=null;\r
-        Token RCURLY81=null;\r
-        GraphParser.component_return component78 = null;\r
-\r
-        GraphParser.component_return component80 = null;\r
-\r
-\r
-        CommonTree LCURLY77_tree=null;\r
-        CommonTree char_literal79_tree=null;\r
-        CommonTree RCURLY81_tree=null;\r
-        RewriteRuleTokenStream stream_78=new RewriteRuleTokenStream(adaptor,"token 78");\r
-        RewriteRuleTokenStream stream_LCURLY=new RewriteRuleTokenStream(adaptor,"token LCURLY");\r
-        RewriteRuleTokenStream stream_RCURLY=new RewriteRuleTokenStream(adaptor,"token RCURLY");\r
-        RewriteRuleSubtreeStream stream_component=new RewriteRuleSubtreeStream(adaptor,"rule component");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:340:5: ( LCURLY ( component ( ',' component )* )? RCURLY -> ^( RECORD_TYPE ( component )* ) )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:340:7: LCURLY ( component ( ',' component )* )? RCURLY\r
-            {\r
-            LCURLY77=(Token)match(input,LCURLY,FOLLOW_LCURLY_in_recordType2266); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_LCURLY.add(LCURLY77);\r
-\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:340:14: ( component ( ',' component )* )?\r
-            int alt29=2;\r
-            int LA29_0 = input.LA(1);\r
-\r
-            if ( (LA29_0==ID) ) {\r
-                alt29=1;\r
-            }\r
-            switch (alt29) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:340:15: component ( ',' component )*\r
-                    {\r
-                    pushFollow(FOLLOW_component_in_recordType2269);\r
-                    component78=component();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) stream_component.add(component78.getTree());\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:340:25: ( ',' component )*\r
-                    loop28:\r
-                    do {\r
-                        int alt28=2;\r
-                        int LA28_0 = input.LA(1);\r
-\r
-                        if ( (LA28_0==78) ) {\r
-                            alt28=1;\r
-                        }\r
-\r
-\r
-                        switch (alt28) {\r
-                       case 1 :\r
-                           // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:340:26: ',' component\r
-                           {\r
-                           char_literal79=(Token)match(input,78,FOLLOW_78_in_recordType2272); if (state.failed) return retval; \r
-                           if ( state.backtracking==0 ) stream_78.add(char_literal79);\r
-\r
-                           pushFollow(FOLLOW_component_in_recordType2274);\r
-                           component80=component();\r
-\r
-                           state._fsp--;\r
-                           if (state.failed) return retval;\r
-                           if ( state.backtracking==0 ) stream_component.add(component80.getTree());\r
-\r
-                           }\r
-                           break;\r
-\r
-                       default :\r
-                           break loop28;\r
-                        }\r
-                    } while (true);\r
-\r
-\r
-                    }\r
-                    break;\r
-\r
-            }\r
-\r
-            RCURLY81=(Token)match(input,RCURLY,FOLLOW_RCURLY_in_recordType2280); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_RCURLY.add(RCURLY81);\r
-\r
-\r
-\r
-            // AST REWRITE\r
-            // elements: component\r
-            // token labels: \r
-            // rule labels: retval\r
-            // token list labels: \r
-            // rule list labels: \r
-            // wildcard labels: \r
-            if ( state.backtracking==0 ) {\r
-            retval.tree = root_0;\r
-            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-            root_0 = (CommonTree)adaptor.nil();\r
-            // 341:5: -> ^( RECORD_TYPE ( component )* )\r
-            {\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:341:8: ^( RECORD_TYPE ( component )* )\r
-                {\r
-                CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(RECORD_TYPE, "RECORD_TYPE"), root_1);\r
-\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:341:22: ( component )*\r
-                while ( stream_component.hasNext() ) {\r
-                    adaptor.addChild(root_1, stream_component.nextTree());\r
-\r
-                }\r
-                stream_component.reset();\r
-\r
-                adaptor.addChild(root_0, root_1);\r
-                }\r
-\r
-            }\r
-\r
-            retval.tree = root_0;}\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "recordType"\r
-\r
-    public static class component_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "component"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:344:1: component : ID ':' type -> ^( TYPE_COMPONENT ID type ) ;\r
-    public final GraphParser.component_return component() throws RecognitionException {\r
-        GraphParser.component_return retval = new GraphParser.component_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token ID82=null;\r
-        Token char_literal83=null;\r
-        GraphParser.type_return type84 = null;\r
-\r
-\r
-        CommonTree ID82_tree=null;\r
-        CommonTree char_literal83_tree=null;\r
-        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");\r
-        RewriteRuleTokenStream stream_73=new RewriteRuleTokenStream(adaptor,"token 73");\r
-        RewriteRuleSubtreeStream stream_type=new RewriteRuleSubtreeStream(adaptor,"rule type");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:345:5: ( ID ':' type -> ^( TYPE_COMPONENT ID type ) )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:345:7: ID ':' type\r
-            {\r
-            ID82=(Token)match(input,ID,FOLLOW_ID_in_component2312); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_ID.add(ID82);\r
-\r
-            char_literal83=(Token)match(input,73,FOLLOW_73_in_component2314); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_73.add(char_literal83);\r
-\r
-            pushFollow(FOLLOW_type_in_component2316);\r
-            type84=type();\r
-\r
-            state._fsp--;\r
-            if (state.failed) return retval;\r
-            if ( state.backtracking==0 ) stream_type.add(type84.getTree());\r
-\r
-\r
-            // AST REWRITE\r
-            // elements: type, ID\r
-            // token labels: \r
-            // rule labels: retval\r
-            // token list labels: \r
-            // rule list labels: \r
-            // wildcard labels: \r
-            if ( state.backtracking==0 ) {\r
-            retval.tree = root_0;\r
-            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-            root_0 = (CommonTree)adaptor.nil();\r
-            // 346:5: -> ^( TYPE_COMPONENT ID type )\r
-            {\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:346:8: ^( TYPE_COMPONENT ID type )\r
-                {\r
-                CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TYPE_COMPONENT, "TYPE_COMPONENT"), root_1);\r
-\r
-                adaptor.addChild(root_1, stream_ID.nextNode());\r
-                adaptor.addChild(root_1, stream_type.nextTree());\r
-\r
-                adaptor.addChild(root_0, root_1);\r
-                }\r
-\r
-            }\r
-\r
-            retval.tree = root_0;}\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "component"\r
-\r
-    public static class typeReference_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "typeReference"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:349:1: typeReference : ID ( ( LPAREN )=> LPAREN parameter ( ',' parameter )* RPAREN )? -> ^( TYPE_REFERENCE ID ( parameter )* ) ;\r
-    public final GraphParser.typeReference_return typeReference() throws RecognitionException {\r
-        GraphParser.typeReference_return retval = new GraphParser.typeReference_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token ID85=null;\r
-        Token LPAREN86=null;\r
-        Token char_literal88=null;\r
-        Token RPAREN90=null;\r
-        GraphParser.parameter_return parameter87 = null;\r
-\r
-        GraphParser.parameter_return parameter89 = null;\r
-\r
-\r
-        CommonTree ID85_tree=null;\r
-        CommonTree LPAREN86_tree=null;\r
-        CommonTree char_literal88_tree=null;\r
-        CommonTree RPAREN90_tree=null;\r
-        RewriteRuleTokenStream stream_78=new RewriteRuleTokenStream(adaptor,"token 78");\r
-        RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");\r
-        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");\r
-        RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");\r
-        RewriteRuleSubtreeStream stream_parameter=new RewriteRuleSubtreeStream(adaptor,"rule parameter");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:350:5: ( ID ( ( LPAREN )=> LPAREN parameter ( ',' parameter )* RPAREN )? -> ^( TYPE_REFERENCE ID ( parameter )* ) )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:350:7: ID ( ( LPAREN )=> LPAREN parameter ( ',' parameter )* RPAREN )?\r
-            {\r
-            ID85=(Token)match(input,ID,FOLLOW_ID_in_typeReference2350); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_ID.add(ID85);\r
-\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:350:10: ( ( LPAREN )=> LPAREN parameter ( ',' parameter )* RPAREN )?\r
-            int alt31=2;\r
-            alt31 = dfa31.predict(input);\r
-            switch (alt31) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:350:11: ( LPAREN )=> LPAREN parameter ( ',' parameter )* RPAREN\r
-                    {\r
-                    LPAREN86=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_typeReference2358); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN86);\r
-\r
-                    pushFollow(FOLLOW_parameter_in_typeReference2360);\r
-                    parameter87=parameter();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) stream_parameter.add(parameter87.getTree());\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:350:39: ( ',' parameter )*\r
-                    loop30:\r
-                    do {\r
-                        int alt30=2;\r
-                        int LA30_0 = input.LA(1);\r
-\r
-                        if ( (LA30_0==78) ) {\r
-                            alt30=1;\r
-                        }\r
-\r
-\r
-                        switch (alt30) {\r
-                       case 1 :\r
-                           // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:350:40: ',' parameter\r
-                           {\r
-                           char_literal88=(Token)match(input,78,FOLLOW_78_in_typeReference2363); if (state.failed) return retval; \r
-                           if ( state.backtracking==0 ) stream_78.add(char_literal88);\r
-\r
-                           pushFollow(FOLLOW_parameter_in_typeReference2365);\r
-                           parameter89=parameter();\r
-\r
-                           state._fsp--;\r
-                           if (state.failed) return retval;\r
-                           if ( state.backtracking==0 ) stream_parameter.add(parameter89.getTree());\r
-\r
-                           }\r
-                           break;\r
-\r
-                       default :\r
-                           break loop30;\r
-                        }\r
-                    } while (true);\r
-\r
-                    RPAREN90=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_typeReference2369); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN90);\r
-\r
-\r
-                    }\r
-                    break;\r
-\r
-            }\r
-\r
-\r
-\r
-            // AST REWRITE\r
-            // elements: ID, parameter\r
-            // token labels: \r
-            // rule labels: retval\r
-            // token list labels: \r
-            // rule list labels: \r
-            // wildcard labels: \r
-            if ( state.backtracking==0 ) {\r
-            retval.tree = root_0;\r
-            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-            root_0 = (CommonTree)adaptor.nil();\r
-            // 351:5: -> ^( TYPE_REFERENCE ID ( parameter )* )\r
-            {\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:351:8: ^( TYPE_REFERENCE ID ( parameter )* )\r
-                {\r
-                CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TYPE_REFERENCE, "TYPE_REFERENCE"), root_1);\r
-\r
-                adaptor.addChild(root_1, stream_ID.nextNode());\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:351:28: ( parameter )*\r
-                while ( stream_parameter.hasNext() ) {\r
-                    adaptor.addChild(root_1, stream_parameter.nextTree());\r
-\r
-                }\r
-                stream_parameter.reset();\r
-\r
-                adaptor.addChild(root_0, root_1);\r
-                }\r
-\r
-            }\r
-\r
-            retval.tree = root_0;}\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "typeReference"\r
-\r
-    public static class parameter_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "parameter"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:354:1: parameter : ( ID '=' parameterValue -> ^( TYPE_ANNOTATION ID parameterValue ) | type );\r
-    public final GraphParser.parameter_return parameter() throws RecognitionException {\r
-        GraphParser.parameter_return retval = new GraphParser.parameter_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token ID91=null;\r
-        Token char_literal92=null;\r
-        GraphParser.parameterValue_return parameterValue93 = null;\r
-\r
-        GraphParser.type_return type94 = null;\r
-\r
-\r
-        CommonTree ID91_tree=null;\r
-        CommonTree char_literal92_tree=null;\r
-        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");\r
-        RewriteRuleTokenStream stream_74=new RewriteRuleTokenStream(adaptor,"token 74");\r
-        RewriteRuleSubtreeStream stream_parameterValue=new RewriteRuleSubtreeStream(adaptor,"rule parameterValue");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:355:5: ( ID '=' parameterValue -> ^( TYPE_ANNOTATION ID parameterValue ) | type )\r
-            int alt32=2;\r
-            int LA32_0 = input.LA(1);\r
-\r
-            if ( (LA32_0==ID) ) {\r
-                int LA32_1 = input.LA(2);\r
-\r
-                if ( (LA32_1==74) ) {\r
-                    alt32=1;\r
-                }\r
-                else if ( ((LA32_1>=LPAREN && LA32_1<=LBRACKET)||LA32_1==78) ) {\r
-                    alt32=2;\r
-                }\r
-                else {\r
-                    if (state.backtracking>0) {state.failed=true; return retval;}\r
-                    NoViableAltException nvae =\r
-                        new NoViableAltException("", 32, 1, input);\r
-\r
-                    throw nvae;\r
-                }\r
-            }\r
-            else if ( (LA32_0==LPAREN||LA32_0==LCURLY||LA32_0==77) ) {\r
-                alt32=2;\r
-            }\r
-            else {\r
-                if (state.backtracking>0) {state.failed=true; return retval;}\r
-                NoViableAltException nvae =\r
-                    new NoViableAltException("", 32, 0, input);\r
-\r
-                throw nvae;\r
-            }\r
-            switch (alt32) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:355:7: ID '=' parameterValue\r
-                    {\r
-                    ID91=(Token)match(input,ID,FOLLOW_ID_in_parameter2405); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_ID.add(ID91);\r
-\r
-                    char_literal92=(Token)match(input,74,FOLLOW_74_in_parameter2407); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_74.add(char_literal92);\r
-\r
-                    pushFollow(FOLLOW_parameterValue_in_parameter2409);\r
-                    parameterValue93=parameterValue();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) stream_parameterValue.add(parameterValue93.getTree());\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: ID, parameterValue\r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 355:29: -> ^( TYPE_ANNOTATION ID parameterValue )\r
-                    {\r
-                        // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:355:32: ^( TYPE_ANNOTATION ID parameterValue )\r
-                        {\r
-                        CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                        root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TYPE_ANNOTATION, "TYPE_ANNOTATION"), root_1);\r
-\r
-                        adaptor.addChild(root_1, stream_ID.nextNode());\r
-                        adaptor.addChild(root_1, stream_parameterValue.nextTree());\r
-\r
-                        adaptor.addChild(root_0, root_1);\r
-                        }\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-                    break;\r
-                case 2 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:356:7: type\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    pushFollow(FOLLOW_type_in_parameter2427);\r
-                    type94=type();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) adaptor.addChild(root_0, type94.getTree());\r
-\r
-                    }\r
-                    break;\r
-\r
-            }\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "parameter"\r
-\r
-    public static class parameterValue_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "parameterValue"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:359:1: parameterValue : ( string | boolean_ | number | rangePar -> ^( RANGE rangePar ) );\r
-    public final GraphParser.parameterValue_return parameterValue() throws RecognitionException {\r
-        GraphParser.parameterValue_return retval = new GraphParser.parameterValue_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        GraphParser.string_return string95 = null;\r
-\r
-        GraphParser.boolean__return boolean_96 = null;\r
-\r
-        GraphParser.number_return number97 = null;\r
-\r
-        GraphParser.rangePar_return rangePar98 = null;\r
-\r
-\r
-        RewriteRuleSubtreeStream stream_rangePar=new RewriteRuleSubtreeStream(adaptor,"rule rangePar");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:360:5: ( string | boolean_ | number | rangePar -> ^( RANGE rangePar ) )\r
-            int alt33=4;\r
-            switch ( input.LA(1) ) {\r
-            case STRING:\r
-                {\r
-                alt33=1;\r
-                }\r
-                break;\r
-            case 79:\r
-            case 80:\r
-                {\r
-                alt33=2;\r
-                }\r
-                break;\r
-            case INT:\r
-            case FLOAT:\r
-                {\r
-                alt33=3;\r
-                }\r
-                break;\r
-            case LPAREN:\r
-            case LBRACKET:\r
-                {\r
-                alt33=4;\r
-                }\r
-                break;\r
-            default:\r
-                if (state.backtracking>0) {state.failed=true; return retval;}\r
-                NoViableAltException nvae =\r
-                    new NoViableAltException("", 33, 0, input);\r
-\r
-                throw nvae;\r
-            }\r
-\r
-            switch (alt33) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:360:7: string\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    pushFollow(FOLLOW_string_in_parameterValue2446);\r
-                    string95=string();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) adaptor.addChild(root_0, string95.getTree());\r
-\r
-                    }\r
-                    break;\r
-                case 2 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:361:7: boolean_\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    pushFollow(FOLLOW_boolean__in_parameterValue2454);\r
-                    boolean_96=boolean_();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) adaptor.addChild(root_0, boolean_96.getTree());\r
-\r
-                    }\r
-                    break;\r
-                case 3 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:362:7: number\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    pushFollow(FOLLOW_number_in_parameterValue2462);\r
-                    number97=number();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) adaptor.addChild(root_0, number97.getTree());\r
-\r
-                    }\r
-                    break;\r
-                case 4 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:363:7: rangePar\r
-                    {\r
-                    pushFollow(FOLLOW_rangePar_in_parameterValue2470);\r
-                    rangePar98=rangePar();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) stream_rangePar.add(rangePar98.getTree());\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: rangePar\r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 363:16: -> ^( RANGE rangePar )\r
-                    {\r
-                        // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:363:19: ^( RANGE rangePar )\r
-                        {\r
-                        CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                        root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(RANGE, "RANGE"), root_1);\r
-\r
-                        adaptor.addChild(root_1, stream_rangePar.nextTree());\r
-\r
-                        adaptor.addChild(root_0, root_1);\r
-                        }\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-                    break;\r
-\r
-            }\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "parameterValue"\r
-\r
-    public static class rangePar_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "rangePar"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:366:1: rangePar : ( LBRACKET | LPAREN ) range ( RBRACKET | RPAREN ) ;\r
-    public final GraphParser.rangePar_return rangePar() throws RecognitionException {\r
-        GraphParser.rangePar_return retval = new GraphParser.rangePar_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token set99=null;\r
-        Token set101=null;\r
-        GraphParser.range_return range100 = null;\r
-\r
-\r
-        CommonTree set99_tree=null;\r
-        CommonTree set101_tree=null;\r
-\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:366:10: ( ( LBRACKET | LPAREN ) range ( RBRACKET | RPAREN ) )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:366:12: ( LBRACKET | LPAREN ) range ( RBRACKET | RPAREN )\r
-            {\r
-            root_0 = (CommonTree)adaptor.nil();\r
-\r
-            set99=(Token)input.LT(1);\r
-            if ( input.LA(1)==LPAREN||input.LA(1)==LBRACKET ) {\r
-                input.consume();\r
-                if ( state.backtracking==0 ) adaptor.addChild(root_0, (CommonTree)adaptor.create(set99));\r
-                state.errorRecovery=false;state.failed=false;\r
-            }\r
-            else {\r
-                if (state.backtracking>0) {state.failed=true; return retval;}\r
-                MismatchedSetException mse = new MismatchedSetException(null,input);\r
-                throw mse;\r
-            }\r
-\r
-            pushFollow(FOLLOW_range_in_rangePar2507);\r
-            range100=range();\r
-\r
-            state._fsp--;\r
-            if (state.failed) return retval;\r
-            if ( state.backtracking==0 ) adaptor.addChild(root_0, range100.getTree());\r
-            set101=(Token)input.LT(1);\r
-            if ( input.LA(1)==RPAREN||input.LA(1)==RBRACKET ) {\r
-                input.consume();\r
-                if ( state.backtracking==0 ) adaptor.addChild(root_0, (CommonTree)adaptor.create(set101));\r
-                state.errorRecovery=false;state.failed=false;\r
-            }\r
-            else {\r
-                if (state.backtracking>0) {state.failed=true; return retval;}\r
-                MismatchedSetException mse = new MismatchedSetException(null,input);\r
-                throw mse;\r
-            }\r
-\r
-\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "rangePar"\r
-\r
-    public static class range_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "range"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:368:1: range : ( number | RANGE | INT_RANGE );\r
-    public final GraphParser.range_return range() throws RecognitionException {\r
-        GraphParser.range_return retval = new GraphParser.range_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token RANGE103=null;\r
-        Token INT_RANGE104=null;\r
-        GraphParser.number_return number102 = null;\r
-\r
-\r
-        CommonTree RANGE103_tree=null;\r
-        CommonTree INT_RANGE104_tree=null;\r
-\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:369:5: ( number | RANGE | INT_RANGE )\r
-            int alt34=3;\r
-            switch ( input.LA(1) ) {\r
-            case INT:\r
-            case FLOAT:\r
-                {\r
-                alt34=1;\r
-                }\r
-                break;\r
-            case RANGE:\r
-                {\r
-                alt34=2;\r
-                }\r
-                break;\r
-            case INT_RANGE:\r
-                {\r
-                alt34=3;\r
-                }\r
-                break;\r
-            default:\r
-                if (state.backtracking>0) {state.failed=true; return retval;}\r
-                NoViableAltException nvae =\r
-                    new NoViableAltException("", 34, 0, input);\r
-\r
-                throw nvae;\r
-            }\r
-\r
-            switch (alt34) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:369:7: number\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    pushFollow(FOLLOW_number_in_range2536);\r
-                    number102=number();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) adaptor.addChild(root_0, number102.getTree());\r
-\r
-                    }\r
-                    break;\r
-                case 2 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:370:7: RANGE\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    RANGE103=(Token)match(input,RANGE,FOLLOW_RANGE_in_range2544); if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) {\r
-                    RANGE103_tree = (CommonTree)adaptor.create(RANGE103);\r
-                    adaptor.addChild(root_0, RANGE103_tree);\r
-                    }\r
-\r
-                    }\r
-                    break;\r
-                case 3 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:371:7: INT_RANGE\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    INT_RANGE104=(Token)match(input,INT_RANGE,FOLLOW_INT_RANGE_in_range2552); if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) {\r
-                    INT_RANGE104_tree = (CommonTree)adaptor.create(INT_RANGE104);\r
-                    adaptor.addChild(root_0, INT_RANGE104_tree);\r
-                    }\r
-\r
-                    }\r
-                    break;\r
-\r
-            }\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "range"\r
-\r
-    public static class number_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "number"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:374:1: number : ( INT | FLOAT );\r
-    public final GraphParser.number_return number() throws RecognitionException {\r
-        GraphParser.number_return retval = new GraphParser.number_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token set105=null;\r
-\r
-        CommonTree set105_tree=null;\r
-\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:375:5: ( INT | FLOAT )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:\r
-            {\r
-            root_0 = (CommonTree)adaptor.nil();\r
-\r
-            set105=(Token)input.LT(1);\r
-            if ( input.LA(1)==INT||input.LA(1)==FLOAT ) {\r
-                input.consume();\r
-                if ( state.backtracking==0 ) adaptor.addChild(root_0, (CommonTree)adaptor.create(set105));\r
-                state.errorRecovery=false;state.failed=false;\r
-            }\r
-            else {\r
-                if (state.backtracking>0) {state.failed=true; return retval;}\r
-                MismatchedSetException mse = new MismatchedSetException(null,input);\r
-                throw mse;\r
-            }\r
-\r
-\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "number"\r
-\r
-    public static class string_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "string"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:379:1: string : STRING ;\r
-    public final GraphParser.string_return string() throws RecognitionException {\r
-        GraphParser.string_return retval = new GraphParser.string_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token STRING106=null;\r
-\r
-        CommonTree STRING106_tree=null;\r
-\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:380:5: ( STRING )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:380:7: STRING\r
-            {\r
-            root_0 = (CommonTree)adaptor.nil();\r
-\r
-            STRING106=(Token)match(input,STRING,FOLLOW_STRING_in_string2606); if (state.failed) return retval;\r
-            if ( state.backtracking==0 ) {\r
-            STRING106_tree = (CommonTree)adaptor.create(STRING106);\r
-            adaptor.addChild(root_0, STRING106_tree);\r
-            }\r
-\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "string"\r
-\r
-    public static class boolean__return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "boolean_"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:383:1: boolean_ : ( 'true' -> TRUE | 'false' -> FALSE );\r
-    public final GraphParser.boolean__return boolean_() throws RecognitionException {\r
-        GraphParser.boolean__return retval = new GraphParser.boolean__return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token string_literal107=null;\r
-        Token string_literal108=null;\r
-\r
-        CommonTree string_literal107_tree=null;\r
-        CommonTree string_literal108_tree=null;\r
-        RewriteRuleTokenStream stream_79=new RewriteRuleTokenStream(adaptor,"token 79");\r
-        RewriteRuleTokenStream stream_80=new RewriteRuleTokenStream(adaptor,"token 80");\r
-\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:384:5: ( 'true' -> TRUE | 'false' -> FALSE )\r
-            int alt35=2;\r
-            int LA35_0 = input.LA(1);\r
-\r
-            if ( (LA35_0==79) ) {\r
-                alt35=1;\r
-            }\r
-            else if ( (LA35_0==80) ) {\r
-                alt35=2;\r
-            }\r
-            else {\r
-                if (state.backtracking>0) {state.failed=true; return retval;}\r
-                NoViableAltException nvae =\r
-                    new NoViableAltException("", 35, 0, input);\r
-\r
-                throw nvae;\r
-            }\r
-            switch (alt35) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:384:7: 'true'\r
-                    {\r
-                    string_literal107=(Token)match(input,79,FOLLOW_79_in_boolean_2627); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_79.add(string_literal107);\r
-\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: \r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 384:14: -> TRUE\r
-                    {\r
-                        adaptor.addChild(root_0, (CommonTree)adaptor.create(TRUE, "TRUE"));\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-                    break;\r
-                case 2 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:385:7: 'false'\r
-                    {\r
-                    string_literal108=(Token)match(input,80,FOLLOW_80_in_boolean_2639); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_80.add(string_literal108);\r
-\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: \r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 385:15: -> FALSE\r
-                    {\r
-                        adaptor.addChild(root_0, (CommonTree)adaptor.create(FALSE, "FALSE"));\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-                    break;\r
-\r
-            }\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "boolean_"\r
-\r
-    public static class valueDefinitions_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "valueDefinitions"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:392:1: valueDefinitions : ( valueDefinition )* -> ^( VALUE_DEFINITIONS ( valueDefinition )* ) ;\r
-    public final GraphParser.valueDefinitions_return valueDefinitions() throws RecognitionException {\r
-        GraphParser.valueDefinitions_return retval = new GraphParser.valueDefinitions_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        GraphParser.valueDefinition_return valueDefinition109 = null;\r
-\r
-\r
-        RewriteRuleSubtreeStream stream_valueDefinition=new RewriteRuleSubtreeStream(adaptor,"rule valueDefinition");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:392:18: ( ( valueDefinition )* -> ^( VALUE_DEFINITIONS ( valueDefinition )* ) )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:392:20: ( valueDefinition )*\r
-            {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:392:20: ( valueDefinition )*\r
-            loop36:\r
-            do {\r
-                int alt36=2;\r
-                int LA36_0 = input.LA(1);\r
-\r
-                if ( (LA36_0==ID) ) {\r
-                    alt36=1;\r
-                }\r
-\r
-\r
-                switch (alt36) {\r
-               case 1 :\r
-                   // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:392:20: valueDefinition\r
-                   {\r
-                   pushFollow(FOLLOW_valueDefinition_in_valueDefinitions2660);\r
-                   valueDefinition109=valueDefinition();\r
-\r
-                   state._fsp--;\r
-                   if (state.failed) return retval;\r
-                   if ( state.backtracking==0 ) stream_valueDefinition.add(valueDefinition109.getTree());\r
-\r
-                   }\r
-                   break;\r
-\r
-               default :\r
-                   break loop36;\r
-                }\r
-            } while (true);\r
-\r
-\r
-\r
-            // AST REWRITE\r
-            // elements: valueDefinition\r
-            // token labels: \r
-            // rule labels: retval\r
-            // token list labels: \r
-            // rule list labels: \r
-            // wildcard labels: \r
-            if ( state.backtracking==0 ) {\r
-            retval.tree = root_0;\r
-            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-            root_0 = (CommonTree)adaptor.nil();\r
-            // 392:37: -> ^( VALUE_DEFINITIONS ( valueDefinition )* )\r
-            {\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:392:40: ^( VALUE_DEFINITIONS ( valueDefinition )* )\r
-                {\r
-                CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(VALUE_DEFINITIONS, "VALUE_DEFINITIONS"), root_1);\r
-\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:392:60: ( valueDefinition )*\r
-                while ( stream_valueDefinition.hasNext() ) {\r
-                    adaptor.addChild(root_1, stream_valueDefinition.nextTree());\r
-\r
-                }\r
-                stream_valueDefinition.reset();\r
-\r
-                adaptor.addChild(root_0, root_1);\r
-                }\r
-\r
-            }\r
-\r
-            retval.tree = root_0;}\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "valueDefinitions"\r
-\r
-    public static class valueDefinition_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "valueDefinition"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:394:1: valueDefinition : ID ':' type '=' value -> ^( VALUE_DEFINITION ID type value ) ;\r
-    public final GraphParser.valueDefinition_return valueDefinition() throws RecognitionException {\r
-        GraphParser.valueDefinition_return retval = new GraphParser.valueDefinition_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token ID110=null;\r
-        Token char_literal111=null;\r
-        Token char_literal113=null;\r
-        GraphParser.type_return type112 = null;\r
-\r
-        GraphParser.value_return value114 = null;\r
-\r
-\r
-        CommonTree ID110_tree=null;\r
-        CommonTree char_literal111_tree=null;\r
-        CommonTree char_literal113_tree=null;\r
-        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");\r
-        RewriteRuleTokenStream stream_73=new RewriteRuleTokenStream(adaptor,"token 73");\r
-        RewriteRuleTokenStream stream_74=new RewriteRuleTokenStream(adaptor,"token 74");\r
-        RewriteRuleSubtreeStream stream_value=new RewriteRuleSubtreeStream(adaptor,"rule value");\r
-        RewriteRuleSubtreeStream stream_type=new RewriteRuleSubtreeStream(adaptor,"rule type");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:395:5: ( ID ':' type '=' value -> ^( VALUE_DEFINITION ID type value ) )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:395:7: ID ':' type '=' value\r
-            {\r
-            ID110=(Token)match(input,ID,FOLLOW_ID_in_valueDefinition2683); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_ID.add(ID110);\r
-\r
-            char_literal111=(Token)match(input,73,FOLLOW_73_in_valueDefinition2685); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_73.add(char_literal111);\r
-\r
-            pushFollow(FOLLOW_type_in_valueDefinition2687);\r
-            type112=type();\r
-\r
-            state._fsp--;\r
-            if (state.failed) return retval;\r
-            if ( state.backtracking==0 ) stream_type.add(type112.getTree());\r
-            char_literal113=(Token)match(input,74,FOLLOW_74_in_valueDefinition2689); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_74.add(char_literal113);\r
-\r
-            pushFollow(FOLLOW_value_in_valueDefinition2691);\r
-            value114=value();\r
-\r
-            state._fsp--;\r
-            if (state.failed) return retval;\r
-            if ( state.backtracking==0 ) stream_value.add(value114.getTree());\r
-\r
-\r
-            // AST REWRITE\r
-            // elements: value, type, ID\r
-            // token labels: \r
-            // rule labels: retval\r
-            // token list labels: \r
-            // rule list labels: \r
-            // wildcard labels: \r
-            if ( state.backtracking==0 ) {\r
-            retval.tree = root_0;\r
-            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-            root_0 = (CommonTree)adaptor.nil();\r
-            // 396:5: -> ^( VALUE_DEFINITION ID type value )\r
-            {\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:396:8: ^( VALUE_DEFINITION ID type value )\r
-                {\r
-                CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(VALUE_DEFINITION, "VALUE_DEFINITION"), root_1);\r
-\r
-                adaptor.addChild(root_1, stream_ID.nextNode());\r
-                adaptor.addChild(root_1, stream_type.nextTree());\r
-                adaptor.addChild(root_1, stream_value.nextTree());\r
-\r
-                adaptor.addChild(root_0, root_1);\r
-                }\r
-\r
-            }\r
-\r
-            retval.tree = root_0;}\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "valueDefinition"\r
-\r
-    public static class value_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "value"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:399:1: value : ( basicValue -> basicValue ) ( ':' type -> ^( VARIANT type $value) )* ;\r
-    public final GraphParser.value_return value() throws RecognitionException {\r
-        GraphParser.value_return retval = new GraphParser.value_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token char_literal116=null;\r
-        GraphParser.basicValue_return basicValue115 = null;\r
-\r
-        GraphParser.type_return type117 = null;\r
-\r
-\r
-        CommonTree char_literal116_tree=null;\r
-        RewriteRuleTokenStream stream_73=new RewriteRuleTokenStream(adaptor,"token 73");\r
-        RewriteRuleSubtreeStream stream_basicValue=new RewriteRuleSubtreeStream(adaptor,"rule basicValue");\r
-        RewriteRuleSubtreeStream stream_type=new RewriteRuleSubtreeStream(adaptor,"rule type");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:400:5: ( ( basicValue -> basicValue ) ( ':' type -> ^( VARIANT type $value) )* )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:400:7: ( basicValue -> basicValue ) ( ':' type -> ^( VARIANT type $value) )*\r
-            {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:400:7: ( basicValue -> basicValue )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:400:8: basicValue\r
-            {\r
-            pushFollow(FOLLOW_basicValue_in_value2727);\r
-            basicValue115=basicValue();\r
-\r
-            state._fsp--;\r
-            if (state.failed) return retval;\r
-            if ( state.backtracking==0 ) stream_basicValue.add(basicValue115.getTree());\r
-\r
-\r
-            // AST REWRITE\r
-            // elements: basicValue\r
-            // token labels: \r
-            // rule labels: retval\r
-            // token list labels: \r
-            // rule list labels: \r
-            // wildcard labels: \r
-            if ( state.backtracking==0 ) {\r
-            retval.tree = root_0;\r
-            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-            root_0 = (CommonTree)adaptor.nil();\r
-            // 400:19: -> basicValue\r
-            {\r
-                adaptor.addChild(root_0, stream_basicValue.nextTree());\r
-\r
-            }\r
-\r
-            retval.tree = root_0;}\r
-            }\r
-\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:401:7: ( ':' type -> ^( VARIANT type $value) )*\r
-            loop37:\r
-            do {\r
-                int alt37=2;\r
-                int LA37_0 = input.LA(1);\r
-\r
-                if ( (LA37_0==73) ) {\r
-                    alt37=1;\r
-                }\r
-\r
-\r
-                switch (alt37) {\r
-               case 1 :\r
-                   // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:401:8: ':' type\r
-                   {\r
-                   char_literal116=(Token)match(input,73,FOLLOW_73_in_value2741); if (state.failed) return retval; \r
-                   if ( state.backtracking==0 ) stream_73.add(char_literal116);\r
-\r
-                   pushFollow(FOLLOW_type_in_value2743);\r
-                   type117=type();\r
-\r
-                   state._fsp--;\r
-                   if (state.failed) return retval;\r
-                   if ( state.backtracking==0 ) stream_type.add(type117.getTree());\r
-\r
-\r
-                   // AST REWRITE\r
-                   // elements: value, type\r
-                   // token labels: \r
-                   // rule labels: retval\r
-                   // token list labels: \r
-                   // rule list labels: \r
-                   // wildcard labels: \r
-                   if ( state.backtracking==0 ) {\r
-                   retval.tree = root_0;\r
-                   RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                   root_0 = (CommonTree)adaptor.nil();\r
-                   // 401:17: -> ^( VARIANT type $value)\r
-                   {\r
-                       // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:401:20: ^( VARIANT type $value)\r
-                       {\r
-                       CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                       root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(VARIANT, "VARIANT"), root_1);\r
-\r
-                       adaptor.addChild(root_1, stream_type.nextTree());\r
-                       adaptor.addChild(root_1, stream_retval.nextTree());\r
-\r
-                       adaptor.addChild(root_0, root_1);\r
-                       }\r
-\r
-                   }\r
-\r
-                   retval.tree = root_0;}\r
-                   }\r
-                   break;\r
-\r
-               default :\r
-                   break loop37;\r
-                }\r
-            } while (true);\r
-\r
-\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "value"\r
-\r
-    public static class basicValue_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "basicValue"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:404:1: basicValue : ( simpleValue | map | {...}? ID -> NO_VALUE | taggedValue );\r
-    public final GraphParser.basicValue_return basicValue() throws RecognitionException {\r
-        GraphParser.basicValue_return retval = new GraphParser.basicValue_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token ID120=null;\r
-        GraphParser.simpleValue_return simpleValue118 = null;\r
-\r
-        GraphParser.map_return map119 = null;\r
-\r
-        GraphParser.taggedValue_return taggedValue121 = null;\r
-\r
-\r
-        CommonTree ID120_tree=null;\r
-        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");\r
-\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:405:5: ( simpleValue | map | {...}? ID -> NO_VALUE | taggedValue )\r
-            int alt38=4;\r
-            int LA38_0 = input.LA(1);\r
-\r
-            if ( (LA38_0==LPAREN||LA38_0==LBRACKET||LA38_0==LCURLY||LA38_0==INT||LA38_0==FLOAT||LA38_0==STRING||(LA38_0>=79 && LA38_0<=80)) ) {\r
-                alt38=1;\r
-            }\r
-            else if ( (LA38_0==ID) ) {\r
-                int LA38_2 = input.LA(2);\r
-\r
-                if ( (LA38_2==LCURLY) && ((input.LT(1).getText().equals("map")))) {\r
-                    alt38=2;\r
-                }\r
-                else if ( ((input.LT(1).getText().equals("null"))) ) {\r
-                    alt38=3;\r
-                }\r
-                else if ( (true) ) {\r
-                    alt38=4;\r
-                }\r
-                else {\r
-                    if (state.backtracking>0) {state.failed=true; return retval;}\r
-                    NoViableAltException nvae =\r
-                        new NoViableAltException("", 38, 2, input);\r
-\r
-                    throw nvae;\r
-                }\r
-            }\r
-            else {\r
-                if (state.backtracking>0) {state.failed=true; return retval;}\r
-                NoViableAltException nvae =\r
-                    new NoViableAltException("", 38, 0, input);\r
-\r
-                throw nvae;\r
-            }\r
-            switch (alt38) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:405:7: simpleValue\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    pushFollow(FOLLOW_simpleValue_in_basicValue2775);\r
-                    simpleValue118=simpleValue();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) adaptor.addChild(root_0, simpleValue118.getTree());\r
-\r
-                    }\r
-                    break;\r
-                case 2 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:406:7: map\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    pushFollow(FOLLOW_map_in_basicValue2783);\r
-                    map119=map();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) adaptor.addChild(root_0, map119.getTree());\r
-\r
-                    }\r
-                    break;\r
-                case 3 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:407:7: {...}? ID\r
-                    {\r
-                    if ( !((input.LT(1).getText().equals("null"))) ) {\r
-                        if (state.backtracking>0) {state.failed=true; return retval;}\r
-                        throw new FailedPredicateException(input, "basicValue", "input.LT(1).getText().equals(\"null\")");\r
-                    }\r
-                    ID120=(Token)match(input,ID,FOLLOW_ID_in_basicValue2793); if (state.failed) return retval; \r
-                    if ( state.backtracking==0 ) stream_ID.add(ID120);\r
-\r
-\r
-\r
-                    // AST REWRITE\r
-                    // elements: \r
-                    // token labels: \r
-                    // rule labels: retval\r
-                    // token list labels: \r
-                    // rule list labels: \r
-                    // wildcard labels: \r
-                    if ( state.backtracking==0 ) {\r
-                    retval.tree = root_0;\r
-                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-                    // 407:50: -> NO_VALUE\r
-                    {\r
-                        adaptor.addChild(root_0, (CommonTree)adaptor.create(NO_VALUE, "NO_VALUE"));\r
-\r
-                    }\r
-\r
-                    retval.tree = root_0;}\r
-                    }\r
-                    break;\r
-                case 4 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:408:7: taggedValue\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    pushFollow(FOLLOW_taggedValue_in_basicValue2805);\r
-                    taggedValue121=taggedValue();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) adaptor.addChild(root_0, taggedValue121.getTree());\r
-\r
-                    }\r
-                    break;\r
-\r
-            }\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "basicValue"\r
-\r
-    public static class simpleValue_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "simpleValue"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:411:1: simpleValue : ( string | number | boolean_ | array | tuple | record );\r
-    public final GraphParser.simpleValue_return simpleValue() throws RecognitionException {\r
-        GraphParser.simpleValue_return retval = new GraphParser.simpleValue_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        GraphParser.string_return string122 = null;\r
-\r
-        GraphParser.number_return number123 = null;\r
-\r
-        GraphParser.boolean__return boolean_124 = null;\r
-\r
-        GraphParser.array_return array125 = null;\r
-\r
-        GraphParser.tuple_return tuple126 = null;\r
-\r
-        GraphParser.record_return record127 = null;\r
-\r
-\r
-\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:412:5: ( string | number | boolean_ | array | tuple | record )\r
-            int alt39=6;\r
-            switch ( input.LA(1) ) {\r
-            case STRING:\r
-                {\r
-                alt39=1;\r
-                }\r
-                break;\r
-            case INT:\r
-            case FLOAT:\r
-                {\r
-                alt39=2;\r
-                }\r
-                break;\r
-            case 79:\r
-            case 80:\r
-                {\r
-                alt39=3;\r
-                }\r
-                break;\r
-            case LBRACKET:\r
-                {\r
-                alt39=4;\r
-                }\r
-                break;\r
-            case LPAREN:\r
-                {\r
-                alt39=5;\r
-                }\r
-                break;\r
-            case LCURLY:\r
-                {\r
-                alt39=6;\r
-                }\r
-                break;\r
-            default:\r
-                if (state.backtracking>0) {state.failed=true; return retval;}\r
-                NoViableAltException nvae =\r
-                    new NoViableAltException("", 39, 0, input);\r
-\r
-                throw nvae;\r
-            }\r
-\r
-            switch (alt39) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:412:7: string\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    pushFollow(FOLLOW_string_in_simpleValue2830);\r
-                    string122=string();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) adaptor.addChild(root_0, string122.getTree());\r
-\r
-                    }\r
-                    break;\r
-                case 2 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:413:7: number\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    pushFollow(FOLLOW_number_in_simpleValue2838);\r
-                    number123=number();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) adaptor.addChild(root_0, number123.getTree());\r
-\r
-                    }\r
-                    break;\r
-                case 3 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:414:7: boolean_\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    pushFollow(FOLLOW_boolean__in_simpleValue2846);\r
-                    boolean_124=boolean_();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) adaptor.addChild(root_0, boolean_124.getTree());\r
-\r
-                    }\r
-                    break;\r
-                case 4 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:415:7: array\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    pushFollow(FOLLOW_array_in_simpleValue2854);\r
-                    array125=array();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) adaptor.addChild(root_0, array125.getTree());\r
-\r
-                    }\r
-                    break;\r
-                case 5 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:416:7: tuple\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    pushFollow(FOLLOW_tuple_in_simpleValue2862);\r
-                    tuple126=tuple();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) adaptor.addChild(root_0, tuple126.getTree());\r
-\r
-                    }\r
-                    break;\r
-                case 6 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:417:7: record\r
-                    {\r
-                    root_0 = (CommonTree)adaptor.nil();\r
-\r
-                    pushFollow(FOLLOW_record_in_simpleValue2870);\r
-                    record127=record();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) adaptor.addChild(root_0, record127.getTree());\r
-\r
-                    }\r
-                    break;\r
-\r
-            }\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "simpleValue"\r
-\r
-    public static class array_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "array"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:420:1: array : LBRACKET ( value ( ',' value )* )? RBRACKET -> ^( ARRAY ( value )* ) ;\r
-    public final GraphParser.array_return array() throws RecognitionException {\r
-        GraphParser.array_return retval = new GraphParser.array_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token LBRACKET128=null;\r
-        Token char_literal130=null;\r
-        Token RBRACKET132=null;\r
-        GraphParser.value_return value129 = null;\r
-\r
-        GraphParser.value_return value131 = null;\r
-\r
-\r
-        CommonTree LBRACKET128_tree=null;\r
-        CommonTree char_literal130_tree=null;\r
-        CommonTree RBRACKET132_tree=null;\r
-        RewriteRuleTokenStream stream_LBRACKET=new RewriteRuleTokenStream(adaptor,"token LBRACKET");\r
-        RewriteRuleTokenStream stream_78=new RewriteRuleTokenStream(adaptor,"token 78");\r
-        RewriteRuleTokenStream stream_RBRACKET=new RewriteRuleTokenStream(adaptor,"token RBRACKET");\r
-        RewriteRuleSubtreeStream stream_value=new RewriteRuleSubtreeStream(adaptor,"rule value");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:421:5: ( LBRACKET ( value ( ',' value )* )? RBRACKET -> ^( ARRAY ( value )* ) )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:421:7: LBRACKET ( value ( ',' value )* )? RBRACKET\r
-            {\r
-            LBRACKET128=(Token)match(input,LBRACKET,FOLLOW_LBRACKET_in_array2891); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_LBRACKET.add(LBRACKET128);\r
-\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:421:16: ( value ( ',' value )* )?\r
-            int alt41=2;\r
-            int LA41_0 = input.LA(1);\r
-\r
-            if ( (LA41_0==ID||LA41_0==LPAREN||LA41_0==LBRACKET||LA41_0==LCURLY||LA41_0==INT||LA41_0==FLOAT||LA41_0==STRING||(LA41_0>=79 && LA41_0<=80)) ) {\r
-                alt41=1;\r
-            }\r
-            switch (alt41) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:421:17: value ( ',' value )*\r
-                    {\r
-                    pushFollow(FOLLOW_value_in_array2894);\r
-                    value129=value();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) stream_value.add(value129.getTree());\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:421:23: ( ',' value )*\r
-                    loop40:\r
-                    do {\r
-                        int alt40=2;\r
-                        int LA40_0 = input.LA(1);\r
-\r
-                        if ( (LA40_0==78) ) {\r
-                            alt40=1;\r
-                        }\r
-\r
-\r
-                        switch (alt40) {\r
-                       case 1 :\r
-                           // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:421:24: ',' value\r
-                           {\r
-                           char_literal130=(Token)match(input,78,FOLLOW_78_in_array2897); if (state.failed) return retval; \r
-                           if ( state.backtracking==0 ) stream_78.add(char_literal130);\r
-\r
-                           pushFollow(FOLLOW_value_in_array2899);\r
-                           value131=value();\r
-\r
-                           state._fsp--;\r
-                           if (state.failed) return retval;\r
-                           if ( state.backtracking==0 ) stream_value.add(value131.getTree());\r
-\r
-                           }\r
-                           break;\r
-\r
-                       default :\r
-                           break loop40;\r
-                        }\r
-                    } while (true);\r
-\r
-\r
-                    }\r
-                    break;\r
-\r
-            }\r
-\r
-            RBRACKET132=(Token)match(input,RBRACKET,FOLLOW_RBRACKET_in_array2905); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_RBRACKET.add(RBRACKET132);\r
-\r
-\r
-\r
-            // AST REWRITE\r
-            // elements: value\r
-            // token labels: \r
-            // rule labels: retval\r
-            // token list labels: \r
-            // rule list labels: \r
-            // wildcard labels: \r
-            if ( state.backtracking==0 ) {\r
-            retval.tree = root_0;\r
-            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-            root_0 = (CommonTree)adaptor.nil();\r
-            // 422:5: -> ^( ARRAY ( value )* )\r
-            {\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:422:8: ^( ARRAY ( value )* )\r
-                {\r
-                CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(ARRAY, "ARRAY"), root_1);\r
-\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:422:16: ( value )*\r
-                while ( stream_value.hasNext() ) {\r
-                    adaptor.addChild(root_1, stream_value.nextTree());\r
-\r
-                }\r
-                stream_value.reset();\r
-\r
-                adaptor.addChild(root_0, root_1);\r
-                }\r
-\r
-            }\r
-\r
-            retval.tree = root_0;}\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "array"\r
-\r
-    public static class tuple_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "tuple"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:425:1: tuple : LPAREN ( value ( ',' value )* )? RPAREN -> ^( TUPLE ( value )* ) ;\r
-    public final GraphParser.tuple_return tuple() throws RecognitionException {\r
-        GraphParser.tuple_return retval = new GraphParser.tuple_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token LPAREN133=null;\r
-        Token char_literal135=null;\r
-        Token RPAREN137=null;\r
-        GraphParser.value_return value134 = null;\r
-\r
-        GraphParser.value_return value136 = null;\r
-\r
-\r
-        CommonTree LPAREN133_tree=null;\r
-        CommonTree char_literal135_tree=null;\r
-        CommonTree RPAREN137_tree=null;\r
-        RewriteRuleTokenStream stream_78=new RewriteRuleTokenStream(adaptor,"token 78");\r
-        RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");\r
-        RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");\r
-        RewriteRuleSubtreeStream stream_value=new RewriteRuleSubtreeStream(adaptor,"rule value");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:426:5: ( LPAREN ( value ( ',' value )* )? RPAREN -> ^( TUPLE ( value )* ) )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:426:7: LPAREN ( value ( ',' value )* )? RPAREN\r
-            {\r
-            LPAREN133=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_tuple2937); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN133);\r
-\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:426:14: ( value ( ',' value )* )?\r
-            int alt43=2;\r
-            int LA43_0 = input.LA(1);\r
-\r
-            if ( (LA43_0==ID||LA43_0==LPAREN||LA43_0==LBRACKET||LA43_0==LCURLY||LA43_0==INT||LA43_0==FLOAT||LA43_0==STRING||(LA43_0>=79 && LA43_0<=80)) ) {\r
-                alt43=1;\r
-            }\r
-            switch (alt43) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:426:15: value ( ',' value )*\r
-                    {\r
-                    pushFollow(FOLLOW_value_in_tuple2940);\r
-                    value134=value();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) stream_value.add(value134.getTree());\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:426:21: ( ',' value )*\r
-                    loop42:\r
-                    do {\r
-                        int alt42=2;\r
-                        int LA42_0 = input.LA(1);\r
-\r
-                        if ( (LA42_0==78) ) {\r
-                            alt42=1;\r
-                        }\r
-\r
-\r
-                        switch (alt42) {\r
-                       case 1 :\r
-                           // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:426:22: ',' value\r
-                           {\r
-                           char_literal135=(Token)match(input,78,FOLLOW_78_in_tuple2943); if (state.failed) return retval; \r
-                           if ( state.backtracking==0 ) stream_78.add(char_literal135);\r
-\r
-                           pushFollow(FOLLOW_value_in_tuple2945);\r
-                           value136=value();\r
-\r
-                           state._fsp--;\r
-                           if (state.failed) return retval;\r
-                           if ( state.backtracking==0 ) stream_value.add(value136.getTree());\r
-\r
-                           }\r
-                           break;\r
-\r
-                       default :\r
-                           break loop42;\r
-                        }\r
-                    } while (true);\r
-\r
-\r
-                    }\r
-                    break;\r
-\r
-            }\r
-\r
-            RPAREN137=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_tuple2951); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN137);\r
-\r
-\r
-\r
-            // AST REWRITE\r
-            // elements: value\r
-            // token labels: \r
-            // rule labels: retval\r
-            // token list labels: \r
-            // rule list labels: \r
-            // wildcard labels: \r
-            if ( state.backtracking==0 ) {\r
-            retval.tree = root_0;\r
-            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-            root_0 = (CommonTree)adaptor.nil();\r
-            // 427:5: -> ^( TUPLE ( value )* )\r
-            {\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:427:8: ^( TUPLE ( value )* )\r
-                {\r
-                CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TUPLE, "TUPLE"), root_1);\r
-\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:427:16: ( value )*\r
-                while ( stream_value.hasNext() ) {\r
-                    adaptor.addChild(root_1, stream_value.nextTree());\r
-\r
-                }\r
-                stream_value.reset();\r
-\r
-                adaptor.addChild(root_0, root_1);\r
-                }\r
-\r
-            }\r
-\r
-            retval.tree = root_0;}\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "tuple"\r
-\r
-    public static class taggedValue_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "taggedValue"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:430:1: taggedValue : ID ( simpleValue )? -> ^( TAGGED_VALUE ID ( simpleValue )? ) ;\r
-    public final GraphParser.taggedValue_return taggedValue() throws RecognitionException {\r
-        GraphParser.taggedValue_return retval = new GraphParser.taggedValue_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token ID138=null;\r
-        GraphParser.simpleValue_return simpleValue139 = null;\r
-\r
-\r
-        CommonTree ID138_tree=null;\r
-        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");\r
-        RewriteRuleSubtreeStream stream_simpleValue=new RewriteRuleSubtreeStream(adaptor,"rule simpleValue");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:431:5: ( ID ( simpleValue )? -> ^( TAGGED_VALUE ID ( simpleValue )? ) )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:431:7: ID ( simpleValue )?\r
-            {\r
-            ID138=(Token)match(input,ID,FOLLOW_ID_in_taggedValue2983); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_ID.add(ID138);\r
-\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:431:10: ( simpleValue )?\r
-            int alt44=2;\r
-            int LA44_0 = input.LA(1);\r
-\r
-            if ( (LA44_0==LPAREN||LA44_0==LBRACKET||LA44_0==LCURLY||LA44_0==INT||LA44_0==FLOAT||LA44_0==STRING||(LA44_0>=79 && LA44_0<=80)) ) {\r
-                alt44=1;\r
-            }\r
-            switch (alt44) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:431:10: simpleValue\r
-                    {\r
-                    pushFollow(FOLLOW_simpleValue_in_taggedValue2985);\r
-                    simpleValue139=simpleValue();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) stream_simpleValue.add(simpleValue139.getTree());\r
-\r
-                    }\r
-                    break;\r
-\r
-            }\r
-\r
-\r
-\r
-            // AST REWRITE\r
-            // elements: simpleValue, ID\r
-            // token labels: \r
-            // rule labels: retval\r
-            // token list labels: \r
-            // rule list labels: \r
-            // wildcard labels: \r
-            if ( state.backtracking==0 ) {\r
-            retval.tree = root_0;\r
-            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-            root_0 = (CommonTree)adaptor.nil();\r
-            // 432:5: -> ^( TAGGED_VALUE ID ( simpleValue )? )\r
-            {\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:432:8: ^( TAGGED_VALUE ID ( simpleValue )? )\r
-                {\r
-                CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TAGGED_VALUE, "TAGGED_VALUE"), root_1);\r
-\r
-                adaptor.addChild(root_1, stream_ID.nextNode());\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:432:26: ( simpleValue )?\r
-                if ( stream_simpleValue.hasNext() ) {\r
-                    adaptor.addChild(root_1, stream_simpleValue.nextTree());\r
-\r
-                }\r
-                stream_simpleValue.reset();\r
-\r
-                adaptor.addChild(root_0, root_1);\r
-                }\r
-\r
-            }\r
-\r
-            retval.tree = root_0;}\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "taggedValue"\r
-\r
-    public static class record_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "record"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:435:1: record : LCURLY ( recordAssignment ( ',' recordAssignment )* )? RCURLY -> ^( RECORD ( recordAssignment )* ) ;\r
-    public final GraphParser.record_return record() throws RecognitionException {\r
-        GraphParser.record_return retval = new GraphParser.record_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token LCURLY140=null;\r
-        Token char_literal142=null;\r
-        Token RCURLY144=null;\r
-        GraphParser.recordAssignment_return recordAssignment141 = null;\r
-\r
-        GraphParser.recordAssignment_return recordAssignment143 = null;\r
-\r
-\r
-        CommonTree LCURLY140_tree=null;\r
-        CommonTree char_literal142_tree=null;\r
-        CommonTree RCURLY144_tree=null;\r
-        RewriteRuleTokenStream stream_78=new RewriteRuleTokenStream(adaptor,"token 78");\r
-        RewriteRuleTokenStream stream_LCURLY=new RewriteRuleTokenStream(adaptor,"token LCURLY");\r
-        RewriteRuleTokenStream stream_RCURLY=new RewriteRuleTokenStream(adaptor,"token RCURLY");\r
-        RewriteRuleSubtreeStream stream_recordAssignment=new RewriteRuleSubtreeStream(adaptor,"rule recordAssignment");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:436:5: ( LCURLY ( recordAssignment ( ',' recordAssignment )* )? RCURLY -> ^( RECORD ( recordAssignment )* ) )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:436:7: LCURLY ( recordAssignment ( ',' recordAssignment )* )? RCURLY\r
-            {\r
-            LCURLY140=(Token)match(input,LCURLY,FOLLOW_LCURLY_in_record3020); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_LCURLY.add(LCURLY140);\r
-\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:436:14: ( recordAssignment ( ',' recordAssignment )* )?\r
-            int alt46=2;\r
-            int LA46_0 = input.LA(1);\r
-\r
-            if ( (LA46_0==ID) ) {\r
-                alt46=1;\r
-            }\r
-            switch (alt46) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:436:15: recordAssignment ( ',' recordAssignment )*\r
-                    {\r
-                    pushFollow(FOLLOW_recordAssignment_in_record3023);\r
-                    recordAssignment141=recordAssignment();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) stream_recordAssignment.add(recordAssignment141.getTree());\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:436:32: ( ',' recordAssignment )*\r
-                    loop45:\r
-                    do {\r
-                        int alt45=2;\r
-                        int LA45_0 = input.LA(1);\r
-\r
-                        if ( (LA45_0==78) ) {\r
-                            alt45=1;\r
-                        }\r
-\r
-\r
-                        switch (alt45) {\r
-                       case 1 :\r
-                           // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:436:33: ',' recordAssignment\r
-                           {\r
-                           char_literal142=(Token)match(input,78,FOLLOW_78_in_record3026); if (state.failed) return retval; \r
-                           if ( state.backtracking==0 ) stream_78.add(char_literal142);\r
-\r
-                           pushFollow(FOLLOW_recordAssignment_in_record3028);\r
-                           recordAssignment143=recordAssignment();\r
-\r
-                           state._fsp--;\r
-                           if (state.failed) return retval;\r
-                           if ( state.backtracking==0 ) stream_recordAssignment.add(recordAssignment143.getTree());\r
-\r
-                           }\r
-                           break;\r
-\r
-                       default :\r
-                           break loop45;\r
-                        }\r
-                    } while (true);\r
-\r
-\r
-                    }\r
-                    break;\r
-\r
-            }\r
-\r
-            RCURLY144=(Token)match(input,RCURLY,FOLLOW_RCURLY_in_record3034); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_RCURLY.add(RCURLY144);\r
-\r
-\r
-\r
-            // AST REWRITE\r
-            // elements: recordAssignment\r
-            // token labels: \r
-            // rule labels: retval\r
-            // token list labels: \r
-            // rule list labels: \r
-            // wildcard labels: \r
-            if ( state.backtracking==0 ) {\r
-            retval.tree = root_0;\r
-            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-            root_0 = (CommonTree)adaptor.nil();\r
-            // 437:5: -> ^( RECORD ( recordAssignment )* )\r
-            {\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:437:8: ^( RECORD ( recordAssignment )* )\r
-                {\r
-                CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(RECORD, "RECORD"), root_1);\r
-\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:437:17: ( recordAssignment )*\r
-                while ( stream_recordAssignment.hasNext() ) {\r
-                    adaptor.addChild(root_1, stream_recordAssignment.nextTree());\r
-\r
-                }\r
-                stream_recordAssignment.reset();\r
-\r
-                adaptor.addChild(root_0, root_1);\r
-                }\r
-\r
-            }\r
-\r
-            retval.tree = root_0;}\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "record"\r
-\r
-    public static class recordAssignment_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "recordAssignment"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:440:1: recordAssignment : ID '=' value -> ^( ASSIGNMENT ID value ) ;\r
-    public final GraphParser.recordAssignment_return recordAssignment() throws RecognitionException {\r
-        GraphParser.recordAssignment_return retval = new GraphParser.recordAssignment_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token ID145=null;\r
-        Token char_literal146=null;\r
-        GraphParser.value_return value147 = null;\r
-\r
-\r
-        CommonTree ID145_tree=null;\r
-        CommonTree char_literal146_tree=null;\r
-        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");\r
-        RewriteRuleTokenStream stream_74=new RewriteRuleTokenStream(adaptor,"token 74");\r
-        RewriteRuleSubtreeStream stream_value=new RewriteRuleSubtreeStream(adaptor,"rule value");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:441:5: ( ID '=' value -> ^( ASSIGNMENT ID value ) )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:441:7: ID '=' value\r
-            {\r
-            ID145=(Token)match(input,ID,FOLLOW_ID_in_recordAssignment3066); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_ID.add(ID145);\r
-\r
-            char_literal146=(Token)match(input,74,FOLLOW_74_in_recordAssignment3068); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_74.add(char_literal146);\r
-\r
-            pushFollow(FOLLOW_value_in_recordAssignment3070);\r
-            value147=value();\r
-\r
-            state._fsp--;\r
-            if (state.failed) return retval;\r
-            if ( state.backtracking==0 ) stream_value.add(value147.getTree());\r
-\r
-\r
-            // AST REWRITE\r
-            // elements: ID, value\r
-            // token labels: \r
-            // rule labels: retval\r
-            // token list labels: \r
-            // rule list labels: \r
-            // wildcard labels: \r
-            if ( state.backtracking==0 ) {\r
-            retval.tree = root_0;\r
-            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-            root_0 = (CommonTree)adaptor.nil();\r
-            // 442:5: -> ^( ASSIGNMENT ID value )\r
-            {\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:442:8: ^( ASSIGNMENT ID value )\r
-                {\r
-                CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(ASSIGNMENT, "ASSIGNMENT"), root_1);\r
-\r
-                adaptor.addChild(root_1, stream_ID.nextNode());\r
-                adaptor.addChild(root_1, stream_value.nextTree());\r
-\r
-                adaptor.addChild(root_0, root_1);\r
-                }\r
-\r
-            }\r
-\r
-            retval.tree = root_0;}\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "recordAssignment"\r
-\r
-    public static class map_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "map"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:445:1: map : {...}? => ID LCURLY ( mapAssignment ( ',' mapAssignment )* )? RCURLY -> ^( MAP ( mapAssignment )* ) ;\r
-    public final GraphParser.map_return map() throws RecognitionException {\r
-        GraphParser.map_return retval = new GraphParser.map_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token ID148=null;\r
-        Token LCURLY149=null;\r
-        Token char_literal151=null;\r
-        Token RCURLY153=null;\r
-        GraphParser.mapAssignment_return mapAssignment150 = null;\r
-\r
-        GraphParser.mapAssignment_return mapAssignment152 = null;\r
-\r
-\r
-        CommonTree ID148_tree=null;\r
-        CommonTree LCURLY149_tree=null;\r
-        CommonTree char_literal151_tree=null;\r
-        CommonTree RCURLY153_tree=null;\r
-        RewriteRuleTokenStream stream_78=new RewriteRuleTokenStream(adaptor,"token 78");\r
-        RewriteRuleTokenStream stream_LCURLY=new RewriteRuleTokenStream(adaptor,"token LCURLY");\r
-        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");\r
-        RewriteRuleTokenStream stream_RCURLY=new RewriteRuleTokenStream(adaptor,"token RCURLY");\r
-        RewriteRuleSubtreeStream stream_mapAssignment=new RewriteRuleSubtreeStream(adaptor,"rule mapAssignment");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:445:5: ({...}? => ID LCURLY ( mapAssignment ( ',' mapAssignment )* )? RCURLY -> ^( MAP ( mapAssignment )* ) )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:445:7: {...}? => ID LCURLY ( mapAssignment ( ',' mapAssignment )* )? RCURLY\r
-            {\r
-            if ( !((input.LT(1).getText().equals("map"))) ) {\r
-                if (state.backtracking>0) {state.failed=true; return retval;}\r
-                throw new FailedPredicateException(input, "map", "input.LT(1).getText().equals(\"map\")");\r
-            }\r
-            ID148=(Token)match(input,ID,FOLLOW_ID_in_map3100); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_ID.add(ID148);\r
-\r
-            LCURLY149=(Token)match(input,LCURLY,FOLLOW_LCURLY_in_map3102); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_LCURLY.add(LCURLY149);\r
-\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:445:58: ( mapAssignment ( ',' mapAssignment )* )?\r
-            int alt48=2;\r
-            int LA48_0 = input.LA(1);\r
-\r
-            if ( (LA48_0==ID||LA48_0==LPAREN||LA48_0==LBRACKET||LA48_0==LCURLY||LA48_0==INT||LA48_0==FLOAT||LA48_0==STRING||(LA48_0>=79 && LA48_0<=80)) ) {\r
-                alt48=1;\r
-            }\r
-            switch (alt48) {\r
-                case 1 :\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:445:59: mapAssignment ( ',' mapAssignment )*\r
-                    {\r
-                    pushFollow(FOLLOW_mapAssignment_in_map3105);\r
-                    mapAssignment150=mapAssignment();\r
-\r
-                    state._fsp--;\r
-                    if (state.failed) return retval;\r
-                    if ( state.backtracking==0 ) stream_mapAssignment.add(mapAssignment150.getTree());\r
-                    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:445:73: ( ',' mapAssignment )*\r
-                    loop47:\r
-                    do {\r
-                        int alt47=2;\r
-                        int LA47_0 = input.LA(1);\r
-\r
-                        if ( (LA47_0==78) ) {\r
-                            alt47=1;\r
-                        }\r
-\r
-\r
-                        switch (alt47) {\r
-                       case 1 :\r
-                           // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:445:74: ',' mapAssignment\r
-                           {\r
-                           char_literal151=(Token)match(input,78,FOLLOW_78_in_map3108); if (state.failed) return retval; \r
-                           if ( state.backtracking==0 ) stream_78.add(char_literal151);\r
-\r
-                           pushFollow(FOLLOW_mapAssignment_in_map3110);\r
-                           mapAssignment152=mapAssignment();\r
-\r
-                           state._fsp--;\r
-                           if (state.failed) return retval;\r
-                           if ( state.backtracking==0 ) stream_mapAssignment.add(mapAssignment152.getTree());\r
-\r
-                           }\r
-                           break;\r
-\r
-                       default :\r
-                           break loop47;\r
-                        }\r
-                    } while (true);\r
-\r
-\r
-                    }\r
-                    break;\r
-\r
-            }\r
-\r
-            RCURLY153=(Token)match(input,RCURLY,FOLLOW_RCURLY_in_map3116); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_RCURLY.add(RCURLY153);\r
-\r
-\r
-\r
-            // AST REWRITE\r
-            // elements: mapAssignment\r
-            // token labels: \r
-            // rule labels: retval\r
-            // token list labels: \r
-            // rule list labels: \r
-            // wildcard labels: \r
-            if ( state.backtracking==0 ) {\r
-            retval.tree = root_0;\r
-            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-            root_0 = (CommonTree)adaptor.nil();\r
-            // 446:5: -> ^( MAP ( mapAssignment )* )\r
-            {\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:446:8: ^( MAP ( mapAssignment )* )\r
-                {\r
-                CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(MAP, "MAP"), root_1);\r
-\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:446:14: ( mapAssignment )*\r
-                while ( stream_mapAssignment.hasNext() ) {\r
-                    adaptor.addChild(root_1, stream_mapAssignment.nextTree());\r
-\r
-                }\r
-                stream_mapAssignment.reset();\r
-\r
-                adaptor.addChild(root_0, root_1);\r
-                }\r
-\r
-            }\r
-\r
-            retval.tree = root_0;}\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "map"\r
-\r
-    public static class mapAssignment_return extends ParserRuleReturnScope {\r
-        CommonTree tree;\r
-        public Object getTree() { return tree; }\r
-    };\r
-\r
-    // $ANTLR start "mapAssignment"\r
-    // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:449:1: mapAssignment : value '=' value -> ^( ASSIGNMENT ( value )* ) ;\r
-    public final GraphParser.mapAssignment_return mapAssignment() throws RecognitionException {\r
-        GraphParser.mapAssignment_return retval = new GraphParser.mapAssignment_return();\r
-        retval.start = input.LT(1);\r
-\r
-        CommonTree root_0 = null;\r
-\r
-        Token char_literal155=null;\r
-        GraphParser.value_return value154 = null;\r
-\r
-        GraphParser.value_return value156 = null;\r
-\r
-\r
-        CommonTree char_literal155_tree=null;\r
-        RewriteRuleTokenStream stream_74=new RewriteRuleTokenStream(adaptor,"token 74");\r
-        RewriteRuleSubtreeStream stream_value=new RewriteRuleSubtreeStream(adaptor,"rule value");\r
-        try {\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:450:5: ( value '=' value -> ^( ASSIGNMENT ( value )* ) )\r
-            // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:450:7: value '=' value\r
-            {\r
-            pushFollow(FOLLOW_value_in_mapAssignment3148);\r
-            value154=value();\r
-\r
-            state._fsp--;\r
-            if (state.failed) return retval;\r
-            if ( state.backtracking==0 ) stream_value.add(value154.getTree());\r
-            char_literal155=(Token)match(input,74,FOLLOW_74_in_mapAssignment3150); if (state.failed) return retval; \r
-            if ( state.backtracking==0 ) stream_74.add(char_literal155);\r
-\r
-            pushFollow(FOLLOW_value_in_mapAssignment3152);\r
-            value156=value();\r
-\r
-            state._fsp--;\r
-            if (state.failed) return retval;\r
-            if ( state.backtracking==0 ) stream_value.add(value156.getTree());\r
-\r
-\r
-            // AST REWRITE\r
-            // elements: value\r
-            // token labels: \r
-            // rule labels: retval\r
-            // token list labels: \r
-            // rule list labels: \r
-            // wildcard labels: \r
-            if ( state.backtracking==0 ) {\r
-            retval.tree = root_0;\r
-            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);\r
-\r
-            root_0 = (CommonTree)adaptor.nil();\r
-            // 451:5: -> ^( ASSIGNMENT ( value )* )\r
-            {\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:451:8: ^( ASSIGNMENT ( value )* )\r
-                {\r
-                CommonTree root_1 = (CommonTree)adaptor.nil();\r
-                root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(ASSIGNMENT, "ASSIGNMENT"), root_1);\r
-\r
-                // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:451:21: ( value )*\r
-                while ( stream_value.hasNext() ) {\r
-                    adaptor.addChild(root_1, stream_value.nextTree());\r
-\r
-                }\r
-                stream_value.reset();\r
-\r
-                adaptor.addChild(root_0, root_1);\r
-                }\r
-\r
-            }\r
-\r
-            retval.tree = root_0;}\r
-            }\r
-\r
-            retval.stop = input.LT(-1);\r
-\r
-            if ( state.backtracking==0 ) {\r
-\r
-            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r
-            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r
-            }\r
-        }\r
-        catch (RecognitionException re) {\r
-            reportError(re);\r
-            recover(input,re);\r
-       retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r
-\r
-        }\r
-        finally {\r
-        }\r
-        return retval;\r
-    }\r
-    // $ANTLR end "mapAssignment"\r
-\r
-    // $ANTLR start synpred1_Graph\r
-    public final void synpred1_Graph_fragment() throws RecognitionException {   \r
-        // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:317:22: ( arrayType )\r
-        // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:317:23: arrayType\r
-        {\r
-        pushFollow(FOLLOW_arrayType_in_synpred1_Graph2075);\r
-        arrayType();\r
-\r
-        state._fsp--;\r
-        if (state.failed) return ;\r
-\r
-        }\r
-    }\r
-    // $ANTLR end synpred1_Graph\r
-\r
-    // $ANTLR start synpred2_Graph\r
-    public final void synpred2_Graph_fragment() throws RecognitionException {   \r
-        // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:350:11: ( LPAREN )\r
-        // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:350:12: LPAREN\r
-        {\r
-        match(input,LPAREN,FOLLOW_LPAREN_in_synpred2_Graph2354); if (state.failed) return ;\r
-\r
-        }\r
-    }\r
-    // $ANTLR end synpred2_Graph\r
-\r
-    // Delegated rules\r
-\r
-    public final boolean synpred1_Graph() {\r
-        state.backtracking++;\r
-        int start = input.mark();\r
-        try {\r
-            synpred1_Graph_fragment(); // can never throw exception\r
-        } catch (RecognitionException re) {\r
-            System.err.println("impossible: "+re);\r
-        }\r
-        boolean success = !state.failed;\r
-        input.rewind(start);\r
-        state.backtracking--;\r
-        state.failed=false;\r
-        return success;\r
-    }\r
-    public final boolean synpred2_Graph() {\r
-        state.backtracking++;\r
-        int start = input.mark();\r
-        try {\r
-            synpred2_Graph_fragment(); // can never throw exception\r
-        } catch (RecognitionException re) {\r
-            System.err.println("impossible: "+re);\r
-        }\r
-        boolean success = !state.failed;\r
-        input.rewind(start);\r
-        state.backtracking--;\r
-        state.failed=false;\r
-        return success;\r
-    }\r
-\r
-\r
-    protected DFA13 dfa13 = new DFA13(this);\r
-    protected DFA22 dfa22 = new DFA22(this);\r
-    protected DFA31 dfa31 = new DFA31(this);\r
-    static final String DFA13_eotS =\r
-        "\15\uffff";\r
-    static final String DFA13_eofS =\r
-        "\15\uffff";\r
-    static final String DFA13_minS =\r
-        "\1\55\1\0\13\uffff";\r
-    static final String DFA13_maxS =\r
-        "\1\120\1\0\13\uffff";\r
-    static final String DFA13_acceptS =\r
-        "\2\uffff\1\2\11\uffff\1\1";\r
-    static final String DFA13_specialS =\r
-        "\1\uffff\1\0\13\uffff}>";\r
-    static final String[] DFA13_transitionS = {\r
-            "\1\1\2\uffff\1\2\1\uffff\1\2\1\uffff\1\2\1\uffff\1\2\1\uffff"+\r
-            "\1\2\4\uffff\2\2\14\uffff\2\2\2\uffff\2\2",\r
-            "\1\uffff",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            ""\r
-    };\r
-\r
-    static final short[] DFA13_eot = DFA.unpackEncodedString(DFA13_eotS);\r
-    static final short[] DFA13_eof = DFA.unpackEncodedString(DFA13_eofS);\r
-    static final char[] DFA13_min = DFA.unpackEncodedStringToUnsignedChars(DFA13_minS);\r
-    static final char[] DFA13_max = DFA.unpackEncodedStringToUnsignedChars(DFA13_maxS);\r
-    static final short[] DFA13_accept = DFA.unpackEncodedString(DFA13_acceptS);\r
-    static final short[] DFA13_special = DFA.unpackEncodedString(DFA13_specialS);\r
-    static final short[][] DFA13_transition;\r
-\r
-    static {\r
-        int numStates = DFA13_transitionS.length;\r
-        DFA13_transition = new short[numStates][];\r
-        for (int i=0; i<numStates; i++) {\r
-            DFA13_transition[i] = DFA.unpackEncodedString(DFA13_transitionS[i]);\r
-        }\r
-    }\r
-\r
-    class DFA13 extends DFA {\r
-\r
-        public DFA13(BaseRecognizer recognizer) {\r
-            this.recognizer = recognizer;\r
-            this.decisionNumber = 13;\r
-            this.eot = DFA13_eot;\r
-            this.eof = DFA13_eof;\r
-            this.min = DFA13_min;\r
-            this.max = DFA13_max;\r
-            this.accept = DFA13_accept;\r
-            this.special = DFA13_special;\r
-            this.transition = DFA13_transition;\r
-        }\r
-        public String getDescription() {\r
-            return "253:5: ({...}? => ID ( resource )+ INDENT resourceDefinitions DEDENT -> ^( TEMPLATE_DEFINITION ( resource )+ resourceDefinitions ) | ( resource )+ ( INDENT resourceDefinitions DEDENT )? -> ^( TEMPLATE_INSTANCE ( resource )+ ( resourceDefinitions )? ) )";\r
-        }\r
-        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {\r
-            TokenStream input = (TokenStream)_input;\r
-               int _s = s;\r
-            switch ( s ) {\r
-                    case 0 : \r
-                        int LA13_1 = input.LA(1);\r
-\r
-                         \r
-                        int index13_1 = input.index();\r
-                        input.rewind();\r
-                        s = -1;\r
-                        if ( ((input.LT(1).getText().equals("template"))) ) {s = 12;}\r
-\r
-                        else if ( (true) ) {s = 2;}\r
-\r
-                         \r
-                        input.seek(index13_1);\r
-                        if ( s>=0 ) return s;\r
-                        break;\r
-            }\r
-            if (state.backtracking>0) {state.failed=true; return -1;}\r
-            NoViableAltException nvae =\r
-                new NoViableAltException(getDescription(), 13, _s, input);\r
-            error(nvae);\r
-            throw nvae;\r
-        }\r
-    }\r
-    static final String DFA22_eotS =\r
-        "\14\uffff";\r
-    static final String DFA22_eofS =\r
-        "\1\4\13\uffff";\r
-    static final String DFA22_minS =\r
-        "\1\55\2\uffff\1\0\10\uffff";\r
-    static final String DFA22_maxS =\r
-        "\1\116\2\uffff\1\0\10\uffff";\r
-    static final String DFA22_acceptS =\r
-        "\1\uffff\2\1\1\uffff\1\2\7\uffff";\r
-    static final String DFA22_specialS =\r
-        "\1\0\2\uffff\1\1\10\uffff}>";\r
-    static final String[] DFA22_transitionS = {\r
-            "\1\3\2\uffff\1\1\1\4\1\uffff\1\4\1\2\1\4\23\uffff\2\4\2\uffff"+\r
-            "\2\4",\r
-            "",\r
-            "",\r
-            "\1\uffff",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            ""\r
-    };\r
-\r
-    static final short[] DFA22_eot = DFA.unpackEncodedString(DFA22_eotS);\r
-    static final short[] DFA22_eof = DFA.unpackEncodedString(DFA22_eofS);\r
-    static final char[] DFA22_min = DFA.unpackEncodedStringToUnsignedChars(DFA22_minS);\r
-    static final char[] DFA22_max = DFA.unpackEncodedStringToUnsignedChars(DFA22_maxS);\r
-    static final short[] DFA22_accept = DFA.unpackEncodedString(DFA22_acceptS);\r
-    static final short[] DFA22_special = DFA.unpackEncodedString(DFA22_specialS);\r
-    static final short[][] DFA22_transition;\r
-\r
-    static {\r
-        int numStates = DFA22_transitionS.length;\r
-        DFA22_transition = new short[numStates][];\r
-        for (int i=0; i<numStates; i++) {\r
-            DFA22_transition[i] = DFA.unpackEncodedString(DFA22_transitionS[i]);\r
-        }\r
-    }\r
-\r
-    class DFA22 extends DFA {\r
-\r
-        public DFA22(BaseRecognizer recognizer) {\r
-            this.recognizer = recognizer;\r
-            this.decisionNumber = 22;\r
-            this.eot = DFA22_eot;\r
-            this.eof = DFA22_eof;\r
-            this.min = DFA22_min;\r
-            this.max = DFA22_max;\r
-            this.accept = DFA22_accept;\r
-            this.special = DFA22_special;\r
-            this.transition = DFA22_transition;\r
-        }\r
-        public String getDescription() {\r
-            return "317:21: ( ( arrayType )=> arrayType )?";\r
-        }\r
-        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {\r
-            TokenStream input = (TokenStream)_input;\r
-               int _s = s;\r
-            switch ( s ) {\r
-                    case 0 : \r
-                        int LA22_0 = input.LA(1);\r
-\r
-                         \r
-                        int index22_0 = input.index();\r
-                        input.rewind();\r
-                        s = -1;\r
-                        if ( (LA22_0==LPAREN) && (synpred1_Graph())) {s = 1;}\r
-\r
-                        else if ( (LA22_0==LCURLY) && (synpred1_Graph())) {s = 2;}\r
-\r
-                        else if ( (LA22_0==ID) ) {s = 3;}\r
-\r
-                        else if ( (LA22_0==EOF||LA22_0==RPAREN||LA22_0==RBRACKET||LA22_0==RCURLY||(LA22_0>=73 && LA22_0<=74)||(LA22_0>=77 && LA22_0<=78)) ) {s = 4;}\r
-\r
-                         \r
-                        input.seek(index22_0);\r
-                        if ( s>=0 ) return s;\r
-                        break;\r
-                    case 1 : \r
-                        int LA22_3 = input.LA(1);\r
-\r
-                         \r
-                        int index22_3 = input.index();\r
-                        input.rewind();\r
-                        s = -1;\r
-                        if ( (synpred1_Graph()) ) {s = 2;}\r
-\r
-                        else if ( (true) ) {s = 4;}\r
-\r
-                         \r
-                        input.seek(index22_3);\r
-                        if ( s>=0 ) return s;\r
-                        break;\r
-            }\r
-            if (state.backtracking>0) {state.failed=true; return -1;}\r
-            NoViableAltException nvae =\r
-                new NoViableAltException(getDescription(), 22, _s, input);\r
-            error(nvae);\r
-            throw nvae;\r
-        }\r
-    }\r
-    static final String DFA31_eotS =\r
-        "\36\uffff";\r
-    static final String DFA31_eofS =\r
-        "\1\2\35\uffff";\r
-    static final String DFA31_minS =\r
-        "\1\4\1\0\34\uffff";\r
-    static final String DFA31_maxS =\r
-        "\1\120\1\0\34\uffff";\r
-    static final String DFA31_acceptS =\r
-        "\2\uffff\1\2\32\uffff\1\1";\r
-    static final String DFA31_specialS =\r
-        "\1\uffff\1\0\34\uffff}>";\r
-    static final String[] DFA31_transitionS = {\r
-            "\2\2\47\uffff\1\2\2\uffff\1\1\6\2\1\uffff\1\2\1\uffff\1\2\2"+\r
-            "\uffff\2\2\4\uffff\16\2",\r
-            "\1\uffff",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            "",\r
-            ""\r
-    };\r
-\r
-    static final short[] DFA31_eot = DFA.unpackEncodedString(DFA31_eotS);\r
-    static final short[] DFA31_eof = DFA.unpackEncodedString(DFA31_eofS);\r
-    static final char[] DFA31_min = DFA.unpackEncodedStringToUnsignedChars(DFA31_minS);\r
-    static final char[] DFA31_max = DFA.unpackEncodedStringToUnsignedChars(DFA31_maxS);\r
-    static final short[] DFA31_accept = DFA.unpackEncodedString(DFA31_acceptS);\r
-    static final short[] DFA31_special = DFA.unpackEncodedString(DFA31_specialS);\r
-    static final short[][] DFA31_transition;\r
-\r
-    static {\r
-        int numStates = DFA31_transitionS.length;\r
-        DFA31_transition = new short[numStates][];\r
-        for (int i=0; i<numStates; i++) {\r
-            DFA31_transition[i] = DFA.unpackEncodedString(DFA31_transitionS[i]);\r
-        }\r
-    }\r
-\r
-    class DFA31 extends DFA {\r
-\r
-        public DFA31(BaseRecognizer recognizer) {\r
-            this.recognizer = recognizer;\r
-            this.decisionNumber = 31;\r
-            this.eot = DFA31_eot;\r
-            this.eof = DFA31_eof;\r
-            this.min = DFA31_min;\r
-            this.max = DFA31_max;\r
-            this.accept = DFA31_accept;\r
-            this.special = DFA31_special;\r
-            this.transition = DFA31_transition;\r
-        }\r
-        public String getDescription() {\r
-            return "350:10: ( ( LPAREN )=> LPAREN parameter ( ',' parameter )* RPAREN )?";\r
-        }\r
-        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {\r
-            TokenStream input = (TokenStream)_input;\r
-               int _s = s;\r
-            switch ( s ) {\r
-                    case 0 : \r
-                        int LA31_1 = input.LA(1);\r
-\r
-                         \r
-                        int index31_1 = input.index();\r
-                        input.rewind();\r
-                        s = -1;\r
-                        if ( (synpred2_Graph()) ) {s = 29;}\r
-\r
-                        else if ( (true) ) {s = 2;}\r
-\r
-                         \r
-                        input.seek(index31_1);\r
-                        if ( s>=0 ) return s;\r
-                        break;\r
-            }\r
-            if (state.backtracking>0) {state.failed=true; return -1;}\r
-            NoViableAltException nvae =\r
-                new NoViableAltException(getDescription(), 31, _s, input);\r
-            error(nvae);\r
-            throw nvae;\r
-        }\r
-    }\r
\r
-\r
-    public static final BitSet FOLLOW_NEWLINE_in_file1230 = new BitSet(new long[]{0x6155200000000000L,0x0000000000019802L});\r
-    public static final BitSet FOLLOW_resourceDefinitions_in_file1233 = new BitSet(new long[]{0x0000000000000000L});\r
-    public static final BitSet FOLLOW_EOF_in_file1236 = new BitSet(new long[]{0x0000000000000002L});\r
-    public static final BitSet FOLLOW_resourceDefinition_in_resourceDefinitions1260 = new BitSet(new long[]{0x0400000000000002L});\r
-    public static final BitSet FOLLOW_NEWLINE_in_resourceDefinitions1263 = new BitSet(new long[]{0x6155200000000000L,0x0000000000019802L});\r
-    public static final BitSet FOLLOW_resourceDefinition_in_resourceDefinitions1266 = new BitSet(new long[]{0x0400000000000002L});\r
-    public static final BitSet FOLLOW_resource_in_resourceDefinition1300 = new BitSet(new long[]{0x4000200000000012L,0x0000000000000FF8L});\r
-    public static final BitSet FOLLOW_localProperty_in_resourceDefinition1308 = new BitSet(new long[]{0x4000200000000012L,0x0000000000000FF8L});\r
-    public static final BitSet FOLLOW_INDENT_in_resourceDefinition1318 = new BitSet(new long[]{0x6155200000000000L,0x0000000000019FFAL});\r
-    public static final BitSet FOLLOW_property_in_resourceDefinition1320 = new BitSet(new long[]{0x0400000000000020L});\r
-    public static final BitSet FOLLOW_NEWLINE_in_resourceDefinition1323 = new BitSet(new long[]{0x6155200000000000L,0x0000000000019FFAL});\r
-    public static final BitSet FOLLOW_property_in_resourceDefinition1325 = new BitSet(new long[]{0x0400000000000020L});\r
-    public static final BitSet FOLLOW_DEDENT_in_resourceDefinition1329 = new BitSet(new long[]{0x0000000000000002L});\r
-    public static final BitSet FOLLOW_template_in_resourceDefinition1358 = new BitSet(new long[]{0x0000000000000002L});\r
-    public static final BitSet FOLLOW_relation_in_localProperty1393 = new BitSet(new long[]{0x6155200000000000L,0x0000000000019800L});\r
-    public static final BitSet FOLLOW_resource_in_localProperty1395 = new BitSet(new long[]{0x0000000000000002L});\r
-    public static final BitSet FOLLOW_relation_in_property1434 = new BitSet(new long[]{0x6155200000000010L,0x0000000000019802L});\r
-    public static final BitSet FOLLOW_resourceDefinition_in_property1444 = new BitSet(new long[]{0x0000000000000002L});\r
-    public static final BitSet FOLLOW_INDENT_in_property1464 = new BitSet(new long[]{0x6155200000000000L,0x0000000000019802L});\r
-    public static final BitSet FOLLOW_resourceDefinitions_in_property1466 = new BitSet(new long[]{0x0000000000000020L});\r
-    public static final BitSet FOLLOW_DEDENT_in_property1468 = new BitSet(new long[]{0x0000000000000002L});\r
-    public static final BitSet FOLLOW_template_in_property1494 = new BitSet(new long[]{0x0000000000000002L});\r
-    public static final BitSet FOLLOW_65_in_template1515 = new BitSet(new long[]{0x6155200000000000L,0x0000000000019800L});\r
-    public static final BitSet FOLLOW_ID_in_template1533 = new BitSet(new long[]{0x6155200000000000L,0x0000000000019800L});\r
-    public static final BitSet FOLLOW_resource_in_template1535 = new BitSet(new long[]{0x6155200000000010L,0x0000000000019800L});\r
-    public static final BitSet FOLLOW_INDENT_in_template1545 = new BitSet(new long[]{0x6155200000000000L,0x0000000000019802L});\r
-    public static final BitSet FOLLOW_resourceDefinitions_in_template1547 = new BitSet(new long[]{0x0000000000000020L});\r
-    public static final BitSet FOLLOW_DEDENT_in_template1549 = new BitSet(new long[]{0x0000000000000002L});\r
-    public static final BitSet FOLLOW_resource_in_template1574 = new BitSet(new long[]{0x6155200000000012L,0x0000000000019800L});\r
-    public static final BitSet FOLLOW_INDENT_in_template1585 = new BitSet(new long[]{0x6155200000000000L,0x0000000000019802L});\r
-    public static final BitSet FOLLOW_resourceDefinitions_in_template1587 = new BitSet(new long[]{0x0000000000000020L});\r
-    public static final BitSet FOLLOW_DEDENT_in_template1589 = new BitSet(new long[]{0x0000000000000002L});\r
-    public static final BitSet FOLLOW_ID_in_relation1643 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000004L});\r
-    public static final BitSet FOLLOW_66_in_relation1658 = new BitSet(new long[]{0x0000200000000000L});\r
-    public static final BitSet FOLLOW_ID_in_relation1660 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000004L});\r
-