1 // $ANTLR 3.3 Nov 30, 2010 12:50:56 src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g 2011-12-19 14:53:14
2 package org.simantics.graph.compiler.internal.parsing;
4 import org.antlr.runtime.*;
5 import java.util.Stack;
7 import java.util.ArrayList;
9 import java.util.HashMap;
11 import org.antlr.runtime.tree.*;
13 @SuppressWarnings("unused")
14 public class GraphParser extends Parser {
15 public static final String[] tokenNames = new String[] {
16 "<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'"
18 public static final int EOF=-1;
19 public static final int T__65=65;
20 public static final int T__66=66;
21 public static final int T__67=67;
22 public static final int T__68=68;
23 public static final int T__69=69;
24 public static final int T__70=70;
25 public static final int T__71=71;
26 public static final int T__72=72;
27 public static final int T__73=73;
28 public static final int T__74=74;
29 public static final int T__75=75;
30 public static final int T__76=76;
31 public static final int T__77=77;
32 public static final int T__78=78;
33 public static final int T__79=79;
34 public static final int T__80=80;
35 public static final int INDENT=4;
36 public static final int DEDENT=5;
37 public static final int FILE=6;
38 public static final int RESOURCE=7;
39 public static final int PROPERTY=8;
40 public static final int VARIABLE=9;
41 public static final int EMBEDDED_VALUE=10;
42 public static final int EMBEDDED_TYPE=11;
43 public static final int TEMPLATE_INSTANCE=12;
44 public static final int TEMPLATE_DEFINITION=13;
45 public static final int BLANK=14;
46 public static final int REF=15;
47 public static final int EQUALS=16;
48 public static final int INSTANCE_OF=17;
49 public static final int INHERITS=18;
50 public static final int SUBRELATION_OF=19;
51 public static final int HAS_DOMAIN=20;
52 public static final int HAS_RANGE=21;
53 public static final int DOMAIN_OF=22;
54 public static final int REQUIRES_VALUE_TYPE=23;
55 public static final int TYPE_DEFINITIONS=24;
56 public static final int TYPE_DEFINITION=25;
57 public static final int UNION_TYPE=26;
58 public static final int RECORD_TYPE=27;
59 public static final int TUPLE_TYPE=28;
60 public static final int ARRAY_TYPE=29;
61 public static final int TYPE_REFERENCE=30;
62 public static final int TYPE_ANNOTATION=31;
63 public static final int TYPE_COMPONENT=32;
64 public static final int VALUE_DEFINITIONS=33;
65 public static final int VALUE_DEFINITION=34;
66 public static final int NO_VALUE=35;
67 public static final int VARIANT=36;
68 public static final int ARRAY=37;
69 public static final int TUPLE=38;
70 public static final int TAGGED_VALUE=39;
71 public static final int RECORD=40;
72 public static final int MAP=41;
73 public static final int ASSIGNMENT=42;
74 public static final int TRUE=43;
75 public static final int FALSE=44;
76 public static final int ID=45;
77 public static final int COMMENT=46;
78 public static final int WS=47;
79 public static final int LPAREN=48;
80 public static final int RPAREN=49;
81 public static final int LBRACKET=50;
82 public static final int RBRACKET=51;
83 public static final int LCURLY=52;
84 public static final int RCURLY=53;
85 public static final int INT=54;
86 public static final int INT_RANGE=55;
87 public static final int FLOAT=56;
88 public static final int RANGE=57;
89 public static final int NEWLINE=58;
90 public static final int EXPONENT=59;
91 public static final int ESC_SEQ=60;
92 public static final int STRING=61;
93 public static final int URI=62;
94 public static final int HEX_DIGIT=63;
95 public static final int UNICODE_ESC=64;
101 public GraphParser(TokenStream input) {
102 this(input, new RecognizerSharedState());
104 public GraphParser(TokenStream input, RecognizerSharedState state) {
109 protected TreeAdaptor adaptor = new CommonTreeAdaptor();
111 public void setTreeAdaptor(TreeAdaptor adaptor) {
112 this.adaptor = adaptor;
114 public TreeAdaptor getTreeAdaptor() {
118 public String[] getTokenNames() { return GraphParser.tokenNames; }
119 public String getGrammarFileName() { return "src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g"; }
122 public static class file_return extends ParserRuleReturnScope {
124 public Object getTree() { return tree; }
127 // $ANTLR start "file"
128 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:224:1: file : ( NEWLINE )? ( resourceDefinitions )? EOF -> ^( FILE ( resourceDefinitions )? ) ;
129 public final GraphParser.file_return file() throws RecognitionException {
130 GraphParser.file_return retval = new GraphParser.file_return();
131 retval.start = input.LT(1);
133 CommonTree root_0 = null;
137 GraphParser.resourceDefinitions_return resourceDefinitions2 = null;
140 CommonTree NEWLINE1_tree=null;
141 CommonTree EOF3_tree=null;
142 RewriteRuleTokenStream stream_NEWLINE=new RewriteRuleTokenStream(adaptor,"token NEWLINE");
143 RewriteRuleTokenStream stream_EOF=new RewriteRuleTokenStream(adaptor,"token EOF");
144 RewriteRuleSubtreeStream stream_resourceDefinitions=new RewriteRuleSubtreeStream(adaptor,"rule resourceDefinitions");
146 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:224:6: ( ( NEWLINE )? ( resourceDefinitions )? EOF -> ^( FILE ( resourceDefinitions )? ) )
147 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:224:8: ( NEWLINE )? ( resourceDefinitions )? EOF
149 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:224:8: ( NEWLINE )?
151 int LA1_0 = input.LA(1);
153 if ( (LA1_0==NEWLINE) ) {
158 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:224:8: NEWLINE
160 NEWLINE1=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_file1230); if (state.failed) return retval;
161 if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE1);
169 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:224:17: ( resourceDefinitions )?
171 int LA2_0 = input.LA(1);
173 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)) ) {
178 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:224:17: resourceDefinitions
180 pushFollow(FOLLOW_resourceDefinitions_in_file1233);
181 resourceDefinitions2=resourceDefinitions();
184 if (state.failed) return retval;
185 if ( state.backtracking==0 ) stream_resourceDefinitions.add(resourceDefinitions2.getTree());
192 EOF3=(Token)match(input,EOF,FOLLOW_EOF_in_file1236); if (state.failed) return retval;
193 if ( state.backtracking==0 ) stream_EOF.add(EOF3);
198 // elements: resourceDefinitions
200 // rule labels: retval
201 // token list labels:
204 if ( state.backtracking==0 ) {
205 retval.tree = root_0;
206 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
208 root_0 = (CommonTree)adaptor.nil();
209 // 224:42: -> ^( FILE ( resourceDefinitions )? )
211 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:224:45: ^( FILE ( resourceDefinitions )? )
213 CommonTree root_1 = (CommonTree)adaptor.nil();
214 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(FILE, "FILE"), root_1);
216 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:224:52: ( resourceDefinitions )?
217 if ( stream_resourceDefinitions.hasNext() ) {
218 adaptor.addChild(root_1, stream_resourceDefinitions.nextTree());
221 stream_resourceDefinitions.reset();
223 adaptor.addChild(root_0, root_1);
228 retval.tree = root_0;}
231 retval.stop = input.LT(-1);
233 if ( state.backtracking==0 ) {
235 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
236 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
239 catch (RecognitionException re) {
242 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
251 public static class resourceDefinitions_return extends ParserRuleReturnScope {
253 public Object getTree() { return tree; }
256 // $ANTLR start "resourceDefinitions"
257 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:226:1: resourceDefinitions : resourceDefinition ( NEWLINE resourceDefinition )* ;
258 public final GraphParser.resourceDefinitions_return resourceDefinitions() throws RecognitionException {
259 GraphParser.resourceDefinitions_return retval = new GraphParser.resourceDefinitions_return();
260 retval.start = input.LT(1);
262 CommonTree root_0 = null;
265 GraphParser.resourceDefinition_return resourceDefinition4 = null;
267 GraphParser.resourceDefinition_return resourceDefinition6 = null;
270 CommonTree NEWLINE5_tree=null;
273 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:227:6: ( resourceDefinition ( NEWLINE resourceDefinition )* )
274 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:227:8: resourceDefinition ( NEWLINE resourceDefinition )*
276 root_0 = (CommonTree)adaptor.nil();
278 pushFollow(FOLLOW_resourceDefinition_in_resourceDefinitions1260);
279 resourceDefinition4=resourceDefinition();
282 if (state.failed) return retval;
283 if ( state.backtracking==0 ) adaptor.addChild(root_0, resourceDefinition4.getTree());
284 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:227:27: ( NEWLINE resourceDefinition )*
288 int LA3_0 = input.LA(1);
290 if ( (LA3_0==NEWLINE) ) {
297 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:227:28: NEWLINE resourceDefinition
299 NEWLINE5=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_resourceDefinitions1263); if (state.failed) return retval;
300 pushFollow(FOLLOW_resourceDefinition_in_resourceDefinitions1266);
301 resourceDefinition6=resourceDefinition();
304 if (state.failed) return retval;
305 if ( state.backtracking==0 ) adaptor.addChild(root_0, resourceDefinition6.getTree());
318 retval.stop = input.LT(-1);
320 if ( state.backtracking==0 ) {
322 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
323 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
326 catch (RecognitionException re) {
329 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
336 // $ANTLR end "resourceDefinitions"
338 public static class resourceDefinition_return extends ParserRuleReturnScope {
340 public Object getTree() { return tree; }
343 // $ANTLR start "resourceDefinition"
344 // 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 ) );
345 public final GraphParser.resourceDefinition_return resourceDefinition() throws RecognitionException {
346 GraphParser.resourceDefinition_return retval = new GraphParser.resourceDefinition_return();
347 retval.start = input.LT(1);
349 CommonTree root_0 = null;
352 Token NEWLINE11=null;
354 GraphParser.resource_return resource7 = null;
356 GraphParser.localProperty_return localProperty8 = null;
358 GraphParser.property_return property10 = null;
360 GraphParser.property_return property12 = null;
362 GraphParser.template_return template14 = null;
365 CommonTree INDENT9_tree=null;
366 CommonTree NEWLINE11_tree=null;
367 CommonTree DEDENT13_tree=null;
368 RewriteRuleTokenStream stream_DEDENT=new RewriteRuleTokenStream(adaptor,"token DEDENT");
369 RewriteRuleTokenStream stream_NEWLINE=new RewriteRuleTokenStream(adaptor,"token NEWLINE");
370 RewriteRuleTokenStream stream_INDENT=new RewriteRuleTokenStream(adaptor,"token INDENT");
371 RewriteRuleSubtreeStream stream_template=new RewriteRuleSubtreeStream(adaptor,"rule template");
372 RewriteRuleSubtreeStream stream_resource=new RewriteRuleSubtreeStream(adaptor,"rule resource");
373 RewriteRuleSubtreeStream stream_property=new RewriteRuleSubtreeStream(adaptor,"rule property");
374 RewriteRuleSubtreeStream stream_localProperty=new RewriteRuleSubtreeStream(adaptor,"rule localProperty");
376 // 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 ) )
378 int LA7_0 = input.LA(1);
380 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)) ) {
383 else if ( (LA7_0==65) ) {
387 if (state.backtracking>0) {state.failed=true; return retval;}
388 NoViableAltException nvae =
389 new NoViableAltException("", 7, 0, input);
395 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:231:7: resource ( localProperty )* ( INDENT property ( NEWLINE property )* DEDENT )?
397 pushFollow(FOLLOW_resource_in_resourceDefinition1300);
398 resource7=resource();
401 if (state.failed) return retval;
402 if ( state.backtracking==0 ) stream_resource.add(resource7.getTree());
403 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:232:7: ( localProperty )*
407 int LA4_0 = input.LA(1);
409 if ( (LA4_0==ID||LA4_0==URI||(LA4_0>=67 && LA4_0<=75)) ) {
416 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:232:7: localProperty
418 pushFollow(FOLLOW_localProperty_in_resourceDefinition1308);
419 localProperty8=localProperty();
422 if (state.failed) return retval;
423 if ( state.backtracking==0 ) stream_localProperty.add(localProperty8.getTree());
433 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:233:7: ( INDENT property ( NEWLINE property )* DEDENT )?
435 int LA6_0 = input.LA(1);
437 if ( (LA6_0==INDENT) ) {
442 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:233:8: INDENT property ( NEWLINE property )* DEDENT
444 INDENT9=(Token)match(input,INDENT,FOLLOW_INDENT_in_resourceDefinition1318); if (state.failed) return retval;
445 if ( state.backtracking==0 ) stream_INDENT.add(INDENT9);
447 pushFollow(FOLLOW_property_in_resourceDefinition1320);
448 property10=property();
451 if (state.failed) return retval;
452 if ( state.backtracking==0 ) stream_property.add(property10.getTree());
453 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:233:24: ( NEWLINE property )*
457 int LA5_0 = input.LA(1);
459 if ( (LA5_0==NEWLINE) ) {
466 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:233:25: NEWLINE property
468 NEWLINE11=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_resourceDefinition1323); if (state.failed) return retval;
469 if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE11);
471 pushFollow(FOLLOW_property_in_resourceDefinition1325);
472 property12=property();
475 if (state.failed) return retval;
476 if ( state.backtracking==0 ) stream_property.add(property12.getTree());
486 DEDENT13=(Token)match(input,DEDENT,FOLLOW_DEDENT_in_resourceDefinition1329); if (state.failed) return retval;
487 if ( state.backtracking==0 ) stream_DEDENT.add(DEDENT13);
498 // elements: property, localProperty, resource
500 // rule labels: retval
501 // token list labels:
504 if ( state.backtracking==0 ) {
505 retval.tree = root_0;
506 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
508 root_0 = (CommonTree)adaptor.nil();
509 // 234:5: -> ^( RESOURCE resource ( localProperty )* ( property )* )
511 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:234:8: ^( RESOURCE resource ( localProperty )* ( property )* )
513 CommonTree root_1 = (CommonTree)adaptor.nil();
514 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(RESOURCE, "RESOURCE"), root_1);
516 adaptor.addChild(root_1, stream_resource.nextTree());
517 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:234:28: ( localProperty )*
518 while ( stream_localProperty.hasNext() ) {
519 adaptor.addChild(root_1, stream_localProperty.nextTree());
522 stream_localProperty.reset();
523 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:234:43: ( property )*
524 while ( stream_property.hasNext() ) {
525 adaptor.addChild(root_1, stream_property.nextTree());
528 stream_property.reset();
530 adaptor.addChild(root_0, root_1);
535 retval.tree = root_0;}
539 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:235:7: template
541 pushFollow(FOLLOW_template_in_resourceDefinition1358);
542 template14=template();
545 if (state.failed) return retval;
546 if ( state.backtracking==0 ) stream_template.add(template14.getTree());
550 // elements: template, template
552 // rule labels: retval
553 // token list labels:
556 if ( state.backtracking==0 ) {
557 retval.tree = root_0;
558 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
560 root_0 = (CommonTree)adaptor.nil();
561 // 235:16: -> ^( RESOURCE ^( BLANK template ) template )
563 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:235:19: ^( RESOURCE ^( BLANK template ) template )
565 CommonTree root_1 = (CommonTree)adaptor.nil();
566 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(RESOURCE, "RESOURCE"), root_1);
568 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:235:30: ^( BLANK template )
570 CommonTree root_2 = (CommonTree)adaptor.nil();
571 root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(BLANK, "BLANK"), root_2);
573 adaptor.addChild(root_2, stream_template.nextTree());
575 adaptor.addChild(root_1, root_2);
577 adaptor.addChild(root_1, stream_template.nextTree());
579 adaptor.addChild(root_0, root_1);
584 retval.tree = root_0;}
589 retval.stop = input.LT(-1);
591 if ( state.backtracking==0 ) {
593 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
594 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
597 catch (RecognitionException re) {
600 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
607 // $ANTLR end "resourceDefinition"
609 public static class localProperty_return extends ParserRuleReturnScope {
611 public Object getTree() { return tree; }
614 // $ANTLR start "localProperty"
615 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:238:1: localProperty : relation resource -> ^( PROPERTY relation ^( RESOURCE resource ) ) ;
616 public final GraphParser.localProperty_return localProperty() throws RecognitionException {
617 GraphParser.localProperty_return retval = new GraphParser.localProperty_return();
618 retval.start = input.LT(1);
620 CommonTree root_0 = null;
622 GraphParser.relation_return relation15 = null;
624 GraphParser.resource_return resource16 = null;
627 RewriteRuleSubtreeStream stream_relation=new RewriteRuleSubtreeStream(adaptor,"rule relation");
628 RewriteRuleSubtreeStream stream_resource=new RewriteRuleSubtreeStream(adaptor,"rule resource");
630 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:239:5: ( relation resource -> ^( PROPERTY relation ^( RESOURCE resource ) ) )
631 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:239:7: relation resource
633 pushFollow(FOLLOW_relation_in_localProperty1393);
634 relation15=relation();
637 if (state.failed) return retval;
638 if ( state.backtracking==0 ) stream_relation.add(relation15.getTree());
639 pushFollow(FOLLOW_resource_in_localProperty1395);
640 resource16=resource();
643 if (state.failed) return retval;
644 if ( state.backtracking==0 ) stream_resource.add(resource16.getTree());
648 // elements: resource, relation
650 // rule labels: retval
651 // token list labels:
654 if ( state.backtracking==0 ) {
655 retval.tree = root_0;
656 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
658 root_0 = (CommonTree)adaptor.nil();
659 // 240:5: -> ^( PROPERTY relation ^( RESOURCE resource ) )
661 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:240:8: ^( PROPERTY relation ^( RESOURCE resource ) )
663 CommonTree root_1 = (CommonTree)adaptor.nil();
664 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(PROPERTY, "PROPERTY"), root_1);
666 adaptor.addChild(root_1, stream_relation.nextTree());
667 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:240:28: ^( RESOURCE resource )
669 CommonTree root_2 = (CommonTree)adaptor.nil();
670 root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(RESOURCE, "RESOURCE"), root_2);
672 adaptor.addChild(root_2, stream_resource.nextTree());
674 adaptor.addChild(root_1, root_2);
677 adaptor.addChild(root_0, root_1);
682 retval.tree = root_0;}
685 retval.stop = input.LT(-1);
687 if ( state.backtracking==0 ) {
689 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
690 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
693 catch (RecognitionException re) {
696 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
703 // $ANTLR end "localProperty"
705 public static class property_return extends ParserRuleReturnScope {
707 public Object getTree() { return tree; }
710 // $ANTLR start "property"
711 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:243:1: property : ( relation ( resourceDefinition -> ^( PROPERTY relation resourceDefinition ) | INDENT resourceDefinitions DEDENT -> ^( PROPERTY relation resourceDefinitions ) ) | template );
712 public final GraphParser.property_return property() throws RecognitionException {
713 GraphParser.property_return retval = new GraphParser.property_return();
714 retval.start = input.LT(1);
716 CommonTree root_0 = null;
720 GraphParser.relation_return relation17 = null;
722 GraphParser.resourceDefinition_return resourceDefinition18 = null;
724 GraphParser.resourceDefinitions_return resourceDefinitions20 = null;
726 GraphParser.template_return template22 = null;
729 CommonTree INDENT19_tree=null;
730 CommonTree DEDENT21_tree=null;
731 RewriteRuleTokenStream stream_DEDENT=new RewriteRuleTokenStream(adaptor,"token DEDENT");
732 RewriteRuleTokenStream stream_INDENT=new RewriteRuleTokenStream(adaptor,"token INDENT");
733 RewriteRuleSubtreeStream stream_resourceDefinition=new RewriteRuleSubtreeStream(adaptor,"rule resourceDefinition");
734 RewriteRuleSubtreeStream stream_relation=new RewriteRuleSubtreeStream(adaptor,"rule relation");
735 RewriteRuleSubtreeStream stream_resourceDefinitions=new RewriteRuleSubtreeStream(adaptor,"rule resourceDefinitions");
737 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:244:5: ( relation ( resourceDefinition -> ^( PROPERTY relation resourceDefinition ) | INDENT resourceDefinitions DEDENT -> ^( PROPERTY relation resourceDefinitions ) ) | template )
739 int LA9_0 = input.LA(1);
741 if ( (LA9_0==ID||LA9_0==URI||(LA9_0>=67 && LA9_0<=75)) ) {
744 else if ( (LA9_0==65) ) {
748 if (state.backtracking>0) {state.failed=true; return retval;}
749 NoViableAltException nvae =
750 new NoViableAltException("", 9, 0, input);
756 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:244:7: relation ( resourceDefinition -> ^( PROPERTY relation resourceDefinition ) | INDENT resourceDefinitions DEDENT -> ^( PROPERTY relation resourceDefinitions ) )
758 pushFollow(FOLLOW_relation_in_property1434);
759 relation17=relation();
762 if (state.failed) return retval;
763 if ( state.backtracking==0 ) stream_relation.add(relation17.getTree());
764 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:245:7: ( resourceDefinition -> ^( PROPERTY relation resourceDefinition ) | INDENT resourceDefinitions DEDENT -> ^( PROPERTY relation resourceDefinitions ) )
766 int LA8_0 = input.LA(1);
768 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)) ) {
771 else if ( (LA8_0==INDENT) ) {
775 if (state.backtracking>0) {state.failed=true; return retval;}
776 NoViableAltException nvae =
777 new NoViableAltException("", 8, 0, input);
783 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:245:9: resourceDefinition
785 pushFollow(FOLLOW_resourceDefinition_in_property1444);
786 resourceDefinition18=resourceDefinition();
789 if (state.failed) return retval;
790 if ( state.backtracking==0 ) stream_resourceDefinition.add(resourceDefinition18.getTree());
794 // elements: relation, resourceDefinition
796 // rule labels: retval
797 // token list labels:
800 if ( state.backtracking==0 ) {
801 retval.tree = root_0;
802 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
804 root_0 = (CommonTree)adaptor.nil();
805 // 245:28: -> ^( PROPERTY relation resourceDefinition )
807 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:245:31: ^( PROPERTY relation resourceDefinition )
809 CommonTree root_1 = (CommonTree)adaptor.nil();
810 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(PROPERTY, "PROPERTY"), root_1);
812 adaptor.addChild(root_1, stream_relation.nextTree());
813 adaptor.addChild(root_1, stream_resourceDefinition.nextTree());
815 adaptor.addChild(root_0, root_1);
820 retval.tree = root_0;}
824 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:246:9: INDENT resourceDefinitions DEDENT
826 INDENT19=(Token)match(input,INDENT,FOLLOW_INDENT_in_property1464); if (state.failed) return retval;
827 if ( state.backtracking==0 ) stream_INDENT.add(INDENT19);
829 pushFollow(FOLLOW_resourceDefinitions_in_property1466);
830 resourceDefinitions20=resourceDefinitions();
833 if (state.failed) return retval;
834 if ( state.backtracking==0 ) stream_resourceDefinitions.add(resourceDefinitions20.getTree());
835 DEDENT21=(Token)match(input,DEDENT,FOLLOW_DEDENT_in_property1468); if (state.failed) return retval;
836 if ( state.backtracking==0 ) stream_DEDENT.add(DEDENT21);
841 // elements: relation, resourceDefinitions
843 // rule labels: retval
844 // token list labels:
847 if ( state.backtracking==0 ) {
848 retval.tree = root_0;
849 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
851 root_0 = (CommonTree)adaptor.nil();
852 // 246:43: -> ^( PROPERTY relation resourceDefinitions )
854 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:246:46: ^( PROPERTY relation resourceDefinitions )
856 CommonTree root_1 = (CommonTree)adaptor.nil();
857 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(PROPERTY, "PROPERTY"), root_1);
859 adaptor.addChild(root_1, stream_relation.nextTree());
860 adaptor.addChild(root_1, stream_resourceDefinitions.nextTree());
862 adaptor.addChild(root_0, root_1);
867 retval.tree = root_0;}
877 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:248:7: template
879 root_0 = (CommonTree)adaptor.nil();
881 pushFollow(FOLLOW_template_in_property1494);
882 template22=template();
885 if (state.failed) return retval;
886 if ( state.backtracking==0 ) adaptor.addChild(root_0, template22.getTree());
892 retval.stop = input.LT(-1);
894 if ( state.backtracking==0 ) {
896 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
897 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
900 catch (RecognitionException re) {
903 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
910 // $ANTLR end "property"
912 public static class template_return extends ParserRuleReturnScope {
914 public Object getTree() { return tree; }
917 // $ANTLR start "template"
918 // 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 )? ) ) ;
919 public final GraphParser.template_return template() throws RecognitionException {
920 GraphParser.template_return retval = new GraphParser.template_return();
921 retval.start = input.LT(1);
923 CommonTree root_0 = null;
925 Token char_literal23=null;
931 GraphParser.resource_return resource25 = null;
933 GraphParser.resourceDefinitions_return resourceDefinitions27 = null;
935 GraphParser.resource_return resource29 = null;
937 GraphParser.resourceDefinitions_return resourceDefinitions31 = null;
940 CommonTree char_literal23_tree=null;
941 CommonTree ID24_tree=null;
942 CommonTree INDENT26_tree=null;
943 CommonTree DEDENT28_tree=null;
944 CommonTree INDENT30_tree=null;
945 CommonTree DEDENT32_tree=null;
946 RewriteRuleTokenStream stream_DEDENT=new RewriteRuleTokenStream(adaptor,"token DEDENT");
947 RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
948 RewriteRuleTokenStream stream_65=new RewriteRuleTokenStream(adaptor,"token 65");
949 RewriteRuleTokenStream stream_INDENT=new RewriteRuleTokenStream(adaptor,"token INDENT");
950 RewriteRuleSubtreeStream stream_resource=new RewriteRuleSubtreeStream(adaptor,"rule resource");
951 RewriteRuleSubtreeStream stream_resourceDefinitions=new RewriteRuleSubtreeStream(adaptor,"rule resourceDefinitions");
953 // 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 )? ) ) )
954 // 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 )? ) )
956 char_literal23=(Token)match(input,65,FOLLOW_65_in_template1515); if (state.failed) return retval;
957 if ( state.backtracking==0 ) stream_65.add(char_literal23);
959 // 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 )? ) )
961 alt13 = dfa13.predict(input);
964 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:253:7: {...}? => ID ( resource )+ INDENT resourceDefinitions DEDENT
966 if ( !((input.LT(1).getText().equals("template"))) ) {
967 if (state.backtracking>0) {state.failed=true; return retval;}
968 throw new FailedPredicateException(input, "template", "input.LT(1).getText().equals(\"template\")");
970 ID24=(Token)match(input,ID,FOLLOW_ID_in_template1533); if (state.failed) return retval;
971 if ( state.backtracking==0 ) stream_ID.add(ID24);
973 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:254:10: ( resource )+
978 int LA10_0 = input.LA(1);
980 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)) ) {
987 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:254:10: resource
989 pushFollow(FOLLOW_resource_in_template1535);
990 resource25=resource();
993 if (state.failed) return retval;
994 if ( state.backtracking==0 ) stream_resource.add(resource25.getTree());
1000 if ( cnt10 >= 1 ) break loop10;
1001 if (state.backtracking>0) {state.failed=true; return retval;}
1002 EarlyExitException eee =
1003 new EarlyExitException(10, input);
1009 INDENT26=(Token)match(input,INDENT,FOLLOW_INDENT_in_template1545); if (state.failed) return retval;
1010 if ( state.backtracking==0 ) stream_INDENT.add(INDENT26);
1012 pushFollow(FOLLOW_resourceDefinitions_in_template1547);
1013 resourceDefinitions27=resourceDefinitions();
1016 if (state.failed) return retval;
1017 if ( state.backtracking==0 ) stream_resourceDefinitions.add(resourceDefinitions27.getTree());
1018 DEDENT28=(Token)match(input,DEDENT,FOLLOW_DEDENT_in_template1549); if (state.failed) return retval;
1019 if ( state.backtracking==0 ) stream_DEDENT.add(DEDENT28);
1024 // elements: resourceDefinitions, resource
1026 // rule labels: retval
1027 // token list labels:
1028 // rule list labels:
1030 if ( state.backtracking==0 ) {
1031 retval.tree = root_0;
1032 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1034 root_0 = (CommonTree)adaptor.nil();
1035 // 256:7: -> ^( TEMPLATE_DEFINITION ( resource )+ resourceDefinitions )
1037 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:256:10: ^( TEMPLATE_DEFINITION ( resource )+ resourceDefinitions )
1039 CommonTree root_1 = (CommonTree)adaptor.nil();
1040 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TEMPLATE_DEFINITION, "TEMPLATE_DEFINITION"), root_1);
1042 if ( !(stream_resource.hasNext()) ) {
1043 throw new RewriteEarlyExitException();
1045 while ( stream_resource.hasNext() ) {
1046 adaptor.addChild(root_1, stream_resource.nextTree());
1049 stream_resource.reset();
1050 adaptor.addChild(root_1, stream_resourceDefinitions.nextTree());
1052 adaptor.addChild(root_0, root_1);
1057 retval.tree = root_0;}
1061 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:257:7: ( resource )+ ( INDENT resourceDefinitions DEDENT )?
1063 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:257:7: ( resource )+
1068 int LA11_0 = input.LA(1);
1070 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)) ) {
1077 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:257:7: resource
1079 pushFollow(FOLLOW_resource_in_template1574);
1080 resource29=resource();
1083 if (state.failed) return retval;
1084 if ( state.backtracking==0 ) stream_resource.add(resource29.getTree());
1090 if ( cnt11 >= 1 ) break loop11;
1091 if (state.backtracking>0) {state.failed=true; return retval;}
1092 EarlyExitException eee =
1093 new EarlyExitException(11, input);
1099 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:258:7: ( INDENT resourceDefinitions DEDENT )?
1101 int LA12_0 = input.LA(1);
1103 if ( (LA12_0==INDENT) ) {
1108 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:258:8: INDENT resourceDefinitions DEDENT
1110 INDENT30=(Token)match(input,INDENT,FOLLOW_INDENT_in_template1585); if (state.failed) return retval;
1111 if ( state.backtracking==0 ) stream_INDENT.add(INDENT30);
1113 pushFollow(FOLLOW_resourceDefinitions_in_template1587);
1114 resourceDefinitions31=resourceDefinitions();
1117 if (state.failed) return retval;
1118 if ( state.backtracking==0 ) stream_resourceDefinitions.add(resourceDefinitions31.getTree());
1119 DEDENT32=(Token)match(input,DEDENT,FOLLOW_DEDENT_in_template1589); if (state.failed) return retval;
1120 if ( state.backtracking==0 ) stream_DEDENT.add(DEDENT32);
1131 // elements: resource, resourceDefinitions
1133 // rule labels: retval
1134 // token list labels:
1135 // rule list labels:
1137 if ( state.backtracking==0 ) {
1138 retval.tree = root_0;
1139 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1141 root_0 = (CommonTree)adaptor.nil();
1142 // 259:7: -> ^( TEMPLATE_INSTANCE ( resource )+ ( resourceDefinitions )? )
1144 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:259:10: ^( TEMPLATE_INSTANCE ( resource )+ ( resourceDefinitions )? )
1146 CommonTree root_1 = (CommonTree)adaptor.nil();
1147 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TEMPLATE_INSTANCE, "TEMPLATE_INSTANCE"), root_1);
1149 if ( !(stream_resource.hasNext()) ) {
1150 throw new RewriteEarlyExitException();
1152 while ( stream_resource.hasNext() ) {
1153 adaptor.addChild(root_1, stream_resource.nextTree());
1156 stream_resource.reset();
1157 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:259:40: ( resourceDefinitions )?
1158 if ( stream_resourceDefinitions.hasNext() ) {
1159 adaptor.addChild(root_1, stream_resourceDefinitions.nextTree());
1162 stream_resourceDefinitions.reset();
1164 adaptor.addChild(root_0, root_1);
1169 retval.tree = root_0;}
1178 retval.stop = input.LT(-1);
1180 if ( state.backtracking==0 ) {
1182 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
1183 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1186 catch (RecognitionException re) {
1189 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1196 // $ANTLR end "template"
1198 public static class relation_return extends ParserRuleReturnScope {
1200 public Object getTree() { return tree; }
1203 // $ANTLR start "relation"
1204 // 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 ) );
1205 public final GraphParser.relation_return relation() throws RecognitionException {
1206 GraphParser.relation_return retval = new GraphParser.relation_return();
1207 retval.start = input.LT(1);
1209 CommonTree root_0 = null;
1212 Token char_literal34=null;
1215 Token string_literal37=null;
1216 Token string_literal38=null;
1217 Token string_literal39=null;
1218 Token string_literal40=null;
1219 Token string_literal41=null;
1220 Token string_literal42=null;
1221 Token char_literal43=null;
1222 Token char_literal44=null;
1223 Token char_literal45=null;
1226 CommonTree ID33_tree=null;
1227 CommonTree char_literal34_tree=null;
1228 CommonTree ID35_tree=null;
1229 CommonTree URI36_tree=null;
1230 CommonTree string_literal37_tree=null;
1231 CommonTree string_literal38_tree=null;
1232 CommonTree string_literal39_tree=null;
1233 CommonTree string_literal40_tree=null;
1234 CommonTree string_literal41_tree=null;
1235 CommonTree string_literal42_tree=null;
1236 CommonTree char_literal43_tree=null;
1237 CommonTree char_literal44_tree=null;
1238 CommonTree char_literal45_tree=null;
1239 CommonTree ID46_tree=null;
1240 RewriteRuleTokenStream stream_67=new RewriteRuleTokenStream(adaptor,"token 67");
1241 RewriteRuleTokenStream stream_66=new RewriteRuleTokenStream(adaptor,"token 66");
1242 RewriteRuleTokenStream stream_69=new RewriteRuleTokenStream(adaptor,"token 69");
1243 RewriteRuleTokenStream stream_68=new RewriteRuleTokenStream(adaptor,"token 68");
1244 RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
1245 RewriteRuleTokenStream stream_70=new RewriteRuleTokenStream(adaptor,"token 70");
1246 RewriteRuleTokenStream stream_71=new RewriteRuleTokenStream(adaptor,"token 71");
1247 RewriteRuleTokenStream stream_72=new RewriteRuleTokenStream(adaptor,"token 72");
1248 RewriteRuleTokenStream stream_73=new RewriteRuleTokenStream(adaptor,"token 73");
1249 RewriteRuleTokenStream stream_74=new RewriteRuleTokenStream(adaptor,"token 74");
1250 RewriteRuleTokenStream stream_75=new RewriteRuleTokenStream(adaptor,"token 75");
1253 // 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 ) )
1255 switch ( input.LA(1) ) {
1312 if (state.backtracking>0) {state.failed=true; return retval;}
1313 NoViableAltException nvae =
1314 new NoViableAltException("", 15, 0, input);
1321 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:268:7: ( ID -> ID ) ( '.' ID -> ^( REF $relation ID ) )*
1323 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:268:7: ( ID -> ID )
1324 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:268:9: ID
1326 ID33=(Token)match(input,ID,FOLLOW_ID_in_relation1643); if (state.failed) return retval;
1327 if ( state.backtracking==0 ) stream_ID.add(ID33);
1334 // rule labels: retval
1335 // token list labels:
1336 // rule list labels:
1338 if ( state.backtracking==0 ) {
1339 retval.tree = root_0;
1340 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1342 root_0 = (CommonTree)adaptor.nil();
1345 adaptor.addChild(root_0, stream_ID.nextNode());
1349 retval.tree = root_0;}
1352 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:269:7: ( '.' ID -> ^( REF $relation ID ) )*
1356 int LA14_0 = input.LA(1);
1358 if ( (LA14_0==66) ) {
1365 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:269:8: '.' ID
1367 char_literal34=(Token)match(input,66,FOLLOW_66_in_relation1658); if (state.failed) return retval;
1368 if ( state.backtracking==0 ) stream_66.add(char_literal34);
1370 ID35=(Token)match(input,ID,FOLLOW_ID_in_relation1660); if (state.failed) return retval;
1371 if ( state.backtracking==0 ) stream_ID.add(ID35);
1376 // elements: ID, relation
1378 // rule labels: retval
1379 // token list labels:
1380 // rule list labels:
1382 if ( state.backtracking==0 ) {
1383 retval.tree = root_0;
1384 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1386 root_0 = (CommonTree)adaptor.nil();
1387 // 269:15: -> ^( REF $relation ID )
1389 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:269:18: ^( REF $relation ID )
1391 CommonTree root_1 = (CommonTree)adaptor.nil();
1392 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(REF, "REF"), root_1);
1394 adaptor.addChild(root_1, stream_retval.nextTree());
1395 adaptor.addChild(root_1, stream_ID.nextNode());
1397 adaptor.addChild(root_0, root_1);
1402 retval.tree = root_0;}
1415 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:270:7: URI
1417 root_0 = (CommonTree)adaptor.nil();
1419 URI36=(Token)match(input,URI,FOLLOW_URI_in_relation1681); if (state.failed) return retval;
1420 if ( state.backtracking==0 ) {
1421 URI36_tree = (CommonTree)adaptor.create(URI36);
1422 adaptor.addChild(root_0, URI36_tree);
1428 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:271:7: '<T'
1430 string_literal37=(Token)match(input,67,FOLLOW_67_in_relation1689); if (state.failed) return retval;
1431 if ( state.backtracking==0 ) stream_67.add(string_literal37);
1438 // rule labels: retval
1439 // token list labels:
1440 // rule list labels:
1442 if ( state.backtracking==0 ) {
1443 retval.tree = root_0;
1444 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1446 root_0 = (CommonTree)adaptor.nil();
1447 // 271:12: -> INHERITS
1449 adaptor.addChild(root_0, (CommonTree)adaptor.create(INHERITS, "INHERITS"));
1453 retval.tree = root_0;}
1457 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:272:7: '<R'
1459 string_literal38=(Token)match(input,68,FOLLOW_68_in_relation1701); if (state.failed) return retval;
1460 if ( state.backtracking==0 ) stream_68.add(string_literal38);
1467 // rule labels: retval
1468 // token list labels:
1469 // rule list labels:
1471 if ( state.backtracking==0 ) {
1472 retval.tree = root_0;
1473 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1475 root_0 = (CommonTree)adaptor.nil();
1476 // 272:12: -> SUBRELATION_OF
1478 adaptor.addChild(root_0, (CommonTree)adaptor.create(SUBRELATION_OF, "SUBRELATION_OF"));
1482 retval.tree = root_0;}
1486 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:273:7: '<--'
1488 string_literal39=(Token)match(input,69,FOLLOW_69_in_relation1713); if (state.failed) return retval;
1489 if ( state.backtracking==0 ) stream_69.add(string_literal39);
1496 // rule labels: retval
1497 // token list labels:
1498 // rule list labels:
1500 if ( state.backtracking==0 ) {
1501 retval.tree = root_0;
1502 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1504 root_0 = (CommonTree)adaptor.nil();
1505 // 273:13: -> HAS_DOMAIN
1507 adaptor.addChild(root_0, (CommonTree)adaptor.create(HAS_DOMAIN, "HAS_DOMAIN"));
1511 retval.tree = root_0;}
1515 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:274:7: '-->'
1517 string_literal40=(Token)match(input,70,FOLLOW_70_in_relation1725); if (state.failed) return retval;
1518 if ( state.backtracking==0 ) stream_70.add(string_literal40);
1525 // rule labels: retval
1526 // token list labels:
1527 // rule list labels:
1529 if ( state.backtracking==0 ) {
1530 retval.tree = root_0;
1531 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1533 root_0 = (CommonTree)adaptor.nil();
1534 // 274:13: -> HAS_RANGE
1536 adaptor.addChild(root_0, (CommonTree)adaptor.create(HAS_RANGE, "HAS_RANGE"));
1540 retval.tree = root_0;}
1544 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:275:7: '==>'
1546 string_literal41=(Token)match(input,71,FOLLOW_71_in_relation1737); if (state.failed) return retval;
1547 if ( state.backtracking==0 ) stream_71.add(string_literal41);
1554 // rule labels: retval
1555 // token list labels:
1556 // rule list labels:
1558 if ( state.backtracking==0 ) {
1559 retval.tree = root_0;
1560 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1562 root_0 = (CommonTree)adaptor.nil();
1563 // 275:13: -> REQUIRES_VALUE_TYPE
1565 adaptor.addChild(root_0, (CommonTree)adaptor.create(REQUIRES_VALUE_TYPE, "REQUIRES_VALUE_TYPE"));
1569 retval.tree = root_0;}
1573 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:276:7: '>--'
1575 string_literal42=(Token)match(input,72,FOLLOW_72_in_relation1749); if (state.failed) return retval;
1576 if ( state.backtracking==0 ) stream_72.add(string_literal42);
1583 // rule labels: retval
1584 // token list labels:
1585 // rule list labels:
1587 if ( state.backtracking==0 ) {
1588 retval.tree = root_0;
1589 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1591 root_0 = (CommonTree)adaptor.nil();
1592 // 276:13: -> DOMAIN_OF
1594 adaptor.addChild(root_0, (CommonTree)adaptor.create(DOMAIN_OF, "DOMAIN_OF"));
1598 retval.tree = root_0;}
1602 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:277:7: ':'
1604 char_literal43=(Token)match(input,73,FOLLOW_73_in_relation1765); if (state.failed) return retval;
1605 if ( state.backtracking==0 ) stream_73.add(char_literal43);
1612 // rule labels: retval
1613 // token list labels:
1614 // rule list labels:
1616 if ( state.backtracking==0 ) {
1617 retval.tree = root_0;
1618 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1620 root_0 = (CommonTree)adaptor.nil();
1621 // 277:11: -> INSTANCE_OF
1623 adaptor.addChild(root_0, (CommonTree)adaptor.create(INSTANCE_OF, "INSTANCE_OF"));
1627 retval.tree = root_0;}
1631 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:278:7: '='
1633 char_literal44=(Token)match(input,74,FOLLOW_74_in_relation1777); if (state.failed) return retval;
1634 if ( state.backtracking==0 ) stream_74.add(char_literal44);
1641 // rule labels: retval
1642 // token list labels:
1643 // rule list labels:
1645 if ( state.backtracking==0 ) {
1646 retval.tree = root_0;
1647 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1649 root_0 = (CommonTree)adaptor.nil();
1650 // 278:11: -> EQUALS
1652 adaptor.addChild(root_0, (CommonTree)adaptor.create(EQUALS, "EQUALS"));
1656 retval.tree = root_0;}
1660 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:279:7: '%' ID
1662 char_literal45=(Token)match(input,75,FOLLOW_75_in_relation1789); if (state.failed) return retval;
1663 if ( state.backtracking==0 ) stream_75.add(char_literal45);
1665 ID46=(Token)match(input,ID,FOLLOW_ID_in_relation1791); if (state.failed) return retval;
1666 if ( state.backtracking==0 ) stream_ID.add(ID46);
1673 // rule labels: retval
1674 // token list labels:
1675 // rule list labels:
1677 if ( state.backtracking==0 ) {
1678 retval.tree = root_0;
1679 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1681 root_0 = (CommonTree)adaptor.nil();
1682 // 279:14: -> ^( VARIABLE ID )
1684 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:279:17: ^( VARIABLE ID )
1686 CommonTree root_1 = (CommonTree)adaptor.nil();
1687 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(VARIABLE, "VARIABLE"), root_1);
1689 adaptor.addChild(root_1, stream_ID.nextNode());
1691 adaptor.addChild(root_0, root_1);
1696 retval.tree = root_0;}
1701 retval.stop = input.LT(-1);
1703 if ( state.backtracking==0 ) {
1705 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
1706 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1709 catch (RecognitionException re) {
1712 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1719 // $ANTLR end "relation"
1721 public static class resource_return extends ParserRuleReturnScope {
1723 public Object getTree() { return tree; }
1726 // $ANTLR start "resource"
1727 // 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 ) );
1728 public final GraphParser.resource_return resource() throws RecognitionException {
1729 GraphParser.resource_return retval = new GraphParser.resource_return();
1730 retval.start = input.LT(1);
1732 CommonTree root_0 = null;
1736 Token char_literal49=null;
1738 Token STRING51=null;
1740 Token char_literal54=null;
1741 Token char_literal56=null;
1743 GraphParser.simpleValue_return simpleValue53 = null;
1745 GraphParser.basicType_return basicType55 = null;
1748 CommonTree ID47_tree=null;
1749 CommonTree ID48_tree=null;
1750 CommonTree char_literal49_tree=null;
1751 CommonTree ID50_tree=null;
1752 CommonTree STRING51_tree=null;
1753 CommonTree URI52_tree=null;
1754 CommonTree char_literal54_tree=null;
1755 CommonTree char_literal56_tree=null;
1756 CommonTree ID57_tree=null;
1757 RewriteRuleTokenStream stream_66=new RewriteRuleTokenStream(adaptor,"token 66");
1758 RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
1759 RewriteRuleTokenStream stream_75=new RewriteRuleTokenStream(adaptor,"token 75");
1760 RewriteRuleTokenStream stream_STRING=new RewriteRuleTokenStream(adaptor,"token STRING");
1761 RewriteRuleTokenStream stream_76=new RewriteRuleTokenStream(adaptor,"token 76");
1762 RewriteRuleSubtreeStream stream_basicType=new RewriteRuleSubtreeStream(adaptor,"rule basicType");
1763 RewriteRuleSubtreeStream stream_simpleValue=new RewriteRuleSubtreeStream(adaptor,"rule simpleValue");
1765 // 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 ) )
1767 switch ( input.LA(1) ) {
1801 if (state.backtracking>0) {state.failed=true; return retval;}
1802 NoViableAltException nvae =
1803 new NoViableAltException("", 19, 0, input);
1810 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:283:7: ({...}? => ID -> ^( BLANK ID ) | ID -> ID ) ( '.' ( ID -> ^( REF $resource ID ) | STRING -> ^( REF $resource STRING ) ) )*
1812 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:283:7: ({...}? => ID -> ^( BLANK ID ) | ID -> ID )
1814 int LA16_0 = input.LA(1);
1816 if ( (LA16_0==ID) ) {
1817 int LA16_1 = input.LA(2);
1819 if ( ((input.LT(1).getText().equals("_"))) ) {
1822 else if ( (true) ) {
1826 if (state.backtracking>0) {state.failed=true; return retval;}
1827 NoViableAltException nvae =
1828 new NoViableAltException("", 16, 1, input);
1834 if (state.backtracking>0) {state.failed=true; return retval;}
1835 NoViableAltException nvae =
1836 new NoViableAltException("", 16, 0, input);
1842 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:283:9: {...}? => ID
1844 if ( !((input.LT(1).getText().equals("_"))) ) {
1845 if (state.backtracking>0) {state.failed=true; return retval;}
1846 throw new FailedPredicateException(input, "resource", "input.LT(1).getText().equals(\"_\")");
1848 ID47=(Token)match(input,ID,FOLLOW_ID_in_resource1821); if (state.failed) return retval;
1849 if ( state.backtracking==0 ) stream_ID.add(ID47);
1856 // rule labels: retval
1857 // token list labels:
1858 // rule list labels:
1860 if ( state.backtracking==0 ) {
1861 retval.tree = root_0;
1862 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1864 root_0 = (CommonTree)adaptor.nil();
1865 // 283:51: -> ^( BLANK ID )
1867 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:283:54: ^( BLANK ID )
1869 CommonTree root_1 = (CommonTree)adaptor.nil();
1870 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(BLANK, "BLANK"), root_1);
1872 adaptor.addChild(root_1, stream_ID.nextNode());
1874 adaptor.addChild(root_0, root_1);
1879 retval.tree = root_0;}
1883 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:284:9: ID
1885 ID48=(Token)match(input,ID,FOLLOW_ID_in_resource1840); if (state.failed) return retval;
1886 if ( state.backtracking==0 ) stream_ID.add(ID48);
1893 // rule labels: retval
1894 // token list labels:
1895 // rule list labels:
1897 if ( state.backtracking==0 ) {
1898 retval.tree = root_0;
1899 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1901 root_0 = (CommonTree)adaptor.nil();
1904 adaptor.addChild(root_0, stream_ID.nextNode());
1908 retval.tree = root_0;}
1914 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:285:7: ( '.' ( ID -> ^( REF $resource ID ) | STRING -> ^( REF $resource STRING ) ) )*
1918 int LA18_0 = input.LA(1);
1920 if ( (LA18_0==66) ) {
1927 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:285:8: '.' ( ID -> ^( REF $resource ID ) | STRING -> ^( REF $resource STRING ) )
1929 char_literal49=(Token)match(input,66,FOLLOW_66_in_resource1855); if (state.failed) return retval;
1930 if ( state.backtracking==0 ) stream_66.add(char_literal49);
1932 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:285:12: ( ID -> ^( REF $resource ID ) | STRING -> ^( REF $resource STRING ) )
1934 int LA17_0 = input.LA(1);
1936 if ( (LA17_0==ID) ) {
1939 else if ( (LA17_0==STRING) ) {
1943 if (state.backtracking>0) {state.failed=true; return retval;}
1944 NoViableAltException nvae =
1945 new NoViableAltException("", 17, 0, input);
1951 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:285:13: ID
1953 ID50=(Token)match(input,ID,FOLLOW_ID_in_resource1858); if (state.failed) return retval;
1954 if ( state.backtracking==0 ) stream_ID.add(ID50);
1959 // elements: ID, resource
1961 // rule labels: retval
1962 // token list labels:
1963 // rule list labels:
1965 if ( state.backtracking==0 ) {
1966 retval.tree = root_0;
1967 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1969 root_0 = (CommonTree)adaptor.nil();
1970 // 285:16: -> ^( REF $resource ID )
1972 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:285:19: ^( REF $resource ID )
1974 CommonTree root_1 = (CommonTree)adaptor.nil();
1975 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(REF, "REF"), root_1);
1977 adaptor.addChild(root_1, stream_retval.nextTree());
1978 adaptor.addChild(root_1, stream_ID.nextNode());
1980 adaptor.addChild(root_0, root_1);
1985 retval.tree = root_0;}
1989 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:286:13: STRING
1991 STRING51=(Token)match(input,STRING,FOLLOW_STRING_in_resource1883); if (state.failed) return retval;
1992 if ( state.backtracking==0 ) stream_STRING.add(STRING51);
1997 // elements: STRING, resource
1999 // rule labels: retval
2000 // token list labels:
2001 // rule list labels:
2003 if ( state.backtracking==0 ) {
2004 retval.tree = root_0;
2005 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
2007 root_0 = (CommonTree)adaptor.nil();
2008 // 286:20: -> ^( REF $resource STRING )
2010 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:286:23: ^( REF $resource STRING )
2012 CommonTree root_1 = (CommonTree)adaptor.nil();
2013 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(REF, "REF"), root_1);
2015 adaptor.addChild(root_1, stream_retval.nextTree());
2016 adaptor.addChild(root_1, stream_STRING.nextNode());
2018 adaptor.addChild(root_0, root_1);
2023 retval.tree = root_0;}
2042 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:289:7: URI
2044 root_0 = (CommonTree)adaptor.nil();
2046 URI52=(Token)match(input,URI,FOLLOW_URI_in_resource1924); if (state.failed) return retval;
2047 if ( state.backtracking==0 ) {
2048 URI52_tree = (CommonTree)adaptor.create(URI52);
2049 adaptor.addChild(root_0, URI52_tree);
2055 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:290:7: simpleValue
2057 pushFollow(FOLLOW_simpleValue_in_resource1932);
2058 simpleValue53=simpleValue();
2061 if (state.failed) return retval;
2062 if ( state.backtracking==0 ) stream_simpleValue.add(simpleValue53.getTree());
2066 // elements: simpleValue
2068 // rule labels: retval
2069 // token list labels:
2070 // rule list labels:
2072 if ( state.backtracking==0 ) {
2073 retval.tree = root_0;
2074 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
2076 root_0 = (CommonTree)adaptor.nil();
2077 // 290:19: -> ^( EMBEDDED_VALUE simpleValue )
2079 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:290:22: ^( EMBEDDED_VALUE simpleValue )
2081 CommonTree root_1 = (CommonTree)adaptor.nil();
2082 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(EMBEDDED_VALUE, "EMBEDDED_VALUE"), root_1);
2084 adaptor.addChild(root_1, stream_simpleValue.nextTree());
2086 adaptor.addChild(root_0, root_1);
2091 retval.tree = root_0;}
2095 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:291:7: '$' basicType
2097 char_literal54=(Token)match(input,76,FOLLOW_76_in_resource1948); if (state.failed) return retval;
2098 if ( state.backtracking==0 ) stream_76.add(char_literal54);
2100 pushFollow(FOLLOW_basicType_in_resource1950);
2101 basicType55=basicType();
2104 if (state.failed) return retval;
2105 if ( state.backtracking==0 ) stream_basicType.add(basicType55.getTree());
2109 // elements: basicType
2111 // rule labels: retval
2112 // token list labels:
2113 // rule list labels:
2115 if ( state.backtracking==0 ) {
2116 retval.tree = root_0;
2117 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
2119 root_0 = (CommonTree)adaptor.nil();
2120 // 291:21: -> ^( EMBEDDED_TYPE basicType )
2122 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:291:24: ^( EMBEDDED_TYPE basicType )
2124 CommonTree root_1 = (CommonTree)adaptor.nil();
2125 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(EMBEDDED_TYPE, "EMBEDDED_TYPE"), root_1);
2127 adaptor.addChild(root_1, stream_basicType.nextTree());
2129 adaptor.addChild(root_0, root_1);
2134 retval.tree = root_0;}
2138 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:292:7: '%' ID
2140 char_literal56=(Token)match(input,75,FOLLOW_75_in_resource1966); if (state.failed) return retval;
2141 if ( state.backtracking==0 ) stream_75.add(char_literal56);
2143 ID57=(Token)match(input,ID,FOLLOW_ID_in_resource1968); if (state.failed) return retval;
2144 if ( state.backtracking==0 ) stream_ID.add(ID57);
2151 // rule labels: retval
2152 // token list labels:
2153 // rule list labels:
2155 if ( state.backtracking==0 ) {
2156 retval.tree = root_0;
2157 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
2159 root_0 = (CommonTree)adaptor.nil();
2160 // 292:14: -> ^( VARIABLE ID )
2162 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:292:17: ^( VARIABLE ID )
2164 CommonTree root_1 = (CommonTree)adaptor.nil();
2165 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(VARIABLE, "VARIABLE"), root_1);
2167 adaptor.addChild(root_1, stream_ID.nextNode());
2169 adaptor.addChild(root_0, root_1);
2174 retval.tree = root_0;}
2179 retval.stop = input.LT(-1);
2181 if ( state.backtracking==0 ) {
2183 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
2184 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
2187 catch (RecognitionException re) {
2190 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
2197 // $ANTLR end "resource"
2199 public static class type_return extends ParserRuleReturnScope {
2201 public Object getTree() { return tree; }
2204 // $ANTLR start "type"
2205 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:306:1: type : ( arrayType | unionType );
2206 public final GraphParser.type_return type() throws RecognitionException {
2207 GraphParser.type_return retval = new GraphParser.type_return();
2208 retval.start = input.LT(1);
2210 CommonTree root_0 = null;
2212 GraphParser.arrayType_return arrayType58 = null;
2214 GraphParser.unionType_return unionType59 = null;
2219 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:307:5: ( arrayType | unionType )
2221 int LA20_0 = input.LA(1);
2223 if ( (LA20_0==ID||LA20_0==LPAREN||LA20_0==LCURLY) ) {
2226 else if ( (LA20_0==77) ) {
2230 if (state.backtracking>0) {state.failed=true; return retval;}
2231 NoViableAltException nvae =
2232 new NoViableAltException("", 20, 0, input);
2238 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:307:7: arrayType
2240 root_0 = (CommonTree)adaptor.nil();
2242 pushFollow(FOLLOW_arrayType_in_type2004);
2243 arrayType58=arrayType();
2246 if (state.failed) return retval;
2247 if ( state.backtracking==0 ) adaptor.addChild(root_0, arrayType58.getTree());
2252 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:308:7: unionType
2254 root_0 = (CommonTree)adaptor.nil();
2256 pushFollow(FOLLOW_unionType_in_type2012);
2257 unionType59=unionType();
2260 if (state.failed) return retval;
2261 if ( state.backtracking==0 ) adaptor.addChild(root_0, unionType59.getTree());
2267 retval.stop = input.LT(-1);
2269 if ( state.backtracking==0 ) {
2271 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
2272 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
2275 catch (RecognitionException re) {
2278 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
2285 // $ANTLR end "type"
2287 public static class unionType_return extends ParserRuleReturnScope {
2289 public Object getTree() { return tree; }
2292 // $ANTLR start "unionType"
2293 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:311:1: unionType : ( '|' unionComponent )+ -> ^( UNION_TYPE ( unionComponent )+ ) ;
2294 public final GraphParser.unionType_return unionType() throws RecognitionException {
2295 GraphParser.unionType_return retval = new GraphParser.unionType_return();
2296 retval.start = input.LT(1);
2298 CommonTree root_0 = null;
2300 Token char_literal60=null;
2301 GraphParser.unionComponent_return unionComponent61 = null;
2304 CommonTree char_literal60_tree=null;
2305 RewriteRuleTokenStream stream_77=new RewriteRuleTokenStream(adaptor,"token 77");
2306 RewriteRuleSubtreeStream stream_unionComponent=new RewriteRuleSubtreeStream(adaptor,"rule unionComponent");
2308 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:312:5: ( ( '|' unionComponent )+ -> ^( UNION_TYPE ( unionComponent )+ ) )
2309 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:313:6: ( '|' unionComponent )+
2311 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:313:6: ( '|' unionComponent )+
2316 int LA21_0 = input.LA(1);
2318 if ( (LA21_0==77) ) {
2325 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:313:7: '|' unionComponent
2327 char_literal60=(Token)match(input,77,FOLLOW_77_in_unionType2041); if (state.failed) return retval;
2328 if ( state.backtracking==0 ) stream_77.add(char_literal60);
2330 pushFollow(FOLLOW_unionComponent_in_unionType2043);
2331 unionComponent61=unionComponent();
2334 if (state.failed) return retval;
2335 if ( state.backtracking==0 ) stream_unionComponent.add(unionComponent61.getTree());
2341 if ( cnt21 >= 1 ) break loop21;
2342 if (state.backtracking>0) {state.failed=true; return retval;}
2343 EarlyExitException eee =
2344 new EarlyExitException(21, input);
2353 // elements: unionComponent
2355 // rule labels: retval
2356 // token list labels:
2357 // rule list labels:
2359 if ( state.backtracking==0 ) {
2360 retval.tree = root_0;
2361 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
2363 root_0 = (CommonTree)adaptor.nil();
2364 // 314:5: -> ^( UNION_TYPE ( unionComponent )+ )
2366 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:314:8: ^( UNION_TYPE ( unionComponent )+ )
2368 CommonTree root_1 = (CommonTree)adaptor.nil();
2369 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(UNION_TYPE, "UNION_TYPE"), root_1);
2371 if ( !(stream_unionComponent.hasNext()) ) {
2372 throw new RewriteEarlyExitException();
2374 while ( stream_unionComponent.hasNext() ) {
2375 adaptor.addChild(root_1, stream_unionComponent.nextTree());
2378 stream_unionComponent.reset();
2380 adaptor.addChild(root_0, root_1);
2385 retval.tree = root_0;}
2388 retval.stop = input.LT(-1);
2390 if ( state.backtracking==0 ) {
2392 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
2393 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
2396 catch (RecognitionException re) {
2399 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
2406 // $ANTLR end "unionType"
2408 public static class unionComponent_return extends ParserRuleReturnScope {
2410 public Object getTree() { return tree; }
2413 // $ANTLR start "unionComponent"
2414 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:317:1: unionComponent : ID ( ( arrayType )=> arrayType )? -> ^( TYPE_COMPONENT ID ( arrayType )? ) ;
2415 public final GraphParser.unionComponent_return unionComponent() throws RecognitionException {
2416 GraphParser.unionComponent_return retval = new GraphParser.unionComponent_return();
2417 retval.start = input.LT(1);
2419 CommonTree root_0 = null;
2422 GraphParser.arrayType_return arrayType63 = null;
2425 CommonTree ID62_tree=null;
2426 RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
2427 RewriteRuleSubtreeStream stream_arrayType=new RewriteRuleSubtreeStream(adaptor,"rule arrayType");
2429 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:317:16: ( ID ( ( arrayType )=> arrayType )? -> ^( TYPE_COMPONENT ID ( arrayType )? ) )
2430 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:317:18: ID ( ( arrayType )=> arrayType )?
2432 ID62=(Token)match(input,ID,FOLLOW_ID_in_unionComponent2071); if (state.failed) return retval;
2433 if ( state.backtracking==0 ) stream_ID.add(ID62);
2435 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:317:21: ( ( arrayType )=> arrayType )?
2437 alt22 = dfa22.predict(input);
2440 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:317:22: ( arrayType )=> arrayType
2442 pushFollow(FOLLOW_arrayType_in_unionComponent2080);
2443 arrayType63=arrayType();
2446 if (state.failed) return retval;
2447 if ( state.backtracking==0 ) stream_arrayType.add(arrayType63.getTree());
2457 // elements: ID, arrayType
2459 // rule labels: retval
2460 // token list labels:
2461 // rule list labels:
2463 if ( state.backtracking==0 ) {
2464 retval.tree = root_0;
2465 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
2467 root_0 = (CommonTree)adaptor.nil();
2468 // 317:49: -> ^( TYPE_COMPONENT ID ( arrayType )? )
2470 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:317:52: ^( TYPE_COMPONENT ID ( arrayType )? )
2472 CommonTree root_1 = (CommonTree)adaptor.nil();
2473 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TYPE_COMPONENT, "TYPE_COMPONENT"), root_1);
2475 adaptor.addChild(root_1, stream_ID.nextNode());
2476 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:317:72: ( arrayType )?
2477 if ( stream_arrayType.hasNext() ) {
2478 adaptor.addChild(root_1, stream_arrayType.nextTree());
2481 stream_arrayType.reset();
2483 adaptor.addChild(root_0, root_1);
2488 retval.tree = root_0;}
2491 retval.stop = input.LT(-1);
2493 if ( state.backtracking==0 ) {
2495 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
2496 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
2499 catch (RecognitionException re) {
2502 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
2509 // $ANTLR end "unionComponent"
2511 public static class arrayType_return extends ParserRuleReturnScope {
2513 public Object getTree() { return tree; }
2516 // $ANTLR start "arrayType"
2517 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:319:1: arrayType : ( basicType -> basicType ) ( LBRACKET ( arrayLength )? RBRACKET -> ^( ARRAY_TYPE $arrayType ( arrayLength )? ) )* ;
2518 public final GraphParser.arrayType_return arrayType() throws RecognitionException {
2519 GraphParser.arrayType_return retval = new GraphParser.arrayType_return();
2520 retval.start = input.LT(1);
2522 CommonTree root_0 = null;
2524 Token LBRACKET65=null;
2525 Token RBRACKET67=null;
2526 GraphParser.basicType_return basicType64 = null;
2528 GraphParser.arrayLength_return arrayLength66 = null;
2531 CommonTree LBRACKET65_tree=null;
2532 CommonTree RBRACKET67_tree=null;
2533 RewriteRuleTokenStream stream_LBRACKET=new RewriteRuleTokenStream(adaptor,"token LBRACKET");
2534 RewriteRuleTokenStream stream_RBRACKET=new RewriteRuleTokenStream(adaptor,"token RBRACKET");
2535 RewriteRuleSubtreeStream stream_arrayLength=new RewriteRuleSubtreeStream(adaptor,"rule arrayLength");
2536 RewriteRuleSubtreeStream stream_basicType=new RewriteRuleSubtreeStream(adaptor,"rule basicType");
2538 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:320:5: ( ( basicType -> basicType ) ( LBRACKET ( arrayLength )? RBRACKET -> ^( ARRAY_TYPE $arrayType ( arrayLength )? ) )* )
2539 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:320:7: ( basicType -> basicType ) ( LBRACKET ( arrayLength )? RBRACKET -> ^( ARRAY_TYPE $arrayType ( arrayLength )? ) )*
2541 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:320:7: ( basicType -> basicType )
2542 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:320:8: basicType
2544 pushFollow(FOLLOW_basicType_in_arrayType2108);
2545 basicType64=basicType();
2548 if (state.failed) return retval;
2549 if ( state.backtracking==0 ) stream_basicType.add(basicType64.getTree());
2553 // elements: basicType
2555 // rule labels: retval
2556 // token list labels:
2557 // rule list labels:
2559 if ( state.backtracking==0 ) {
2560 retval.tree = root_0;
2561 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
2563 root_0 = (CommonTree)adaptor.nil();
2564 // 320:18: -> basicType
2566 adaptor.addChild(root_0, stream_basicType.nextTree());
2570 retval.tree = root_0;}
2573 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:321:7: ( LBRACKET ( arrayLength )? RBRACKET -> ^( ARRAY_TYPE $arrayType ( arrayLength )? ) )*
2577 int LA24_0 = input.LA(1);
2579 if ( (LA24_0==LBRACKET) ) {
2586 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:321:8: LBRACKET ( arrayLength )? RBRACKET
2588 LBRACKET65=(Token)match(input,LBRACKET,FOLLOW_LBRACKET_in_arrayType2122); if (state.failed) return retval;
2589 if ( state.backtracking==0 ) stream_LBRACKET.add(LBRACKET65);
2591 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:321:17: ( arrayLength )?
2593 int LA23_0 = input.LA(1);
2595 if ( ((LA23_0>=INT && LA23_0<=INT_RANGE)) ) {
2600 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:321:17: arrayLength
2602 pushFollow(FOLLOW_arrayLength_in_arrayType2124);
2603 arrayLength66=arrayLength();
2606 if (state.failed) return retval;
2607 if ( state.backtracking==0 ) stream_arrayLength.add(arrayLength66.getTree());
2614 RBRACKET67=(Token)match(input,RBRACKET,FOLLOW_RBRACKET_in_arrayType2127); if (state.failed) return retval;
2615 if ( state.backtracking==0 ) stream_RBRACKET.add(RBRACKET67);
2620 // elements: arrayType, arrayLength
2622 // rule labels: retval
2623 // token list labels:
2624 // rule list labels:
2626 if ( state.backtracking==0 ) {
2627 retval.tree = root_0;
2628 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
2630 root_0 = (CommonTree)adaptor.nil();
2631 // 321:39: -> ^( ARRAY_TYPE $arrayType ( arrayLength )? )
2633 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:321:42: ^( ARRAY_TYPE $arrayType ( arrayLength )? )
2635 CommonTree root_1 = (CommonTree)adaptor.nil();
2636 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(ARRAY_TYPE, "ARRAY_TYPE"), root_1);
2638 adaptor.addChild(root_1, stream_retval.nextTree());
2639 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:321:66: ( arrayLength )?
2640 if ( stream_arrayLength.hasNext() ) {
2641 adaptor.addChild(root_1, stream_arrayLength.nextTree());
2644 stream_arrayLength.reset();
2646 adaptor.addChild(root_0, root_1);
2651 retval.tree = root_0;}
2663 retval.stop = input.LT(-1);
2665 if ( state.backtracking==0 ) {
2667 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
2668 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
2671 catch (RecognitionException re) {
2674 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
2681 // $ANTLR end "arrayType"
2683 public static class arrayLength_return extends ParserRuleReturnScope {
2685 public Object getTree() { return tree; }
2688 // $ANTLR start "arrayLength"
2689 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:323:1: arrayLength : ( INT | INT_RANGE );
2690 public final GraphParser.arrayLength_return arrayLength() throws RecognitionException {
2691 GraphParser.arrayLength_return retval = new GraphParser.arrayLength_return();
2692 retval.start = input.LT(1);
2694 CommonTree root_0 = null;
2698 CommonTree set68_tree=null;
2701 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:324:5: ( INT | INT_RANGE )
2702 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:
2704 root_0 = (CommonTree)adaptor.nil();
2706 set68=(Token)input.LT(1);
2707 if ( (input.LA(1)>=INT && input.LA(1)<=INT_RANGE) ) {
2709 if ( state.backtracking==0 ) adaptor.addChild(root_0, (CommonTree)adaptor.create(set68));
2710 state.errorRecovery=false;state.failed=false;
2713 if (state.backtracking>0) {state.failed=true; return retval;}
2714 MismatchedSetException mse = new MismatchedSetException(null,input);
2721 retval.stop = input.LT(-1);
2723 if ( state.backtracking==0 ) {
2725 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
2726 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
2729 catch (RecognitionException re) {
2732 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
2739 // $ANTLR end "arrayLength"
2741 public static class basicType_return extends ParserRuleReturnScope {
2743 public Object getTree() { return tree; }
2746 // $ANTLR start "basicType"
2747 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:328:1: basicType : ( tupleType | recordType | typeReference );
2748 public final GraphParser.basicType_return basicType() throws RecognitionException {
2749 GraphParser.basicType_return retval = new GraphParser.basicType_return();
2750 retval.start = input.LT(1);
2752 CommonTree root_0 = null;
2754 GraphParser.tupleType_return tupleType69 = null;
2756 GraphParser.recordType_return recordType70 = null;
2758 GraphParser.typeReference_return typeReference71 = null;
2763 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:329:5: ( tupleType | recordType | typeReference )
2765 switch ( input.LA(1) ) {
2782 if (state.backtracking>0) {state.failed=true; return retval;}
2783 NoViableAltException nvae =
2784 new NoViableAltException("", 25, 0, input);
2791 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:329:7: tupleType
2793 root_0 = (CommonTree)adaptor.nil();
2795 pushFollow(FOLLOW_tupleType_in_basicType2181);
2796 tupleType69=tupleType();
2799 if (state.failed) return retval;
2800 if ( state.backtracking==0 ) adaptor.addChild(root_0, tupleType69.getTree());
2805 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:330:7: recordType
2807 root_0 = (CommonTree)adaptor.nil();
2809 pushFollow(FOLLOW_recordType_in_basicType2189);
2810 recordType70=recordType();
2813 if (state.failed) return retval;
2814 if ( state.backtracking==0 ) adaptor.addChild(root_0, recordType70.getTree());
2819 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:331:7: typeReference
2821 root_0 = (CommonTree)adaptor.nil();
2823 pushFollow(FOLLOW_typeReference_in_basicType2197);
2824 typeReference71=typeReference();
2827 if (state.failed) return retval;
2828 if ( state.backtracking==0 ) adaptor.addChild(root_0, typeReference71.getTree());
2834 retval.stop = input.LT(-1);
2836 if ( state.backtracking==0 ) {
2838 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
2839 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
2842 catch (RecognitionException re) {
2845 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
2852 // $ANTLR end "basicType"
2854 public static class tupleType_return extends ParserRuleReturnScope {
2856 public Object getTree() { return tree; }
2859 // $ANTLR start "tupleType"
2860 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:334:1: tupleType : LPAREN ( type ( ',' type )* )? RPAREN -> ^( TUPLE_TYPE ( type )* ) ;
2861 public final GraphParser.tupleType_return tupleType() throws RecognitionException {
2862 GraphParser.tupleType_return retval = new GraphParser.tupleType_return();
2863 retval.start = input.LT(1);
2865 CommonTree root_0 = null;
2867 Token LPAREN72=null;
2868 Token char_literal74=null;
2869 Token RPAREN76=null;
2870 GraphParser.type_return type73 = null;
2872 GraphParser.type_return type75 = null;
2875 CommonTree LPAREN72_tree=null;
2876 CommonTree char_literal74_tree=null;
2877 CommonTree RPAREN76_tree=null;
2878 RewriteRuleTokenStream stream_78=new RewriteRuleTokenStream(adaptor,"token 78");
2879 RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
2880 RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
2881 RewriteRuleSubtreeStream stream_type=new RewriteRuleSubtreeStream(adaptor,"rule type");
2883 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:335:5: ( LPAREN ( type ( ',' type )* )? RPAREN -> ^( TUPLE_TYPE ( type )* ) )
2884 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:335:7: LPAREN ( type ( ',' type )* )? RPAREN
2886 LPAREN72=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_tupleType2219); if (state.failed) return retval;
2887 if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN72);
2889 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:335:14: ( type ( ',' type )* )?
2891 int LA27_0 = input.LA(1);
2893 if ( (LA27_0==ID||LA27_0==LPAREN||LA27_0==LCURLY||LA27_0==77) ) {
2898 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:335:15: type ( ',' type )*
2900 pushFollow(FOLLOW_type_in_tupleType2222);
2904 if (state.failed) return retval;
2905 if ( state.backtracking==0 ) stream_type.add(type73.getTree());
2906 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:335:20: ( ',' type )*
2910 int LA26_0 = input.LA(1);
2912 if ( (LA26_0==78) ) {
2919 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:335:21: ',' type
2921 char_literal74=(Token)match(input,78,FOLLOW_78_in_tupleType2225); if (state.failed) return retval;
2922 if ( state.backtracking==0 ) stream_78.add(char_literal74);
2924 pushFollow(FOLLOW_type_in_tupleType2227);
2928 if (state.failed) return retval;
2929 if ( state.backtracking==0 ) stream_type.add(type75.getTree());
2945 RPAREN76=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_tupleType2233); if (state.failed) return retval;
2946 if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN76);
2953 // rule labels: retval
2954 // token list labels:
2955 // rule list labels:
2957 if ( state.backtracking==0 ) {
2958 retval.tree = root_0;
2959 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
2961 root_0 = (CommonTree)adaptor.nil();
2962 // 336:5: -> ^( TUPLE_TYPE ( type )* )
2964 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:336:8: ^( TUPLE_TYPE ( type )* )
2966 CommonTree root_1 = (CommonTree)adaptor.nil();
2967 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TUPLE_TYPE, "TUPLE_TYPE"), root_1);
2969 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:336:21: ( type )*
2970 while ( stream_type.hasNext() ) {
2971 adaptor.addChild(root_1, stream_type.nextTree());
2974 stream_type.reset();
2976 adaptor.addChild(root_0, root_1);
2981 retval.tree = root_0;}
2984 retval.stop = input.LT(-1);
2986 if ( state.backtracking==0 ) {
2988 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
2989 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
2992 catch (RecognitionException re) {
2995 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
3002 // $ANTLR end "tupleType"
3004 public static class recordType_return extends ParserRuleReturnScope {
3006 public Object getTree() { return tree; }
3009 // $ANTLR start "recordType"
3010 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:339:1: recordType : LCURLY ( component ( ',' component )* )? RCURLY -> ^( RECORD_TYPE ( component )* ) ;
3011 public final GraphParser.recordType_return recordType() throws RecognitionException {
3012 GraphParser.recordType_return retval = new GraphParser.recordType_return();
3013 retval.start = input.LT(1);
3015 CommonTree root_0 = null;
3017 Token LCURLY77=null;
3018 Token char_literal79=null;
3019 Token RCURLY81=null;
3020 GraphParser.component_return component78 = null;
3022 GraphParser.component_return component80 = null;
3025 CommonTree LCURLY77_tree=null;
3026 CommonTree char_literal79_tree=null;
3027 CommonTree RCURLY81_tree=null;
3028 RewriteRuleTokenStream stream_78=new RewriteRuleTokenStream(adaptor,"token 78");
3029 RewriteRuleTokenStream stream_LCURLY=new RewriteRuleTokenStream(adaptor,"token LCURLY");
3030 RewriteRuleTokenStream stream_RCURLY=new RewriteRuleTokenStream(adaptor,"token RCURLY");
3031 RewriteRuleSubtreeStream stream_component=new RewriteRuleSubtreeStream(adaptor,"rule component");
3033 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:340:5: ( LCURLY ( component ( ',' component )* )? RCURLY -> ^( RECORD_TYPE ( component )* ) )
3034 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:340:7: LCURLY ( component ( ',' component )* )? RCURLY
3036 LCURLY77=(Token)match(input,LCURLY,FOLLOW_LCURLY_in_recordType2266); if (state.failed) return retval;
3037 if ( state.backtracking==0 ) stream_LCURLY.add(LCURLY77);
3039 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:340:14: ( component ( ',' component )* )?
3041 int LA29_0 = input.LA(1);
3043 if ( (LA29_0==ID) ) {
3048 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:340:15: component ( ',' component )*
3050 pushFollow(FOLLOW_component_in_recordType2269);
3051 component78=component();
3054 if (state.failed) return retval;
3055 if ( state.backtracking==0 ) stream_component.add(component78.getTree());
3056 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:340:25: ( ',' component )*
3060 int LA28_0 = input.LA(1);
3062 if ( (LA28_0==78) ) {
3069 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:340:26: ',' component
3071 char_literal79=(Token)match(input,78,FOLLOW_78_in_recordType2272); if (state.failed) return retval;
3072 if ( state.backtracking==0 ) stream_78.add(char_literal79);
3074 pushFollow(FOLLOW_component_in_recordType2274);
3075 component80=component();
3078 if (state.failed) return retval;
3079 if ( state.backtracking==0 ) stream_component.add(component80.getTree());
3095 RCURLY81=(Token)match(input,RCURLY,FOLLOW_RCURLY_in_recordType2280); if (state.failed) return retval;
3096 if ( state.backtracking==0 ) stream_RCURLY.add(RCURLY81);
3101 // elements: component
3103 // rule labels: retval
3104 // token list labels:
3105 // rule list labels:
3107 if ( state.backtracking==0 ) {
3108 retval.tree = root_0;
3109 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
3111 root_0 = (CommonTree)adaptor.nil();
3112 // 341:5: -> ^( RECORD_TYPE ( component )* )
3114 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:341:8: ^( RECORD_TYPE ( component )* )
3116 CommonTree root_1 = (CommonTree)adaptor.nil();
3117 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(RECORD_TYPE, "RECORD_TYPE"), root_1);
3119 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:341:22: ( component )*
3120 while ( stream_component.hasNext() ) {
3121 adaptor.addChild(root_1, stream_component.nextTree());
3124 stream_component.reset();
3126 adaptor.addChild(root_0, root_1);
3131 retval.tree = root_0;}
3134 retval.stop = input.LT(-1);
3136 if ( state.backtracking==0 ) {
3138 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
3139 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
3142 catch (RecognitionException re) {
3145 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
3152 // $ANTLR end "recordType"
3154 public static class component_return extends ParserRuleReturnScope {
3156 public Object getTree() { return tree; }
3159 // $ANTLR start "component"
3160 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:344:1: component : ID ':' type -> ^( TYPE_COMPONENT ID type ) ;
3161 public final GraphParser.component_return component() throws RecognitionException {
3162 GraphParser.component_return retval = new GraphParser.component_return();
3163 retval.start = input.LT(1);
3165 CommonTree root_0 = null;
3168 Token char_literal83=null;
3169 GraphParser.type_return type84 = null;
3172 CommonTree ID82_tree=null;
3173 CommonTree char_literal83_tree=null;
3174 RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
3175 RewriteRuleTokenStream stream_73=new RewriteRuleTokenStream(adaptor,"token 73");
3176 RewriteRuleSubtreeStream stream_type=new RewriteRuleSubtreeStream(adaptor,"rule type");
3178 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:345:5: ( ID ':' type -> ^( TYPE_COMPONENT ID type ) )
3179 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:345:7: ID ':' type
3181 ID82=(Token)match(input,ID,FOLLOW_ID_in_component2312); if (state.failed) return retval;
3182 if ( state.backtracking==0 ) stream_ID.add(ID82);
3184 char_literal83=(Token)match(input,73,FOLLOW_73_in_component2314); if (state.failed) return retval;
3185 if ( state.backtracking==0 ) stream_73.add(char_literal83);
3187 pushFollow(FOLLOW_type_in_component2316);
3191 if (state.failed) return retval;
3192 if ( state.backtracking==0 ) stream_type.add(type84.getTree());
3196 // elements: type, ID
3198 // rule labels: retval
3199 // token list labels:
3200 // rule list labels:
3202 if ( state.backtracking==0 ) {
3203 retval.tree = root_0;
3204 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
3206 root_0 = (CommonTree)adaptor.nil();
3207 // 346:5: -> ^( TYPE_COMPONENT ID type )
3209 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:346:8: ^( TYPE_COMPONENT ID type )
3211 CommonTree root_1 = (CommonTree)adaptor.nil();
3212 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TYPE_COMPONENT, "TYPE_COMPONENT"), root_1);
3214 adaptor.addChild(root_1, stream_ID.nextNode());
3215 adaptor.addChild(root_1, stream_type.nextTree());
3217 adaptor.addChild(root_0, root_1);
3222 retval.tree = root_0;}
3225 retval.stop = input.LT(-1);
3227 if ( state.backtracking==0 ) {
3229 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
3230 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
3233 catch (RecognitionException re) {
3236 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
3243 // $ANTLR end "component"
3245 public static class typeReference_return extends ParserRuleReturnScope {
3247 public Object getTree() { return tree; }
3250 // $ANTLR start "typeReference"
3251 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:349:1: typeReference : ID ( ( LPAREN )=> LPAREN parameter ( ',' parameter )* RPAREN )? -> ^( TYPE_REFERENCE ID ( parameter )* ) ;
3252 public final GraphParser.typeReference_return typeReference() throws RecognitionException {
3253 GraphParser.typeReference_return retval = new GraphParser.typeReference_return();
3254 retval.start = input.LT(1);
3256 CommonTree root_0 = null;
3259 Token LPAREN86=null;
3260 Token char_literal88=null;
3261 Token RPAREN90=null;
3262 GraphParser.parameter_return parameter87 = null;
3264 GraphParser.parameter_return parameter89 = null;
3267 CommonTree ID85_tree=null;
3268 CommonTree LPAREN86_tree=null;
3269 CommonTree char_literal88_tree=null;
3270 CommonTree RPAREN90_tree=null;
3271 RewriteRuleTokenStream stream_78=new RewriteRuleTokenStream(adaptor,"token 78");
3272 RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
3273 RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
3274 RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
3275 RewriteRuleSubtreeStream stream_parameter=new RewriteRuleSubtreeStream(adaptor,"rule parameter");
3277 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:350:5: ( ID ( ( LPAREN )=> LPAREN parameter ( ',' parameter )* RPAREN )? -> ^( TYPE_REFERENCE ID ( parameter )* ) )
3278 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:350:7: ID ( ( LPAREN )=> LPAREN parameter ( ',' parameter )* RPAREN )?
3280 ID85=(Token)match(input,ID,FOLLOW_ID_in_typeReference2350); if (state.failed) return retval;
3281 if ( state.backtracking==0 ) stream_ID.add(ID85);
3283 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:350:10: ( ( LPAREN )=> LPAREN parameter ( ',' parameter )* RPAREN )?
3285 alt31 = dfa31.predict(input);
3288 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:350:11: ( LPAREN )=> LPAREN parameter ( ',' parameter )* RPAREN
3290 LPAREN86=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_typeReference2358); if (state.failed) return retval;
3291 if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN86);
3293 pushFollow(FOLLOW_parameter_in_typeReference2360);
3294 parameter87=parameter();
3297 if (state.failed) return retval;
3298 if ( state.backtracking==0 ) stream_parameter.add(parameter87.getTree());
3299 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:350:39: ( ',' parameter )*
3303 int LA30_0 = input.LA(1);
3305 if ( (LA30_0==78) ) {
3312 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:350:40: ',' parameter
3314 char_literal88=(Token)match(input,78,FOLLOW_78_in_typeReference2363); if (state.failed) return retval;
3315 if ( state.backtracking==0 ) stream_78.add(char_literal88);
3317 pushFollow(FOLLOW_parameter_in_typeReference2365);
3318 parameter89=parameter();
3321 if (state.failed) return retval;
3322 if ( state.backtracking==0 ) stream_parameter.add(parameter89.getTree());
3332 RPAREN90=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_typeReference2369); if (state.failed) return retval;
3333 if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN90);
3344 // elements: ID, parameter
3346 // rule labels: retval
3347 // token list labels:
3348 // rule list labels:
3350 if ( state.backtracking==0 ) {
3351 retval.tree = root_0;
3352 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
3354 root_0 = (CommonTree)adaptor.nil();
3355 // 351:5: -> ^( TYPE_REFERENCE ID ( parameter )* )
3357 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:351:8: ^( TYPE_REFERENCE ID ( parameter )* )
3359 CommonTree root_1 = (CommonTree)adaptor.nil();
3360 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TYPE_REFERENCE, "TYPE_REFERENCE"), root_1);
3362 adaptor.addChild(root_1, stream_ID.nextNode());
3363 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:351:28: ( parameter )*
3364 while ( stream_parameter.hasNext() ) {
3365 adaptor.addChild(root_1, stream_parameter.nextTree());
3368 stream_parameter.reset();
3370 adaptor.addChild(root_0, root_1);
3375 retval.tree = root_0;}
3378 retval.stop = input.LT(-1);
3380 if ( state.backtracking==0 ) {
3382 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
3383 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
3386 catch (RecognitionException re) {
3389 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
3396 // $ANTLR end "typeReference"
3398 public static class parameter_return extends ParserRuleReturnScope {
3400 public Object getTree() { return tree; }
3403 // $ANTLR start "parameter"
3404 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:354:1: parameter : ( ID '=' parameterValue -> ^( TYPE_ANNOTATION ID parameterValue ) | type );
3405 public final GraphParser.parameter_return parameter() throws RecognitionException {
3406 GraphParser.parameter_return retval = new GraphParser.parameter_return();
3407 retval.start = input.LT(1);
3409 CommonTree root_0 = null;
3412 Token char_literal92=null;
3413 GraphParser.parameterValue_return parameterValue93 = null;
3415 GraphParser.type_return type94 = null;
3418 CommonTree ID91_tree=null;
3419 CommonTree char_literal92_tree=null;
3420 RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
3421 RewriteRuleTokenStream stream_74=new RewriteRuleTokenStream(adaptor,"token 74");
3422 RewriteRuleSubtreeStream stream_parameterValue=new RewriteRuleSubtreeStream(adaptor,"rule parameterValue");
3424 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:355:5: ( ID '=' parameterValue -> ^( TYPE_ANNOTATION ID parameterValue ) | type )
3426 int LA32_0 = input.LA(1);
3428 if ( (LA32_0==ID) ) {
3429 int LA32_1 = input.LA(2);
3431 if ( (LA32_1==74) ) {
3434 else if ( ((LA32_1>=LPAREN && LA32_1<=LBRACKET)||LA32_1==78) ) {
3438 if (state.backtracking>0) {state.failed=true; return retval;}
3439 NoViableAltException nvae =
3440 new NoViableAltException("", 32, 1, input);
3445 else if ( (LA32_0==LPAREN||LA32_0==LCURLY||LA32_0==77) ) {
3449 if (state.backtracking>0) {state.failed=true; return retval;}
3450 NoViableAltException nvae =
3451 new NoViableAltException("", 32, 0, input);
3457 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:355:7: ID '=' parameterValue
3459 ID91=(Token)match(input,ID,FOLLOW_ID_in_parameter2405); if (state.failed) return retval;
3460 if ( state.backtracking==0 ) stream_ID.add(ID91);
3462 char_literal92=(Token)match(input,74,FOLLOW_74_in_parameter2407); if (state.failed) return retval;
3463 if ( state.backtracking==0 ) stream_74.add(char_literal92);
3465 pushFollow(FOLLOW_parameterValue_in_parameter2409);
3466 parameterValue93=parameterValue();
3469 if (state.failed) return retval;
3470 if ( state.backtracking==0 ) stream_parameterValue.add(parameterValue93.getTree());
3474 // elements: ID, parameterValue
3476 // rule labels: retval
3477 // token list labels:
3478 // rule list labels:
3480 if ( state.backtracking==0 ) {
3481 retval.tree = root_0;
3482 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
3484 root_0 = (CommonTree)adaptor.nil();
3485 // 355:29: -> ^( TYPE_ANNOTATION ID parameterValue )
3487 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:355:32: ^( TYPE_ANNOTATION ID parameterValue )
3489 CommonTree root_1 = (CommonTree)adaptor.nil();
3490 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TYPE_ANNOTATION, "TYPE_ANNOTATION"), root_1);
3492 adaptor.addChild(root_1, stream_ID.nextNode());
3493 adaptor.addChild(root_1, stream_parameterValue.nextTree());
3495 adaptor.addChild(root_0, root_1);
3500 retval.tree = root_0;}
3504 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:356:7: type
3506 root_0 = (CommonTree)adaptor.nil();
3508 pushFollow(FOLLOW_type_in_parameter2427);
3512 if (state.failed) return retval;
3513 if ( state.backtracking==0 ) adaptor.addChild(root_0, type94.getTree());
3519 retval.stop = input.LT(-1);
3521 if ( state.backtracking==0 ) {
3523 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
3524 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
3527 catch (RecognitionException re) {
3530 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
3537 // $ANTLR end "parameter"
3539 public static class parameterValue_return extends ParserRuleReturnScope {
3541 public Object getTree() { return tree; }
3544 // $ANTLR start "parameterValue"
3545 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:359:1: parameterValue : ( string | boolean_ | number | rangePar -> ^( RANGE rangePar ) );
3546 public final GraphParser.parameterValue_return parameterValue() throws RecognitionException {
3547 GraphParser.parameterValue_return retval = new GraphParser.parameterValue_return();
3548 retval.start = input.LT(1);
3550 CommonTree root_0 = null;
3552 GraphParser.string_return string95 = null;
3554 GraphParser.boolean__return boolean_96 = null;
3556 GraphParser.number_return number97 = null;
3558 GraphParser.rangePar_return rangePar98 = null;
3561 RewriteRuleSubtreeStream stream_rangePar=new RewriteRuleSubtreeStream(adaptor,"rule rangePar");
3563 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:360:5: ( string | boolean_ | number | rangePar -> ^( RANGE rangePar ) )
3565 switch ( input.LA(1) ) {
3590 if (state.backtracking>0) {state.failed=true; return retval;}
3591 NoViableAltException nvae =
3592 new NoViableAltException("", 33, 0, input);
3599 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:360:7: string
3601 root_0 = (CommonTree)adaptor.nil();
3603 pushFollow(FOLLOW_string_in_parameterValue2446);
3607 if (state.failed) return retval;
3608 if ( state.backtracking==0 ) adaptor.addChild(root_0, string95.getTree());
3613 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:361:7: boolean_
3615 root_0 = (CommonTree)adaptor.nil();
3617 pushFollow(FOLLOW_boolean__in_parameterValue2454);
3618 boolean_96=boolean_();
3621 if (state.failed) return retval;
3622 if ( state.backtracking==0 ) adaptor.addChild(root_0, boolean_96.getTree());
3627 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:362:7: number
3629 root_0 = (CommonTree)adaptor.nil();
3631 pushFollow(FOLLOW_number_in_parameterValue2462);
3635 if (state.failed) return retval;
3636 if ( state.backtracking==0 ) adaptor.addChild(root_0, number97.getTree());
3641 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:363:7: rangePar
3643 pushFollow(FOLLOW_rangePar_in_parameterValue2470);
3644 rangePar98=rangePar();
3647 if (state.failed) return retval;
3648 if ( state.backtracking==0 ) stream_rangePar.add(rangePar98.getTree());
3652 // elements: rangePar
3654 // rule labels: retval
3655 // token list labels:
3656 // rule list labels:
3658 if ( state.backtracking==0 ) {
3659 retval.tree = root_0;
3660 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
3662 root_0 = (CommonTree)adaptor.nil();
3663 // 363:16: -> ^( RANGE rangePar )
3665 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:363:19: ^( RANGE rangePar )
3667 CommonTree root_1 = (CommonTree)adaptor.nil();
3668 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(RANGE, "RANGE"), root_1);
3670 adaptor.addChild(root_1, stream_rangePar.nextTree());
3672 adaptor.addChild(root_0, root_1);
3677 retval.tree = root_0;}
3682 retval.stop = input.LT(-1);
3684 if ( state.backtracking==0 ) {
3686 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
3687 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
3690 catch (RecognitionException re) {
3693 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
3700 // $ANTLR end "parameterValue"
3702 public static class rangePar_return extends ParserRuleReturnScope {
3704 public Object getTree() { return tree; }
3707 // $ANTLR start "rangePar"
3708 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:366:1: rangePar : ( LBRACKET | LPAREN ) range ( RBRACKET | RPAREN ) ;
3709 public final GraphParser.rangePar_return rangePar() throws RecognitionException {
3710 GraphParser.rangePar_return retval = new GraphParser.rangePar_return();
3711 retval.start = input.LT(1);
3713 CommonTree root_0 = null;
3717 GraphParser.range_return range100 = null;
3720 CommonTree set99_tree=null;
3721 CommonTree set101_tree=null;
3724 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:366:10: ( ( LBRACKET | LPAREN ) range ( RBRACKET | RPAREN ) )
3725 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:366:12: ( LBRACKET | LPAREN ) range ( RBRACKET | RPAREN )
3727 root_0 = (CommonTree)adaptor.nil();
3729 set99=(Token)input.LT(1);
3730 if ( input.LA(1)==LPAREN||input.LA(1)==LBRACKET ) {
3732 if ( state.backtracking==0 ) adaptor.addChild(root_0, (CommonTree)adaptor.create(set99));
3733 state.errorRecovery=false;state.failed=false;
3736 if (state.backtracking>0) {state.failed=true; return retval;}
3737 MismatchedSetException mse = new MismatchedSetException(null,input);
3741 pushFollow(FOLLOW_range_in_rangePar2507);
3745 if (state.failed) return retval;
3746 if ( state.backtracking==0 ) adaptor.addChild(root_0, range100.getTree());
3747 set101=(Token)input.LT(1);
3748 if ( input.LA(1)==RPAREN||input.LA(1)==RBRACKET ) {
3750 if ( state.backtracking==0 ) adaptor.addChild(root_0, (CommonTree)adaptor.create(set101));
3751 state.errorRecovery=false;state.failed=false;
3754 if (state.backtracking>0) {state.failed=true; return retval;}
3755 MismatchedSetException mse = new MismatchedSetException(null,input);
3762 retval.stop = input.LT(-1);
3764 if ( state.backtracking==0 ) {
3766 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
3767 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
3770 catch (RecognitionException re) {
3773 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
3780 // $ANTLR end "rangePar"
3782 public static class range_return extends ParserRuleReturnScope {
3784 public Object getTree() { return tree; }
3787 // $ANTLR start "range"
3788 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:368:1: range : ( number | RANGE | INT_RANGE );
3789 public final GraphParser.range_return range() throws RecognitionException {
3790 GraphParser.range_return retval = new GraphParser.range_return();
3791 retval.start = input.LT(1);
3793 CommonTree root_0 = null;
3795 Token RANGE103=null;
3796 Token INT_RANGE104=null;
3797 GraphParser.number_return number102 = null;
3800 CommonTree RANGE103_tree=null;
3801 CommonTree INT_RANGE104_tree=null;
3804 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:369:5: ( number | RANGE | INT_RANGE )
3806 switch ( input.LA(1) ) {
3824 if (state.backtracking>0) {state.failed=true; return retval;}
3825 NoViableAltException nvae =
3826 new NoViableAltException("", 34, 0, input);
3833 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:369:7: number
3835 root_0 = (CommonTree)adaptor.nil();
3837 pushFollow(FOLLOW_number_in_range2536);
3841 if (state.failed) return retval;
3842 if ( state.backtracking==0 ) adaptor.addChild(root_0, number102.getTree());
3847 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:370:7: RANGE
3849 root_0 = (CommonTree)adaptor.nil();
3851 RANGE103=(Token)match(input,RANGE,FOLLOW_RANGE_in_range2544); if (state.failed) return retval;
3852 if ( state.backtracking==0 ) {
3853 RANGE103_tree = (CommonTree)adaptor.create(RANGE103);
3854 adaptor.addChild(root_0, RANGE103_tree);
3860 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:371:7: INT_RANGE
3862 root_0 = (CommonTree)adaptor.nil();
3864 INT_RANGE104=(Token)match(input,INT_RANGE,FOLLOW_INT_RANGE_in_range2552); if (state.failed) return retval;
3865 if ( state.backtracking==0 ) {
3866 INT_RANGE104_tree = (CommonTree)adaptor.create(INT_RANGE104);
3867 adaptor.addChild(root_0, INT_RANGE104_tree);
3874 retval.stop = input.LT(-1);
3876 if ( state.backtracking==0 ) {
3878 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
3879 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
3882 catch (RecognitionException re) {
3885 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
3892 // $ANTLR end "range"
3894 public static class number_return extends ParserRuleReturnScope {
3896 public Object getTree() { return tree; }
3899 // $ANTLR start "number"
3900 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:374:1: number : ( INT | FLOAT );
3901 public final GraphParser.number_return number() throws RecognitionException {
3902 GraphParser.number_return retval = new GraphParser.number_return();
3903 retval.start = input.LT(1);
3905 CommonTree root_0 = null;
3909 CommonTree set105_tree=null;
3912 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:375:5: ( INT | FLOAT )
3913 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:
3915 root_0 = (CommonTree)adaptor.nil();
3917 set105=(Token)input.LT(1);
3918 if ( input.LA(1)==INT||input.LA(1)==FLOAT ) {
3920 if ( state.backtracking==0 ) adaptor.addChild(root_0, (CommonTree)adaptor.create(set105));
3921 state.errorRecovery=false;state.failed=false;
3924 if (state.backtracking>0) {state.failed=true; return retval;}
3925 MismatchedSetException mse = new MismatchedSetException(null,input);
3932 retval.stop = input.LT(-1);
3934 if ( state.backtracking==0 ) {
3936 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
3937 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
3940 catch (RecognitionException re) {
3943 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
3950 // $ANTLR end "number"
3952 public static class string_return extends ParserRuleReturnScope {
3954 public Object getTree() { return tree; }
3957 // $ANTLR start "string"
3958 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:379:1: string : STRING ;
3959 public final GraphParser.string_return string() throws RecognitionException {
3960 GraphParser.string_return retval = new GraphParser.string_return();
3961 retval.start = input.LT(1);
3963 CommonTree root_0 = null;
3965 Token STRING106=null;
3967 CommonTree STRING106_tree=null;
3970 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:380:5: ( STRING )
3971 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:380:7: STRING
3973 root_0 = (CommonTree)adaptor.nil();
3975 STRING106=(Token)match(input,STRING,FOLLOW_STRING_in_string2606); if (state.failed) return retval;
3976 if ( state.backtracking==0 ) {
3977 STRING106_tree = (CommonTree)adaptor.create(STRING106);
3978 adaptor.addChild(root_0, STRING106_tree);
3983 retval.stop = input.LT(-1);
3985 if ( state.backtracking==0 ) {
3987 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
3988 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
3991 catch (RecognitionException re) {
3994 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
4001 // $ANTLR end "string"
4003 public static class boolean__return extends ParserRuleReturnScope {
4005 public Object getTree() { return tree; }
4008 // $ANTLR start "boolean_"
4009 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:383:1: boolean_ : ( 'true' -> TRUE | 'false' -> FALSE );
4010 public final GraphParser.boolean__return boolean_() throws RecognitionException {
4011 GraphParser.boolean__return retval = new GraphParser.boolean__return();
4012 retval.start = input.LT(1);
4014 CommonTree root_0 = null;
4016 Token string_literal107=null;
4017 Token string_literal108=null;
4019 CommonTree string_literal107_tree=null;
4020 CommonTree string_literal108_tree=null;
4021 RewriteRuleTokenStream stream_79=new RewriteRuleTokenStream(adaptor,"token 79");
4022 RewriteRuleTokenStream stream_80=new RewriteRuleTokenStream(adaptor,"token 80");
4025 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:384:5: ( 'true' -> TRUE | 'false' -> FALSE )
4027 int LA35_0 = input.LA(1);
4029 if ( (LA35_0==79) ) {
4032 else if ( (LA35_0==80) ) {
4036 if (state.backtracking>0) {state.failed=true; return retval;}
4037 NoViableAltException nvae =
4038 new NoViableAltException("", 35, 0, input);
4044 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:384:7: 'true'
4046 string_literal107=(Token)match(input,79,FOLLOW_79_in_boolean_2627); if (state.failed) return retval;
4047 if ( state.backtracking==0 ) stream_79.add(string_literal107);
4054 // rule labels: retval
4055 // token list labels:
4056 // rule list labels:
4058 if ( state.backtracking==0 ) {
4059 retval.tree = root_0;
4060 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
4062 root_0 = (CommonTree)adaptor.nil();
4065 adaptor.addChild(root_0, (CommonTree)adaptor.create(TRUE, "TRUE"));
4069 retval.tree = root_0;}
4073 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:385:7: 'false'
4075 string_literal108=(Token)match(input,80,FOLLOW_80_in_boolean_2639); if (state.failed) return retval;
4076 if ( state.backtracking==0 ) stream_80.add(string_literal108);
4083 // rule labels: retval
4084 // token list labels:
4085 // rule list labels:
4087 if ( state.backtracking==0 ) {
4088 retval.tree = root_0;
4089 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
4091 root_0 = (CommonTree)adaptor.nil();
4094 adaptor.addChild(root_0, (CommonTree)adaptor.create(FALSE, "FALSE"));
4098 retval.tree = root_0;}
4103 retval.stop = input.LT(-1);
4105 if ( state.backtracking==0 ) {
4107 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
4108 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
4111 catch (RecognitionException re) {
4114 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
4121 // $ANTLR end "boolean_"
4123 public static class valueDefinitions_return extends ParserRuleReturnScope {
4125 public Object getTree() { return tree; }
4128 // $ANTLR start "valueDefinitions"
4129 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:392:1: valueDefinitions : ( valueDefinition )* -> ^( VALUE_DEFINITIONS ( valueDefinition )* ) ;
4130 public final GraphParser.valueDefinitions_return valueDefinitions() throws RecognitionException {
4131 GraphParser.valueDefinitions_return retval = new GraphParser.valueDefinitions_return();
4132 retval.start = input.LT(1);
4134 CommonTree root_0 = null;
4136 GraphParser.valueDefinition_return valueDefinition109 = null;
4139 RewriteRuleSubtreeStream stream_valueDefinition=new RewriteRuleSubtreeStream(adaptor,"rule valueDefinition");
4141 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:392:18: ( ( valueDefinition )* -> ^( VALUE_DEFINITIONS ( valueDefinition )* ) )
4142 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:392:20: ( valueDefinition )*
4144 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:392:20: ( valueDefinition )*
4148 int LA36_0 = input.LA(1);
4150 if ( (LA36_0==ID) ) {
4157 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:392:20: valueDefinition
4159 pushFollow(FOLLOW_valueDefinition_in_valueDefinitions2660);
4160 valueDefinition109=valueDefinition();
4163 if (state.failed) return retval;
4164 if ( state.backtracking==0 ) stream_valueDefinition.add(valueDefinition109.getTree());
4177 // elements: valueDefinition
4179 // rule labels: retval
4180 // token list labels:
4181 // rule list labels:
4183 if ( state.backtracking==0 ) {
4184 retval.tree = root_0;
4185 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
4187 root_0 = (CommonTree)adaptor.nil();
4188 // 392:37: -> ^( VALUE_DEFINITIONS ( valueDefinition )* )
4190 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:392:40: ^( VALUE_DEFINITIONS ( valueDefinition )* )
4192 CommonTree root_1 = (CommonTree)adaptor.nil();
4193 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(VALUE_DEFINITIONS, "VALUE_DEFINITIONS"), root_1);
4195 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:392:60: ( valueDefinition )*
4196 while ( stream_valueDefinition.hasNext() ) {
4197 adaptor.addChild(root_1, stream_valueDefinition.nextTree());
4200 stream_valueDefinition.reset();
4202 adaptor.addChild(root_0, root_1);
4207 retval.tree = root_0;}
4210 retval.stop = input.LT(-1);
4212 if ( state.backtracking==0 ) {
4214 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
4215 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
4218 catch (RecognitionException re) {
4221 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
4228 // $ANTLR end "valueDefinitions"
4230 public static class valueDefinition_return extends ParserRuleReturnScope {
4232 public Object getTree() { return tree; }
4235 // $ANTLR start "valueDefinition"
4236 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:394:1: valueDefinition : ID ':' type '=' value -> ^( VALUE_DEFINITION ID type value ) ;
4237 public final GraphParser.valueDefinition_return valueDefinition() throws RecognitionException {
4238 GraphParser.valueDefinition_return retval = new GraphParser.valueDefinition_return();
4239 retval.start = input.LT(1);
4241 CommonTree root_0 = null;
4244 Token char_literal111=null;
4245 Token char_literal113=null;
4246 GraphParser.type_return type112 = null;
4248 GraphParser.value_return value114 = null;
4251 CommonTree ID110_tree=null;
4252 CommonTree char_literal111_tree=null;
4253 CommonTree char_literal113_tree=null;
4254 RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
4255 RewriteRuleTokenStream stream_73=new RewriteRuleTokenStream(adaptor,"token 73");
4256 RewriteRuleTokenStream stream_74=new RewriteRuleTokenStream(adaptor,"token 74");
4257 RewriteRuleSubtreeStream stream_value=new RewriteRuleSubtreeStream(adaptor,"rule value");
4258 RewriteRuleSubtreeStream stream_type=new RewriteRuleSubtreeStream(adaptor,"rule type");
4260 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:395:5: ( ID ':' type '=' value -> ^( VALUE_DEFINITION ID type value ) )
4261 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:395:7: ID ':' type '=' value
4263 ID110=(Token)match(input,ID,FOLLOW_ID_in_valueDefinition2683); if (state.failed) return retval;
4264 if ( state.backtracking==0 ) stream_ID.add(ID110);
4266 char_literal111=(Token)match(input,73,FOLLOW_73_in_valueDefinition2685); if (state.failed) return retval;
4267 if ( state.backtracking==0 ) stream_73.add(char_literal111);
4269 pushFollow(FOLLOW_type_in_valueDefinition2687);
4273 if (state.failed) return retval;
4274 if ( state.backtracking==0 ) stream_type.add(type112.getTree());
4275 char_literal113=(Token)match(input,74,FOLLOW_74_in_valueDefinition2689); if (state.failed) return retval;
4276 if ( state.backtracking==0 ) stream_74.add(char_literal113);
4278 pushFollow(FOLLOW_value_in_valueDefinition2691);
4282 if (state.failed) return retval;
4283 if ( state.backtracking==0 ) stream_value.add(value114.getTree());
4287 // elements: value, type, ID
4289 // rule labels: retval
4290 // token list labels:
4291 // rule list labels:
4293 if ( state.backtracking==0 ) {
4294 retval.tree = root_0;
4295 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
4297 root_0 = (CommonTree)adaptor.nil();
4298 // 396:5: -> ^( VALUE_DEFINITION ID type value )
4300 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:396:8: ^( VALUE_DEFINITION ID type value )
4302 CommonTree root_1 = (CommonTree)adaptor.nil();
4303 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(VALUE_DEFINITION, "VALUE_DEFINITION"), root_1);
4305 adaptor.addChild(root_1, stream_ID.nextNode());
4306 adaptor.addChild(root_1, stream_type.nextTree());
4307 adaptor.addChild(root_1, stream_value.nextTree());
4309 adaptor.addChild(root_0, root_1);
4314 retval.tree = root_0;}
4317 retval.stop = input.LT(-1);
4319 if ( state.backtracking==0 ) {
4321 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
4322 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
4325 catch (RecognitionException re) {
4328 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
4335 // $ANTLR end "valueDefinition"
4337 public static class value_return extends ParserRuleReturnScope {
4339 public Object getTree() { return tree; }
4342 // $ANTLR start "value"
4343 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:399:1: value : ( basicValue -> basicValue ) ( ':' type -> ^( VARIANT type $value) )* ;
4344 public final GraphParser.value_return value() throws RecognitionException {
4345 GraphParser.value_return retval = new GraphParser.value_return();
4346 retval.start = input.LT(1);
4348 CommonTree root_0 = null;
4350 Token char_literal116=null;
4351 GraphParser.basicValue_return basicValue115 = null;
4353 GraphParser.type_return type117 = null;
4356 CommonTree char_literal116_tree=null;
4357 RewriteRuleTokenStream stream_73=new RewriteRuleTokenStream(adaptor,"token 73");
4358 RewriteRuleSubtreeStream stream_basicValue=new RewriteRuleSubtreeStream(adaptor,"rule basicValue");
4359 RewriteRuleSubtreeStream stream_type=new RewriteRuleSubtreeStream(adaptor,"rule type");
4361 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:400:5: ( ( basicValue -> basicValue ) ( ':' type -> ^( VARIANT type $value) )* )
4362 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:400:7: ( basicValue -> basicValue ) ( ':' type -> ^( VARIANT type $value) )*
4364 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:400:7: ( basicValue -> basicValue )
4365 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:400:8: basicValue
4367 pushFollow(FOLLOW_basicValue_in_value2727);
4368 basicValue115=basicValue();
4371 if (state.failed) return retval;
4372 if ( state.backtracking==0 ) stream_basicValue.add(basicValue115.getTree());
4376 // elements: basicValue
4378 // rule labels: retval
4379 // token list labels:
4380 // rule list labels:
4382 if ( state.backtracking==0 ) {
4383 retval.tree = root_0;
4384 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
4386 root_0 = (CommonTree)adaptor.nil();
4387 // 400:19: -> basicValue
4389 adaptor.addChild(root_0, stream_basicValue.nextTree());
4393 retval.tree = root_0;}
4396 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:401:7: ( ':' type -> ^( VARIANT type $value) )*
4400 int LA37_0 = input.LA(1);
4402 if ( (LA37_0==73) ) {
4409 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:401:8: ':' type
4411 char_literal116=(Token)match(input,73,FOLLOW_73_in_value2741); if (state.failed) return retval;
4412 if ( state.backtracking==0 ) stream_73.add(char_literal116);
4414 pushFollow(FOLLOW_type_in_value2743);
4418 if (state.failed) return retval;
4419 if ( state.backtracking==0 ) stream_type.add(type117.getTree());
4423 // elements: value, type
4425 // rule labels: retval
4426 // token list labels:
4427 // rule list labels:
4429 if ( state.backtracking==0 ) {
4430 retval.tree = root_0;
4431 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
4433 root_0 = (CommonTree)adaptor.nil();
4434 // 401:17: -> ^( VARIANT type $value)
4436 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:401:20: ^( VARIANT type $value)
4438 CommonTree root_1 = (CommonTree)adaptor.nil();
4439 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(VARIANT, "VARIANT"), root_1);
4441 adaptor.addChild(root_1, stream_type.nextTree());
4442 adaptor.addChild(root_1, stream_retval.nextTree());
4444 adaptor.addChild(root_0, root_1);
4449 retval.tree = root_0;}
4461 retval.stop = input.LT(-1);
4463 if ( state.backtracking==0 ) {
4465 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
4466 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
4469 catch (RecognitionException re) {
4472 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
4479 // $ANTLR end "value"
4481 public static class basicValue_return extends ParserRuleReturnScope {
4483 public Object getTree() { return tree; }
4486 // $ANTLR start "basicValue"
4487 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:404:1: basicValue : ( simpleValue | map | {...}? ID -> NO_VALUE | taggedValue );
4488 public final GraphParser.basicValue_return basicValue() throws RecognitionException {
4489 GraphParser.basicValue_return retval = new GraphParser.basicValue_return();
4490 retval.start = input.LT(1);
4492 CommonTree root_0 = null;
4495 GraphParser.simpleValue_return simpleValue118 = null;
4497 GraphParser.map_return map119 = null;
4499 GraphParser.taggedValue_return taggedValue121 = null;
4502 CommonTree ID120_tree=null;
4503 RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
4506 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:405:5: ( simpleValue | map | {...}? ID -> NO_VALUE | taggedValue )
4508 int LA38_0 = input.LA(1);
4510 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)) ) {
4513 else if ( (LA38_0==ID) ) {
4514 int LA38_2 = input.LA(2);
4516 if ( (LA38_2==LCURLY) && ((input.LT(1).getText().equals("map")))) {
4519 else if ( ((input.LT(1).getText().equals("null"))) ) {
4522 else if ( (true) ) {
4526 if (state.backtracking>0) {state.failed=true; return retval;}
4527 NoViableAltException nvae =
4528 new NoViableAltException("", 38, 2, input);
4534 if (state.backtracking>0) {state.failed=true; return retval;}
4535 NoViableAltException nvae =
4536 new NoViableAltException("", 38, 0, input);
4542 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:405:7: simpleValue
4544 root_0 = (CommonTree)adaptor.nil();
4546 pushFollow(FOLLOW_simpleValue_in_basicValue2775);
4547 simpleValue118=simpleValue();
4550 if (state.failed) return retval;
4551 if ( state.backtracking==0 ) adaptor.addChild(root_0, simpleValue118.getTree());
4556 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:406:7: map
4558 root_0 = (CommonTree)adaptor.nil();
4560 pushFollow(FOLLOW_map_in_basicValue2783);
4564 if (state.failed) return retval;
4565 if ( state.backtracking==0 ) adaptor.addChild(root_0, map119.getTree());
4570 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:407:7: {...}? ID
4572 if ( !((input.LT(1).getText().equals("null"))) ) {
4573 if (state.backtracking>0) {state.failed=true; return retval;}
4574 throw new FailedPredicateException(input, "basicValue", "input.LT(1).getText().equals(\"null\")");
4576 ID120=(Token)match(input,ID,FOLLOW_ID_in_basicValue2793); if (state.failed) return retval;
4577 if ( state.backtracking==0 ) stream_ID.add(ID120);
4584 // rule labels: retval
4585 // token list labels:
4586 // rule list labels:
4588 if ( state.backtracking==0 ) {
4589 retval.tree = root_0;
4590 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
4592 root_0 = (CommonTree)adaptor.nil();
4593 // 407:50: -> NO_VALUE
4595 adaptor.addChild(root_0, (CommonTree)adaptor.create(NO_VALUE, "NO_VALUE"));
4599 retval.tree = root_0;}
4603 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:408:7: taggedValue
4605 root_0 = (CommonTree)adaptor.nil();
4607 pushFollow(FOLLOW_taggedValue_in_basicValue2805);
4608 taggedValue121=taggedValue();
4611 if (state.failed) return retval;
4612 if ( state.backtracking==0 ) adaptor.addChild(root_0, taggedValue121.getTree());
4618 retval.stop = input.LT(-1);
4620 if ( state.backtracking==0 ) {
4622 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
4623 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
4626 catch (RecognitionException re) {
4629 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
4636 // $ANTLR end "basicValue"
4638 public static class simpleValue_return extends ParserRuleReturnScope {
4640 public Object getTree() { return tree; }
4643 // $ANTLR start "simpleValue"
4644 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:411:1: simpleValue : ( string | number | boolean_ | array | tuple | record );
4645 public final GraphParser.simpleValue_return simpleValue() throws RecognitionException {
4646 GraphParser.simpleValue_return retval = new GraphParser.simpleValue_return();
4647 retval.start = input.LT(1);
4649 CommonTree root_0 = null;
4651 GraphParser.string_return string122 = null;
4653 GraphParser.number_return number123 = null;
4655 GraphParser.boolean__return boolean_124 = null;
4657 GraphParser.array_return array125 = null;
4659 GraphParser.tuple_return tuple126 = null;
4661 GraphParser.record_return record127 = null;
4666 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:412:5: ( string | number | boolean_ | array | tuple | record )
4668 switch ( input.LA(1) ) {
4702 if (state.backtracking>0) {state.failed=true; return retval;}
4703 NoViableAltException nvae =
4704 new NoViableAltException("", 39, 0, input);
4711 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:412:7: string
4713 root_0 = (CommonTree)adaptor.nil();
4715 pushFollow(FOLLOW_string_in_simpleValue2830);
4719 if (state.failed) return retval;
4720 if ( state.backtracking==0 ) adaptor.addChild(root_0, string122.getTree());
4725 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:413:7: number
4727 root_0 = (CommonTree)adaptor.nil();
4729 pushFollow(FOLLOW_number_in_simpleValue2838);
4733 if (state.failed) return retval;
4734 if ( state.backtracking==0 ) adaptor.addChild(root_0, number123.getTree());
4739 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:414:7: boolean_
4741 root_0 = (CommonTree)adaptor.nil();
4743 pushFollow(FOLLOW_boolean__in_simpleValue2846);
4744 boolean_124=boolean_();
4747 if (state.failed) return retval;
4748 if ( state.backtracking==0 ) adaptor.addChild(root_0, boolean_124.getTree());
4753 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:415:7: array
4755 root_0 = (CommonTree)adaptor.nil();
4757 pushFollow(FOLLOW_array_in_simpleValue2854);
4761 if (state.failed) return retval;
4762 if ( state.backtracking==0 ) adaptor.addChild(root_0, array125.getTree());
4767 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:416:7: tuple
4769 root_0 = (CommonTree)adaptor.nil();
4771 pushFollow(FOLLOW_tuple_in_simpleValue2862);
4775 if (state.failed) return retval;
4776 if ( state.backtracking==0 ) adaptor.addChild(root_0, tuple126.getTree());
4781 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:417:7: record
4783 root_0 = (CommonTree)adaptor.nil();
4785 pushFollow(FOLLOW_record_in_simpleValue2870);
4789 if (state.failed) return retval;
4790 if ( state.backtracking==0 ) adaptor.addChild(root_0, record127.getTree());
4796 retval.stop = input.LT(-1);
4798 if ( state.backtracking==0 ) {
4800 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
4801 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
4804 catch (RecognitionException re) {
4807 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
4814 // $ANTLR end "simpleValue"
4816 public static class array_return extends ParserRuleReturnScope {
4818 public Object getTree() { return tree; }
4821 // $ANTLR start "array"
4822 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:420:1: array : LBRACKET ( value ( ',' value )* )? RBRACKET -> ^( ARRAY ( value )* ) ;
4823 public final GraphParser.array_return array() throws RecognitionException {
4824 GraphParser.array_return retval = new GraphParser.array_return();
4825 retval.start = input.LT(1);
4827 CommonTree root_0 = null;
4829 Token LBRACKET128=null;
4830 Token char_literal130=null;
4831 Token RBRACKET132=null;
4832 GraphParser.value_return value129 = null;
4834 GraphParser.value_return value131 = null;
4837 CommonTree LBRACKET128_tree=null;
4838 CommonTree char_literal130_tree=null;
4839 CommonTree RBRACKET132_tree=null;
4840 RewriteRuleTokenStream stream_LBRACKET=new RewriteRuleTokenStream(adaptor,"token LBRACKET");
4841 RewriteRuleTokenStream stream_78=new RewriteRuleTokenStream(adaptor,"token 78");
4842 RewriteRuleTokenStream stream_RBRACKET=new RewriteRuleTokenStream(adaptor,"token RBRACKET");
4843 RewriteRuleSubtreeStream stream_value=new RewriteRuleSubtreeStream(adaptor,"rule value");
4845 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:421:5: ( LBRACKET ( value ( ',' value )* )? RBRACKET -> ^( ARRAY ( value )* ) )
4846 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:421:7: LBRACKET ( value ( ',' value )* )? RBRACKET
4848 LBRACKET128=(Token)match(input,LBRACKET,FOLLOW_LBRACKET_in_array2891); if (state.failed) return retval;
4849 if ( state.backtracking==0 ) stream_LBRACKET.add(LBRACKET128);
4851 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:421:16: ( value ( ',' value )* )?
4853 int LA41_0 = input.LA(1);
4855 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)) ) {
4860 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:421:17: value ( ',' value )*
4862 pushFollow(FOLLOW_value_in_array2894);
4866 if (state.failed) return retval;
4867 if ( state.backtracking==0 ) stream_value.add(value129.getTree());
4868 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:421:23: ( ',' value )*
4872 int LA40_0 = input.LA(1);
4874 if ( (LA40_0==78) ) {
4881 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:421:24: ',' value
4883 char_literal130=(Token)match(input,78,FOLLOW_78_in_array2897); if (state.failed) return retval;
4884 if ( state.backtracking==0 ) stream_78.add(char_literal130);
4886 pushFollow(FOLLOW_value_in_array2899);
4890 if (state.failed) return retval;
4891 if ( state.backtracking==0 ) stream_value.add(value131.getTree());
4907 RBRACKET132=(Token)match(input,RBRACKET,FOLLOW_RBRACKET_in_array2905); if (state.failed) return retval;
4908 if ( state.backtracking==0 ) stream_RBRACKET.add(RBRACKET132);
4915 // rule labels: retval
4916 // token list labels:
4917 // rule list labels:
4919 if ( state.backtracking==0 ) {
4920 retval.tree = root_0;
4921 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
4923 root_0 = (CommonTree)adaptor.nil();
4924 // 422:5: -> ^( ARRAY ( value )* )
4926 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:422:8: ^( ARRAY ( value )* )
4928 CommonTree root_1 = (CommonTree)adaptor.nil();
4929 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(ARRAY, "ARRAY"), root_1);
4931 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:422:16: ( value )*
4932 while ( stream_value.hasNext() ) {
4933 adaptor.addChild(root_1, stream_value.nextTree());
4936 stream_value.reset();
4938 adaptor.addChild(root_0, root_1);
4943 retval.tree = root_0;}
4946 retval.stop = input.LT(-1);
4948 if ( state.backtracking==0 ) {
4950 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
4951 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
4954 catch (RecognitionException re) {
4957 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
4964 // $ANTLR end "array"
4966 public static class tuple_return extends ParserRuleReturnScope {
4968 public Object getTree() { return tree; }
4971 // $ANTLR start "tuple"
4972 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:425:1: tuple : LPAREN ( value ( ',' value )* )? RPAREN -> ^( TUPLE ( value )* ) ;
4973 public final GraphParser.tuple_return tuple() throws RecognitionException {
4974 GraphParser.tuple_return retval = new GraphParser.tuple_return();
4975 retval.start = input.LT(1);
4977 CommonTree root_0 = null;
4979 Token LPAREN133=null;
4980 Token char_literal135=null;
4981 Token RPAREN137=null;
4982 GraphParser.value_return value134 = null;
4984 GraphParser.value_return value136 = null;
4987 CommonTree LPAREN133_tree=null;
4988 CommonTree char_literal135_tree=null;
4989 CommonTree RPAREN137_tree=null;
4990 RewriteRuleTokenStream stream_78=new RewriteRuleTokenStream(adaptor,"token 78");
4991 RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
4992 RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
4993 RewriteRuleSubtreeStream stream_value=new RewriteRuleSubtreeStream(adaptor,"rule value");
4995 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:426:5: ( LPAREN ( value ( ',' value )* )? RPAREN -> ^( TUPLE ( value )* ) )
4996 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:426:7: LPAREN ( value ( ',' value )* )? RPAREN
4998 LPAREN133=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_tuple2937); if (state.failed) return retval;
4999 if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN133);
5001 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:426:14: ( value ( ',' value )* )?
5003 int LA43_0 = input.LA(1);
5005 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)) ) {
5010 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:426:15: value ( ',' value )*
5012 pushFollow(FOLLOW_value_in_tuple2940);
5016 if (state.failed) return retval;
5017 if ( state.backtracking==0 ) stream_value.add(value134.getTree());
5018 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:426:21: ( ',' value )*
5022 int LA42_0 = input.LA(1);
5024 if ( (LA42_0==78) ) {
5031 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:426:22: ',' value
5033 char_literal135=(Token)match(input,78,FOLLOW_78_in_tuple2943); if (state.failed) return retval;
5034 if ( state.backtracking==0 ) stream_78.add(char_literal135);
5036 pushFollow(FOLLOW_value_in_tuple2945);
5040 if (state.failed) return retval;
5041 if ( state.backtracking==0 ) stream_value.add(value136.getTree());
5057 RPAREN137=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_tuple2951); if (state.failed) return retval;
5058 if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN137);
5065 // rule labels: retval
5066 // token list labels:
5067 // rule list labels:
5069 if ( state.backtracking==0 ) {
5070 retval.tree = root_0;
5071 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
5073 root_0 = (CommonTree)adaptor.nil();
5074 // 427:5: -> ^( TUPLE ( value )* )
5076 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:427:8: ^( TUPLE ( value )* )
5078 CommonTree root_1 = (CommonTree)adaptor.nil();
5079 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TUPLE, "TUPLE"), root_1);
5081 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:427:16: ( value )*
5082 while ( stream_value.hasNext() ) {
5083 adaptor.addChild(root_1, stream_value.nextTree());
5086 stream_value.reset();
5088 adaptor.addChild(root_0, root_1);
5093 retval.tree = root_0;}
5096 retval.stop = input.LT(-1);
5098 if ( state.backtracking==0 ) {
5100 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
5101 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
5104 catch (RecognitionException re) {
5107 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
5114 // $ANTLR end "tuple"
5116 public static class taggedValue_return extends ParserRuleReturnScope {
5118 public Object getTree() { return tree; }
5121 // $ANTLR start "taggedValue"
5122 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:430:1: taggedValue : ID ( simpleValue )? -> ^( TAGGED_VALUE ID ( simpleValue )? ) ;
5123 public final GraphParser.taggedValue_return taggedValue() throws RecognitionException {
5124 GraphParser.taggedValue_return retval = new GraphParser.taggedValue_return();
5125 retval.start = input.LT(1);
5127 CommonTree root_0 = null;
5130 GraphParser.simpleValue_return simpleValue139 = null;
5133 CommonTree ID138_tree=null;
5134 RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
5135 RewriteRuleSubtreeStream stream_simpleValue=new RewriteRuleSubtreeStream(adaptor,"rule simpleValue");
5137 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:431:5: ( ID ( simpleValue )? -> ^( TAGGED_VALUE ID ( simpleValue )? ) )
5138 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:431:7: ID ( simpleValue )?
5140 ID138=(Token)match(input,ID,FOLLOW_ID_in_taggedValue2983); if (state.failed) return retval;
5141 if ( state.backtracking==0 ) stream_ID.add(ID138);
5143 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:431:10: ( simpleValue )?
5145 int LA44_0 = input.LA(1);
5147 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)) ) {
5152 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:431:10: simpleValue
5154 pushFollow(FOLLOW_simpleValue_in_taggedValue2985);
5155 simpleValue139=simpleValue();
5158 if (state.failed) return retval;
5159 if ( state.backtracking==0 ) stream_simpleValue.add(simpleValue139.getTree());
5169 // elements: simpleValue, ID
5171 // rule labels: retval
5172 // token list labels:
5173 // rule list labels:
5175 if ( state.backtracking==0 ) {
5176 retval.tree = root_0;
5177 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
5179 root_0 = (CommonTree)adaptor.nil();
5180 // 432:5: -> ^( TAGGED_VALUE ID ( simpleValue )? )
5182 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:432:8: ^( TAGGED_VALUE ID ( simpleValue )? )
5184 CommonTree root_1 = (CommonTree)adaptor.nil();
5185 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TAGGED_VALUE, "TAGGED_VALUE"), root_1);
5187 adaptor.addChild(root_1, stream_ID.nextNode());
5188 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:432:26: ( simpleValue )?
5189 if ( stream_simpleValue.hasNext() ) {
5190 adaptor.addChild(root_1, stream_simpleValue.nextTree());
5193 stream_simpleValue.reset();
5195 adaptor.addChild(root_0, root_1);
5200 retval.tree = root_0;}
5203 retval.stop = input.LT(-1);
5205 if ( state.backtracking==0 ) {
5207 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
5208 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
5211 catch (RecognitionException re) {
5214 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
5221 // $ANTLR end "taggedValue"
5223 public static class record_return extends ParserRuleReturnScope {
5225 public Object getTree() { return tree; }
5228 // $ANTLR start "record"
5229 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:435:1: record : LCURLY ( recordAssignment ( ',' recordAssignment )* )? RCURLY -> ^( RECORD ( recordAssignment )* ) ;
5230 public final GraphParser.record_return record() throws RecognitionException {
5231 GraphParser.record_return retval = new GraphParser.record_return();
5232 retval.start = input.LT(1);
5234 CommonTree root_0 = null;
5236 Token LCURLY140=null;
5237 Token char_literal142=null;
5238 Token RCURLY144=null;
5239 GraphParser.recordAssignment_return recordAssignment141 = null;
5241 GraphParser.recordAssignment_return recordAssignment143 = null;
5244 CommonTree LCURLY140_tree=null;
5245 CommonTree char_literal142_tree=null;
5246 CommonTree RCURLY144_tree=null;
5247 RewriteRuleTokenStream stream_78=new RewriteRuleTokenStream(adaptor,"token 78");
5248 RewriteRuleTokenStream stream_LCURLY=new RewriteRuleTokenStream(adaptor,"token LCURLY");
5249 RewriteRuleTokenStream stream_RCURLY=new RewriteRuleTokenStream(adaptor,"token RCURLY");
5250 RewriteRuleSubtreeStream stream_recordAssignment=new RewriteRuleSubtreeStream(adaptor,"rule recordAssignment");
5252 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:436:5: ( LCURLY ( recordAssignment ( ',' recordAssignment )* )? RCURLY -> ^( RECORD ( recordAssignment )* ) )
5253 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:436:7: LCURLY ( recordAssignment ( ',' recordAssignment )* )? RCURLY
5255 LCURLY140=(Token)match(input,LCURLY,FOLLOW_LCURLY_in_record3020); if (state.failed) return retval;
5256 if ( state.backtracking==0 ) stream_LCURLY.add(LCURLY140);
5258 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:436:14: ( recordAssignment ( ',' recordAssignment )* )?
5260 int LA46_0 = input.LA(1);
5262 if ( (LA46_0==ID) ) {
5267 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:436:15: recordAssignment ( ',' recordAssignment )*
5269 pushFollow(FOLLOW_recordAssignment_in_record3023);
5270 recordAssignment141=recordAssignment();
5273 if (state.failed) return retval;
5274 if ( state.backtracking==0 ) stream_recordAssignment.add(recordAssignment141.getTree());
5275 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:436:32: ( ',' recordAssignment )*
5279 int LA45_0 = input.LA(1);
5281 if ( (LA45_0==78) ) {
5288 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:436:33: ',' recordAssignment
5290 char_literal142=(Token)match(input,78,FOLLOW_78_in_record3026); if (state.failed) return retval;
5291 if ( state.backtracking==0 ) stream_78.add(char_literal142);
5293 pushFollow(FOLLOW_recordAssignment_in_record3028);
5294 recordAssignment143=recordAssignment();
5297 if (state.failed) return retval;
5298 if ( state.backtracking==0 ) stream_recordAssignment.add(recordAssignment143.getTree());
5314 RCURLY144=(Token)match(input,RCURLY,FOLLOW_RCURLY_in_record3034); if (state.failed) return retval;
5315 if ( state.backtracking==0 ) stream_RCURLY.add(RCURLY144);
5320 // elements: recordAssignment
5322 // rule labels: retval
5323 // token list labels:
5324 // rule list labels:
5326 if ( state.backtracking==0 ) {
5327 retval.tree = root_0;
5328 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
5330 root_0 = (CommonTree)adaptor.nil();
5331 // 437:5: -> ^( RECORD ( recordAssignment )* )
5333 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:437:8: ^( RECORD ( recordAssignment )* )
5335 CommonTree root_1 = (CommonTree)adaptor.nil();
5336 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(RECORD, "RECORD"), root_1);
5338 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:437:17: ( recordAssignment )*
5339 while ( stream_recordAssignment.hasNext() ) {
5340 adaptor.addChild(root_1, stream_recordAssignment.nextTree());
5343 stream_recordAssignment.reset();
5345 adaptor.addChild(root_0, root_1);
5350 retval.tree = root_0;}
5353 retval.stop = input.LT(-1);
5355 if ( state.backtracking==0 ) {
5357 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
5358 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
5361 catch (RecognitionException re) {
5364 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
5371 // $ANTLR end "record"
5373 public static class recordAssignment_return extends ParserRuleReturnScope {
5375 public Object getTree() { return tree; }
5378 // $ANTLR start "recordAssignment"
5379 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:440:1: recordAssignment : ID '=' value -> ^( ASSIGNMENT ID value ) ;
5380 public final GraphParser.recordAssignment_return recordAssignment() throws RecognitionException {
5381 GraphParser.recordAssignment_return retval = new GraphParser.recordAssignment_return();
5382 retval.start = input.LT(1);
5384 CommonTree root_0 = null;
5387 Token char_literal146=null;
5388 GraphParser.value_return value147 = null;
5391 CommonTree ID145_tree=null;
5392 CommonTree char_literal146_tree=null;
5393 RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
5394 RewriteRuleTokenStream stream_74=new RewriteRuleTokenStream(adaptor,"token 74");
5395 RewriteRuleSubtreeStream stream_value=new RewriteRuleSubtreeStream(adaptor,"rule value");
5397 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:441:5: ( ID '=' value -> ^( ASSIGNMENT ID value ) )
5398 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:441:7: ID '=' value
5400 ID145=(Token)match(input,ID,FOLLOW_ID_in_recordAssignment3066); if (state.failed) return retval;
5401 if ( state.backtracking==0 ) stream_ID.add(ID145);
5403 char_literal146=(Token)match(input,74,FOLLOW_74_in_recordAssignment3068); if (state.failed) return retval;
5404 if ( state.backtracking==0 ) stream_74.add(char_literal146);
5406 pushFollow(FOLLOW_value_in_recordAssignment3070);
5410 if (state.failed) return retval;
5411 if ( state.backtracking==0 ) stream_value.add(value147.getTree());
5415 // elements: ID, value
5417 // rule labels: retval
5418 // token list labels:
5419 // rule list labels:
5421 if ( state.backtracking==0 ) {
5422 retval.tree = root_0;
5423 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
5425 root_0 = (CommonTree)adaptor.nil();
5426 // 442:5: -> ^( ASSIGNMENT ID value )
5428 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:442:8: ^( ASSIGNMENT ID value )
5430 CommonTree root_1 = (CommonTree)adaptor.nil();
5431 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(ASSIGNMENT, "ASSIGNMENT"), root_1);
5433 adaptor.addChild(root_1, stream_ID.nextNode());
5434 adaptor.addChild(root_1, stream_value.nextTree());
5436 adaptor.addChild(root_0, root_1);
5441 retval.tree = root_0;}
5444 retval.stop = input.LT(-1);
5446 if ( state.backtracking==0 ) {
5448 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
5449 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
5452 catch (RecognitionException re) {
5455 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
5462 // $ANTLR end "recordAssignment"
5464 public static class map_return extends ParserRuleReturnScope {
5466 public Object getTree() { return tree; }
5469 // $ANTLR start "map"
5470 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:445:1: map : {...}? => ID LCURLY ( mapAssignment ( ',' mapAssignment )* )? RCURLY -> ^( MAP ( mapAssignment )* ) ;
5471 public final GraphParser.map_return map() throws RecognitionException {
5472 GraphParser.map_return retval = new GraphParser.map_return();
5473 retval.start = input.LT(1);
5475 CommonTree root_0 = null;
5478 Token LCURLY149=null;
5479 Token char_literal151=null;
5480 Token RCURLY153=null;
5481 GraphParser.mapAssignment_return mapAssignment150 = null;
5483 GraphParser.mapAssignment_return mapAssignment152 = null;
5486 CommonTree ID148_tree=null;
5487 CommonTree LCURLY149_tree=null;
5488 CommonTree char_literal151_tree=null;
5489 CommonTree RCURLY153_tree=null;
5490 RewriteRuleTokenStream stream_78=new RewriteRuleTokenStream(adaptor,"token 78");
5491 RewriteRuleTokenStream stream_LCURLY=new RewriteRuleTokenStream(adaptor,"token LCURLY");
5492 RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
5493 RewriteRuleTokenStream stream_RCURLY=new RewriteRuleTokenStream(adaptor,"token RCURLY");
5494 RewriteRuleSubtreeStream stream_mapAssignment=new RewriteRuleSubtreeStream(adaptor,"rule mapAssignment");
5496 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:445:5: ({...}? => ID LCURLY ( mapAssignment ( ',' mapAssignment )* )? RCURLY -> ^( MAP ( mapAssignment )* ) )
5497 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:445:7: {...}? => ID LCURLY ( mapAssignment ( ',' mapAssignment )* )? RCURLY
5499 if ( !((input.LT(1).getText().equals("map"))) ) {
5500 if (state.backtracking>0) {state.failed=true; return retval;}
5501 throw new FailedPredicateException(input, "map", "input.LT(1).getText().equals(\"map\")");
5503 ID148=(Token)match(input,ID,FOLLOW_ID_in_map3100); if (state.failed) return retval;
5504 if ( state.backtracking==0 ) stream_ID.add(ID148);
5506 LCURLY149=(Token)match(input,LCURLY,FOLLOW_LCURLY_in_map3102); if (state.failed) return retval;
5507 if ( state.backtracking==0 ) stream_LCURLY.add(LCURLY149);
5509 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:445:58: ( mapAssignment ( ',' mapAssignment )* )?
5511 int LA48_0 = input.LA(1);
5513 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)) ) {
5518 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:445:59: mapAssignment ( ',' mapAssignment )*
5520 pushFollow(FOLLOW_mapAssignment_in_map3105);
5521 mapAssignment150=mapAssignment();
5524 if (state.failed) return retval;
5525 if ( state.backtracking==0 ) stream_mapAssignment.add(mapAssignment150.getTree());
5526 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:445:73: ( ',' mapAssignment )*
5530 int LA47_0 = input.LA(1);
5532 if ( (LA47_0==78) ) {
5539 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:445:74: ',' mapAssignment
5541 char_literal151=(Token)match(input,78,FOLLOW_78_in_map3108); if (state.failed) return retval;
5542 if ( state.backtracking==0 ) stream_78.add(char_literal151);
5544 pushFollow(FOLLOW_mapAssignment_in_map3110);
5545 mapAssignment152=mapAssignment();
5548 if (state.failed) return retval;
5549 if ( state.backtracking==0 ) stream_mapAssignment.add(mapAssignment152.getTree());
5565 RCURLY153=(Token)match(input,RCURLY,FOLLOW_RCURLY_in_map3116); if (state.failed) return retval;
5566 if ( state.backtracking==0 ) stream_RCURLY.add(RCURLY153);
5571 // elements: mapAssignment
5573 // rule labels: retval
5574 // token list labels:
5575 // rule list labels:
5577 if ( state.backtracking==0 ) {
5578 retval.tree = root_0;
5579 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
5581 root_0 = (CommonTree)adaptor.nil();
5582 // 446:5: -> ^( MAP ( mapAssignment )* )
5584 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:446:8: ^( MAP ( mapAssignment )* )
5586 CommonTree root_1 = (CommonTree)adaptor.nil();
5587 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(MAP, "MAP"), root_1);
5589 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:446:14: ( mapAssignment )*
5590 while ( stream_mapAssignment.hasNext() ) {
5591 adaptor.addChild(root_1, stream_mapAssignment.nextTree());
5594 stream_mapAssignment.reset();
5596 adaptor.addChild(root_0, root_1);
5601 retval.tree = root_0;}
5604 retval.stop = input.LT(-1);
5606 if ( state.backtracking==0 ) {
5608 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
5609 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
5612 catch (RecognitionException re) {
5615 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
5624 public static class mapAssignment_return extends ParserRuleReturnScope {
5626 public Object getTree() { return tree; }
5629 // $ANTLR start "mapAssignment"
5630 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:449:1: mapAssignment : value '=' value -> ^( ASSIGNMENT ( value )* ) ;
5631 public final GraphParser.mapAssignment_return mapAssignment() throws RecognitionException {
5632 GraphParser.mapAssignment_return retval = new GraphParser.mapAssignment_return();
5633 retval.start = input.LT(1);
5635 CommonTree root_0 = null;
5637 Token char_literal155=null;
5638 GraphParser.value_return value154 = null;
5640 GraphParser.value_return value156 = null;
5643 CommonTree char_literal155_tree=null;
5644 RewriteRuleTokenStream stream_74=new RewriteRuleTokenStream(adaptor,"token 74");
5645 RewriteRuleSubtreeStream stream_value=new RewriteRuleSubtreeStream(adaptor,"rule value");
5647 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:450:5: ( value '=' value -> ^( ASSIGNMENT ( value )* ) )
5648 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:450:7: value '=' value
5650 pushFollow(FOLLOW_value_in_mapAssignment3148);
5654 if (state.failed) return retval;
5655 if ( state.backtracking==0 ) stream_value.add(value154.getTree());
5656 char_literal155=(Token)match(input,74,FOLLOW_74_in_mapAssignment3150); if (state.failed) return retval;
5657 if ( state.backtracking==0 ) stream_74.add(char_literal155);
5659 pushFollow(FOLLOW_value_in_mapAssignment3152);
5663 if (state.failed) return retval;
5664 if ( state.backtracking==0 ) stream_value.add(value156.getTree());
5670 // rule labels: retval
5671 // token list labels:
5672 // rule list labels:
5674 if ( state.backtracking==0 ) {
5675 retval.tree = root_0;
5676 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
5678 root_0 = (CommonTree)adaptor.nil();
5679 // 451:5: -> ^( ASSIGNMENT ( value )* )
5681 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:451:8: ^( ASSIGNMENT ( value )* )
5683 CommonTree root_1 = (CommonTree)adaptor.nil();
5684 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(ASSIGNMENT, "ASSIGNMENT"), root_1);
5686 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:451:21: ( value )*
5687 while ( stream_value.hasNext() ) {
5688 adaptor.addChild(root_1, stream_value.nextTree());
5691 stream_value.reset();
5693 adaptor.addChild(root_0, root_1);
5698 retval.tree = root_0;}
5701 retval.stop = input.LT(-1);
5703 if ( state.backtracking==0 ) {
5705 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
5706 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
5709 catch (RecognitionException re) {
5712 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
5719 // $ANTLR end "mapAssignment"
5721 // $ANTLR start synpred1_Graph
5722 public final void synpred1_Graph_fragment() throws RecognitionException {
5723 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:317:22: ( arrayType )
5724 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:317:23: arrayType
5726 pushFollow(FOLLOW_arrayType_in_synpred1_Graph2075);
5730 if (state.failed) return ;
5734 // $ANTLR end synpred1_Graph
5736 // $ANTLR start synpred2_Graph
5737 public final void synpred2_Graph_fragment() throws RecognitionException {
5738 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:350:11: ( LPAREN )
5739 // src\\org\\simantics\\graph\\compiler\\internal\\parsing\\Graph.g:350:12: LPAREN
5741 match(input,LPAREN,FOLLOW_LPAREN_in_synpred2_Graph2354); if (state.failed) return ;
5745 // $ANTLR end synpred2_Graph
5749 public final boolean synpred1_Graph() {
5750 state.backtracking++;
5751 int start = input.mark();
5753 synpred1_Graph_fragment(); // can never throw exception
5754 } catch (RecognitionException re) {
5755 System.err.println("impossible: "+re);
5757 boolean success = !state.failed;
5758 input.rewind(start);
5759 state.backtracking--;
5763 public final boolean synpred2_Graph() {
5764 state.backtracking++;
5765 int start = input.mark();
5767 synpred2_Graph_fragment(); // can never throw exception
5768 } catch (RecognitionException re) {
5769 System.err.println("impossible: "+re);
5771 boolean success = !state.failed;
5772 input.rewind(start);
5773 state.backtracking--;
5779 protected DFA13 dfa13 = new DFA13(this);
5780 protected DFA22 dfa22 = new DFA22(this);
5781 protected DFA31 dfa31 = new DFA31(this);
5782 static final String DFA13_eotS =
5784 static final String DFA13_eofS =
5786 static final String DFA13_minS =
5787 "\1\55\1\0\13\uffff";
5788 static final String DFA13_maxS =
5789 "\1\120\1\0\13\uffff";
5790 static final String DFA13_acceptS =
5791 "\2\uffff\1\2\11\uffff\1\1";
5792 static final String DFA13_specialS =
5793 "\1\uffff\1\0\13\uffff}>";
5794 static final String[] DFA13_transitionS = {
5795 "\1\1\2\uffff\1\2\1\uffff\1\2\1\uffff\1\2\1\uffff\1\2\1\uffff"+
5796 "\1\2\4\uffff\2\2\14\uffff\2\2\2\uffff\2\2",
5811 static final short[] DFA13_eot = DFA.unpackEncodedString(DFA13_eotS);
5812 static final short[] DFA13_eof = DFA.unpackEncodedString(DFA13_eofS);
5813 static final char[] DFA13_min = DFA.unpackEncodedStringToUnsignedChars(DFA13_minS);
5814 static final char[] DFA13_max = DFA.unpackEncodedStringToUnsignedChars(DFA13_maxS);
5815 static final short[] DFA13_accept = DFA.unpackEncodedString(DFA13_acceptS);
5816 static final short[] DFA13_special = DFA.unpackEncodedString(DFA13_specialS);
5817 static final short[][] DFA13_transition;
5820 int numStates = DFA13_transitionS.length;
5821 DFA13_transition = new short[numStates][];
5822 for (int i=0; i<numStates; i++) {
5823 DFA13_transition[i] = DFA.unpackEncodedString(DFA13_transitionS[i]);
5827 class DFA13 extends DFA {
5829 public DFA13(BaseRecognizer recognizer) {
5830 this.recognizer = recognizer;
5831 this.decisionNumber = 13;
5832 this.eot = DFA13_eot;
5833 this.eof = DFA13_eof;
5834 this.min = DFA13_min;
5835 this.max = DFA13_max;
5836 this.accept = DFA13_accept;
5837 this.special = DFA13_special;
5838 this.transition = DFA13_transition;
5840 public String getDescription() {
5841 return "253:5: ({...}? => ID ( resource )+ INDENT resourceDefinitions DEDENT -> ^( TEMPLATE_DEFINITION ( resource )+ resourceDefinitions ) | ( resource )+ ( INDENT resourceDefinitions DEDENT )? -> ^( TEMPLATE_INSTANCE ( resource )+ ( resourceDefinitions )? ) )";
5843 public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
5844 TokenStream input = (TokenStream)_input;
5848 int LA13_1 = input.LA(1);
5851 int index13_1 = input.index();
5854 if ( ((input.LT(1).getText().equals("template"))) ) {s = 12;}
5856 else if ( (true) ) {s = 2;}
5859 input.seek(index13_1);
5860 if ( s>=0 ) return s;
5863 if (state.backtracking>0) {state.failed=true; return -1;}
5864 NoViableAltException nvae =
5865 new NoViableAltException(getDescription(), 13, _s, input);
5870 static final String DFA22_eotS =
5872 static final String DFA22_eofS =
5874 static final String DFA22_minS =
5875 "\1\55\2\uffff\1\0\10\uffff";
5876 static final String DFA22_maxS =
5877 "\1\116\2\uffff\1\0\10\uffff";
5878 static final String DFA22_acceptS =
5879 "\1\uffff\2\1\1\uffff\1\2\7\uffff";
5880 static final String DFA22_specialS =
5881 "\1\0\2\uffff\1\1\10\uffff}>";
5882 static final String[] DFA22_transitionS = {
5883 "\1\3\2\uffff\1\1\1\4\1\uffff\1\4\1\2\1\4\23\uffff\2\4\2\uffff"+
5898 static final short[] DFA22_eot = DFA.unpackEncodedString(DFA22_eotS);
5899 static final short[] DFA22_eof = DFA.unpackEncodedString(DFA22_eofS);
5900 static final char[] DFA22_min = DFA.unpackEncodedStringToUnsignedChars(DFA22_minS);
5901 static final char[] DFA22_max = DFA.unpackEncodedStringToUnsignedChars(DFA22_maxS);
5902 static final short[] DFA22_accept = DFA.unpackEncodedString(DFA22_acceptS);
5903 static final short[] DFA22_special = DFA.unpackEncodedString(DFA22_specialS);
5904 static final short[][] DFA22_transition;
5907 int numStates = DFA22_transitionS.length;
5908 DFA22_transition = new short[numStates][];
5909 for (int i=0; i<numStates; i++) {
5910 DFA22_transition[i] = DFA.unpackEncodedString(DFA22_transitionS[i]);
5914 class DFA22 extends DFA {
5916 public DFA22(BaseRecognizer recognizer) {
5917 this.recognizer = recognizer;
5918 this.decisionNumber = 22;
5919 this.eot = DFA22_eot;
5920 this.eof = DFA22_eof;
5921 this.min = DFA22_min;
5922 this.max = DFA22_max;
5923 this.accept = DFA22_accept;
5924 this.special = DFA22_special;
5925 this.transition = DFA22_transition;
5927 public String getDescription() {
5928 return "317:21: ( ( arrayType )=> arrayType )?";
5930 public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
5931 TokenStream input = (TokenStream)_input;
5935 int LA22_0 = input.LA(1);
5938 int index22_0 = input.index();
5941 if ( (LA22_0==LPAREN) && (synpred1_Graph())) {s = 1;}
5943 else if ( (LA22_0==LCURLY) && (synpred1_Graph())) {s = 2;}
5945 else if ( (LA22_0==ID) ) {s = 3;}
5947 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;}
5950 input.seek(index22_0);
5951 if ( s>=0 ) return s;
5954 int LA22_3 = input.LA(1);
5957 int index22_3 = input.index();
5960 if ( (synpred1_Graph()) ) {s = 2;}
5962 else if ( (true) ) {s = 4;}
5965 input.seek(index22_3);
5966 if ( s>=0 ) return s;
5969 if (state.backtracking>0) {state.failed=true; return -1;}
5970 NoViableAltException nvae =
5971 new NoViableAltException(getDescription(), 22, _s, input);
5976 static final String DFA31_eotS =
5978 static final String DFA31_eofS =
5980 static final String DFA31_minS =
5981 "\1\4\1\0\34\uffff";
5982 static final String DFA31_maxS =
5983 "\1\120\1\0\34\uffff";
5984 static final String DFA31_acceptS =
5985 "\2\uffff\1\2\32\uffff\1\1";
5986 static final String DFA31_specialS =
5987 "\1\uffff\1\0\34\uffff}>";
5988 static final String[] DFA31_transitionS = {
5989 "\2\2\47\uffff\1\2\2\uffff\1\1\6\2\1\uffff\1\2\1\uffff\1\2\2"+
5990 "\uffff\2\2\4\uffff\16\2",
6022 static final short[] DFA31_eot = DFA.unpackEncodedString(DFA31_eotS);
6023 static final short[] DFA31_eof = DFA.unpackEncodedString(DFA31_eofS);
6024 static final char[] DFA31_min = DFA.unpackEncodedStringToUnsignedChars(DFA31_minS);
6025 static final char[] DFA31_max = DFA.unpackEncodedStringToUnsignedChars(DFA31_maxS);
6026 static final short[] DFA31_accept = DFA.unpackEncodedString(DFA31_acceptS);
6027 static final short[] DFA31_special = DFA.unpackEncodedString(DFA31_specialS);
6028 static final short[][] DFA31_transition;
6031 int numStates = DFA31_transitionS.length;
6032 DFA31_transition = new short[numStates][];
6033 for (int i=0; i<numStates; i++) {
6034 DFA31_transition[i] = DFA.unpackEncodedString(DFA31_transitionS[i]);
6038 class DFA31 extends DFA {
6040 public DFA31(BaseRecognizer recognizer) {
6041 this.recognizer = recognizer;
6042 this.decisionNumber = 31;
6043 this.eot = DFA31_eot;
6044 this.eof = DFA31_eof;
6045 this.min = DFA31_min;
6046 this.max = DFA31_max;
6047 this.accept = DFA31_accept;
6048 this.special = DFA31_special;
6049 this.transition = DFA31_transition;
6051 public String getDescription() {
6052 return "350:10: ( ( LPAREN )=> LPAREN parameter ( ',' parameter )* RPAREN )?";
6054 public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
6055 TokenStream input = (TokenStream)_input;
6059 int LA31_1 = input.LA(1);
6062 int index31_1 = input.index();
6065 if ( (synpred2_Graph()) ) {s = 29;}
6067 else if ( (true) ) {s = 2;}
6070 input.seek(index31_1);
6071 if ( s>=0 ) return s;
6074 if (state.backtracking>0) {state.failed=true; return -1;}
6075 NoViableAltException nvae =
6076 new NoViableAltException(getDescription(), 31, _s, input);
6083 public static final BitSet FOLLOW_NEWLINE_in_file1230 = new BitSet(new long[]{0x6155200000000000L,0x0000000000019802L});
6084 public static final BitSet FOLLOW_resourceDefinitions_in_file1233 = new BitSet(new long[]{0x0000000000000000L});
6085 public static final BitSet FOLLOW_EOF_in_file1236 = new BitSet(new long[]{0x0000000000000002L});
6086 public static final BitSet FOLLOW_resourceDefinition_in_resourceDefinitions1260 = new BitSet(new long[]{0x0400000000000002L});
6087 public static final BitSet FOLLOW_NEWLINE_in_resourceDefinitions1263 = new BitSet(new long[]{0x6155200000000000L,0x0000000000019802L});
6088 public static final BitSet FOLLOW_resourceDefinition_in_resourceDefinitions1266 = new BitSet(new long[]{0x0400000000000002L});
6089 public static final BitSet FOLLOW_resource_in_resourceDefinition1300 = new BitSet(new long[]{0x4000200000000012L,0x0000000000000FF8L});
6090 public static final BitSet FOLLOW_localProperty_in_resourceDefinition1308 = new BitSet(new long[]{0x4000200000000012L,0x0000000000000FF8L});
6091 public static final BitSet FOLLOW_INDENT_in_resourceDefinition1318 = new BitSet(new long[]{0x6155200000000000L,0x0000000000019FFAL});
6092 public static final BitSet FOLLOW_property_in_resourceDefinition1320 = new BitSet(new long[]{0x0400000000000020L});
6093 public static final BitSet FOLLOW_NEWLINE_in_resourceDefinition1323 = new BitSet(new long[]{0x6155200000000000L,0x0000000000019FFAL});
6094 public static final BitSet FOLLOW_property_in_resourceDefinition1325 = new BitSet(new long[]{0x0400000000000020L});
6095 public static final BitSet FOLLOW_DEDENT_in_resourceDefinition1329 = new BitSet(new long[]{0x0000000000000002L});
6096 public static final BitSet FOLLOW_template_in_resourceDefinition1358 = new BitSet(new long[]{0x0000000000000002L});
6097 public static final BitSet FOLLOW_relation_in_localProperty1393 = new BitSet(new long[]{0x6155200000000000L,0x0000000000019800L});
6098 public static final BitSet FOLLOW_resource_in_localProperty1395 = new BitSet(new long[]{0x0000000000000002L});
6099 public static final BitSet FOLLOW_relation_in_property1434 = new BitSet(new long[]{0x6155200000000010L,0x0000000000019802L});
6100 public static final BitSet FOLLOW_resourceDefinition_in_property1444 = new BitSet(new long[]{0x0000000000000002L});
6101 public static final BitSet FOLLOW_INDENT_in_property1464 = new BitSet(new long[]{0x6155200000000000L,0x0000000000019802L});
6102 public static final BitSet FOLLOW_resourceDefinitions_in_property1466 = new BitSet(new long[]{0x0000000000000020L});
6103 public static final BitSet FOLLOW_DEDENT_in_property1468 = new BitSet(new long[]{0x0000000000000002L});
6104 public static final BitSet FOLLOW_template_in_property1494 = new BitSet(new long[]{0x0000000000000002L});
6105 public static final BitSet FOLLOW_65_in_template1515 = new BitSet(new long[]{0x6155200000000000L,0x0000000000019800L});
6106 public static final BitSet FOLLOW_ID_in_template1533 = new BitSet(new long[]{0x6155200000000000L,0x0000000000019800L});
6107 public static final BitSet FOLLOW_resource_in_template1535 = new BitSet(new long[]{0x6155200000000010L,0x0000000000019800L});
6108 public static final BitSet FOLLOW_INDENT_in_template1545 = new BitSet(new long[]{0x6155200000000000L,0x0000000000019802L});
6109 public static final BitSet FOLLOW_resourceDefinitions_in_template1547 = new BitSet(new long[]{0x0000000000000020L});
6110 public static final BitSet FOLLOW_DEDENT_in_template1549 = new BitSet(new long[]{0x0000000000000002L});
6111 public static final BitSet FOLLOW_resource_in_template1574 = new BitSet(new long[]{0x6155200000000012L,0x0000000000019800L});
6112 public static final BitSet FOLLOW_INDENT_in_template1585 = new BitSet(new long[]{0x6155200000000000L,0x0000000000019802L});
6113 public static final BitSet FOLLOW_resourceDefinitions_in_template1587 = new BitSet(new long[]{0x0000000000000020L});
6114 public static final BitSet FOLLOW_DEDENT_in_template1589 = new BitSet(new long[]{0x0000000000000002L});
6115 public static final BitSet FOLLOW_ID_in_relation1643 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000004L});
6116 public static final BitSet FOLLOW_66_in_relation1658 = new BitSet(new long[]{0x0000200000000000L});
6117 public static final BitSet FOLLOW_ID_in_relation1660 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000004L});
6118 public static final BitSet FOLLOW_URI_in_relation1681 = new BitSet(new long[]{0x0000000000000002L});
6119 public static final BitSet FOLLOW_67_in_relation1689 = new BitSet(new long[]{0x0000000000000002L});
6120 public static final BitSet FOLLOW_68_in_relation1701 = new BitSet(new long[]{0x0000000000000002L});
6121 public static final BitSet FOLLOW_69_in_relation1713 = new BitSet(new long[]{0x0000000000000002L});
6122 public static final BitSet FOLLOW_70_in_relation1725 = new BitSet(new long[]{0x0000000000000002L});
6123 public static final BitSet FOLLOW_71_in_relation1737 = new BitSet(new long[]{0x0000000000000002L});
6124 public static final BitSet FOLLOW_72_in_relation1749 = new BitSet(new long[]{0x0000000000000002L});
6125 public static final BitSet FOLLOW_73_in_relation1765 = new BitSet(new long[]{0x0000000000000002L});
6126 public static final BitSet FOLLOW_74_in_relation1777 = new BitSet(new long[]{0x0000000000000002L});
6127 public static final BitSet FOLLOW_75_in_relation1789 = new BitSet(new long[]{0x0000200000000000L});
6128 public static final BitSet FOLLOW_ID_in_relation1791 = new BitSet(new long[]{0x0000000000000002L});
6129 public static final BitSet FOLLOW_ID_in_resource1821 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000004L});
6130 public static final BitSet FOLLOW_ID_in_resource1840 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000004L});
6131 public static final BitSet FOLLOW_66_in_resource1855 = new BitSet(new long[]{0x2000200000000000L});
6132 public static final BitSet FOLLOW_ID_in_resource1858 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000004L});
6133 public static final BitSet FOLLOW_STRING_in_resource1883 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000004L});
6134 public static final BitSet FOLLOW_URI_in_resource1924 = new BitSet(new long[]{0x0000000000000002L});
6135 public static final BitSet FOLLOW_simpleValue_in_resource1932 = new BitSet(new long[]{0x0000000000000002L});
6136 public static final BitSet FOLLOW_76_in_resource1948 = new BitSet(new long[]{0x0011200000000000L});
6137 public static final BitSet FOLLOW_basicType_in_resource1950 = new BitSet(new long[]{0x0000000000000002L});
6138 public static final BitSet FOLLOW_75_in_resource1966 = new BitSet(new long[]{0x0000200000000000L});
6139 public static final BitSet FOLLOW_ID_in_resource1968 = new BitSet(new long[]{0x0000000000000002L});
6140 public static final BitSet FOLLOW_arrayType_in_type2004 = new BitSet(new long[]{0x0000000000000002L});
6141 public static final BitSet FOLLOW_unionType_in_type2012 = new BitSet(new long[]{0x0000000000000002L});
6142 public static final BitSet FOLLOW_77_in_unionType2041 = new BitSet(new long[]{0x0000200000000000L});
6143 public static final BitSet FOLLOW_unionComponent_in_unionType2043 = new BitSet(new long[]{0x0000000000000002L,0x0000000000002000L});
6144 public static final BitSet FOLLOW_ID_in_unionComponent2071 = new BitSet(new long[]{0x0011200000000002L});
6145 public static final BitSet FOLLOW_arrayType_in_unionComponent2080 = new BitSet(new long[]{0x0000000000000002L});
6146 public static final BitSet FOLLOW_basicType_in_arrayType2108 = new BitSet(new long[]{0x0004000000000002L});
6147 public static final BitSet FOLLOW_LBRACKET_in_arrayType2122 = new BitSet(new long[]{0x00C8000000000000L});
6148 public static final BitSet FOLLOW_arrayLength_in_arrayType2124 = new BitSet(new long[]{0x0008000000000000L});
6149 public static final BitSet FOLLOW_RBRACKET_in_arrayType2127 = new BitSet(new long[]{0x0004000000000002L});
6150 public static final BitSet FOLLOW_set_in_arrayLength0 = new BitSet(new long[]{0x0000000000000002L});
6151 public static final BitSet FOLLOW_tupleType_in_basicType2181 = new BitSet(new long[]{0x0000000000000002L});
6152 public static final BitSet FOLLOW_recordType_in_basicType2189 = new BitSet(new long[]{0x0000000000000002L});
6153 public static final BitSet FOLLOW_typeReference_in_basicType2197 = new BitSet(new long[]{0x0000000000000002L});
6154 public static final BitSet FOLLOW_LPAREN_in_tupleType2219 = new BitSet(new long[]{0x0013200000000000L,0x0000000000002000L});
6155 public static final BitSet FOLLOW_type_in_tupleType2222 = new BitSet(new long[]{0x0002000000000000L,0x0000000000004000L});
6156 public static final BitSet FOLLOW_78_in_tupleType2225 = new BitSet(new long[]{0x0011200000000000L,0x0000000000002000L});
6157 public static final BitSet FOLLOW_type_in_tupleType2227 = new BitSet(new long[]{0x0002000000000000L,0x0000000000004000L});
6158 public static final BitSet FOLLOW_RPAREN_in_tupleType2233 = new BitSet(new long[]{0x0000000000000002L});
6159 public static final BitSet FOLLOW_LCURLY_in_recordType2266 = new BitSet(new long[]{0x0020200000000000L});
6160 public static final BitSet FOLLOW_component_in_recordType2269 = new BitSet(new long[]{0x0020000000000000L,0x0000000000004000L});
6161 public static final BitSet FOLLOW_78_in_recordType2272 = new BitSet(new long[]{0x0000200000000000L});
6162 public static final BitSet FOLLOW_component_in_recordType2274 = new BitSet(new long[]{0x0020000000000000L,0x0000000000004000L});
6163 public static final BitSet FOLLOW_RCURLY_in_recordType2280 = new BitSet(new long[]{0x0000000000000002L});
6164 public static final BitSet FOLLOW_ID_in_component2312 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
6165 public static final BitSet FOLLOW_73_in_component2314 = new BitSet(new long[]{0x0011200000000000L,0x0000000000002000L});
6166 public static final BitSet FOLLOW_type_in_component2316 = new BitSet(new long[]{0x0000000000000002L});
6167 public static final BitSet FOLLOW_ID_in_typeReference2350 = new BitSet(new long[]{0x0001000000000002L});
6168 public static final BitSet FOLLOW_LPAREN_in_typeReference2358 = new BitSet(new long[]{0x0011200000000000L,0x0000000000002000L});
6169 public static final BitSet FOLLOW_parameter_in_typeReference2360 = new BitSet(new long[]{0x0002000000000000L,0x0000000000004000L});
6170 public static final BitSet FOLLOW_78_in_typeReference2363 = new BitSet(new long[]{0x0011200000000000L,0x0000000000002000L});
6171 public static final BitSet FOLLOW_parameter_in_typeReference2365 = new BitSet(new long[]{0x0002000000000000L,0x0000000000004000L});
6172 public static final BitSet FOLLOW_RPAREN_in_typeReference2369 = new BitSet(new long[]{0x0000000000000002L});
6173 public static final BitSet FOLLOW_ID_in_parameter2405 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000400L});
6174 public static final BitSet FOLLOW_74_in_parameter2407 = new BitSet(new long[]{0x2145000000000000L,0x0000000000018000L});
6175 public static final BitSet FOLLOW_parameterValue_in_parameter2409 = new BitSet(new long[]{0x0000000000000002L});
6176 public static final BitSet FOLLOW_type_in_parameter2427 = new BitSet(new long[]{0x0000000000000002L});
6177 public static final BitSet FOLLOW_string_in_parameterValue2446 = new BitSet(new long[]{0x0000000000000002L});
6178 public static final BitSet FOLLOW_boolean__in_parameterValue2454 = new BitSet(new long[]{0x0000000000000002L});
6179 public static final BitSet FOLLOW_number_in_parameterValue2462 = new BitSet(new long[]{0x0000000000000002L});
6180 public static final BitSet FOLLOW_rangePar_in_parameterValue2470 = new BitSet(new long[]{0x0000000000000002L});
6181 public static final BitSet FOLLOW_set_in_rangePar2499 = new BitSet(new long[]{0x03C0000000000000L});
6182 public static final BitSet FOLLOW_range_in_rangePar2507 = new BitSet(new long[]{0x000A000000000000L});
6183 public static final BitSet FOLLOW_set_in_rangePar2509 = new BitSet(new long[]{0x0000000000000002L});
6184 public static final BitSet FOLLOW_number_in_range2536 = new BitSet(new long[]{0x0000000000000002L});
6185 public static final BitSet FOLLOW_RANGE_in_range2544 = new BitSet(new long[]{0x0000000000000002L});
6186 public static final BitSet FOLLOW_INT_RANGE_in_range2552 = new BitSet(new long[]{0x0000000000000002L});
6187 public static final BitSet FOLLOW_set_in_number0 = new BitSet(new long[]{0x0000000000000002L});
6188 public static final BitSet FOLLOW_STRING_in_string2606 = new BitSet(new long[]{0x0000000000000002L});
6189 public static final BitSet FOLLOW_79_in_boolean_2627 = new BitSet(new long[]{0x0000000000000002L});
6190 public static final BitSet FOLLOW_80_in_boolean_2639 = new BitSet(new long[]{0x0000000000000002L});
6191 public static final BitSet FOLLOW_valueDefinition_in_valueDefinitions2660 = new BitSet(new long[]{0x0000200000000002L});
6192 public static final BitSet FOLLOW_ID_in_valueDefinition2683 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
6193 public static final BitSet FOLLOW_73_in_valueDefinition2685 = new BitSet(new long[]{0x0011200000000000L,0x0000000000002000L});
6194 public static final BitSet FOLLOW_type_in_valueDefinition2687 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000400L});
6195 public static final BitSet FOLLOW_74_in_valueDefinition2689 = new BitSet(new long[]{0x2155200000000000L,0x0000000000018000L});
6196 public static final BitSet FOLLOW_value_in_valueDefinition2691 = new BitSet(new long[]{0x0000000000000002L});
6197 public static final BitSet FOLLOW_basicValue_in_value2727 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000200L});
6198 public static final BitSet FOLLOW_73_in_value2741 = new BitSet(new long[]{0x0011200000000000L,0x0000000000002000L});
6199 public static final BitSet FOLLOW_type_in_value2743 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000200L});
6200 public static final BitSet FOLLOW_simpleValue_in_basicValue2775 = new BitSet(new long[]{0x0000000000000002L});
6201 public static final BitSet FOLLOW_map_in_basicValue2783 = new BitSet(new long[]{0x0000000000000002L});
6202 public static final BitSet FOLLOW_ID_in_basicValue2793 = new BitSet(new long[]{0x0000000000000002L});
6203 public static final BitSet FOLLOW_taggedValue_in_basicValue2805 = new BitSet(new long[]{0x0000000000000002L});
6204 public static final BitSet FOLLOW_string_in_simpleValue2830 = new BitSet(new long[]{0x0000000000000002L});
6205 public static final BitSet FOLLOW_number_in_simpleValue2838 = new BitSet(new long[]{0x0000000000000002L});
6206 public static final BitSet FOLLOW_boolean__in_simpleValue2846 = new BitSet(new long[]{0x0000000000000002L});
6207 public static final BitSet FOLLOW_array_in_simpleValue2854 = new BitSet(new long[]{0x0000000000000002L});
6208 public static final BitSet FOLLOW_tuple_in_simpleValue2862 = new BitSet(new long[]{0x0000000000000002L});
6209 public static final BitSet FOLLOW_record_in_simpleValue2870 = new BitSet(new long[]{0x0000000000000002L});
6210 public static final BitSet FOLLOW_LBRACKET_in_array2891 = new BitSet(new long[]{0x215D200000000000L,0x0000000000018000L});
6211 public static final BitSet FOLLOW_value_in_array2894 = new BitSet(new long[]{0x0008000000000000L,0x0000000000004000L});
6212 public static final BitSet FOLLOW_78_in_array2897 = new BitSet(new long[]{0x2155200000000000L,0x0000000000018000L});
6213 public static final BitSet FOLLOW_value_in_array2899 = new BitSet(new long[]{0x0008000000000000L,0x0000000000004000L});
6214 public static final BitSet FOLLOW_RBRACKET_in_array2905 = new BitSet(new long[]{0x0000000000000002L});
6215 public static final BitSet FOLLOW_LPAREN_in_tuple2937 = new BitSet(new long[]{0x2157200000000000L,0x0000000000018000L});
6216 public static final BitSet FOLLOW_value_in_tuple2940 = new BitSet(new long[]{0x0002000000000000L,0x0000000000004000L});
6217 public static final BitSet FOLLOW_78_in_tuple2943 = new BitSet(new long[]{0x2155200000000000L,0x0000000000018000L});
6218 public static final BitSet FOLLOW_value_in_tuple2945 = new BitSet(new long[]{0x0002000000000000L,0x0000000000004000L});
6219 public static final BitSet FOLLOW_RPAREN_in_tuple2951 = new BitSet(new long[]{0x0000000000000002L});
6220 public static final BitSet FOLLOW_ID_in_taggedValue2983 = new BitSet(new long[]{0x2155000000000002L,0x0000000000018000L});
6221 public static final BitSet FOLLOW_simpleValue_in_taggedValue2985 = new BitSet(new long[]{0x0000000000000002L});
6222 public static final BitSet FOLLOW_LCURLY_in_record3020 = new BitSet(new long[]{0x0020200000000000L});
6223 public static final BitSet FOLLOW_recordAssignment_in_record3023 = new BitSet(new long[]{0x0020000000000000L,0x0000000000004000L});
6224 public static final BitSet FOLLOW_78_in_record3026 = new BitSet(new long[]{0x0000200000000000L});
6225 public static final BitSet FOLLOW_recordAssignment_in_record3028 = new BitSet(new long[]{0x0020000000000000L,0x0000000000004000L});
6226 public static final BitSet FOLLOW_RCURLY_in_record3034 = new BitSet(new long[]{0x0000000000000002L});
6227 public static final BitSet FOLLOW_ID_in_recordAssignment3066 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000400L});
6228 public static final BitSet FOLLOW_74_in_recordAssignment3068 = new BitSet(new long[]{0x2155200000000000L,0x0000000000018000L});
6229 public static final BitSet FOLLOW_value_in_recordAssignment3070 = new BitSet(new long[]{0x0000000000000002L});
6230 public static final BitSet FOLLOW_ID_in_map3100 = new BitSet(new long[]{0x0010000000000000L});
6231 public static final BitSet FOLLOW_LCURLY_in_map3102 = new BitSet(new long[]{0x2175200000000000L,0x0000000000018000L});
6232 public static final BitSet FOLLOW_mapAssignment_in_map3105 = new BitSet(new long[]{0x0020000000000000L,0x0000000000004000L});
6233 public static final BitSet FOLLOW_78_in_map3108 = new BitSet(new long[]{0x2155200000000000L,0x0000000000018000L});
6234 public static final BitSet FOLLOW_mapAssignment_in_map3110 = new BitSet(new long[]{0x0020000000000000L,0x0000000000004000L});
6235 public static final BitSet FOLLOW_RCURLY_in_map3116 = new BitSet(new long[]{0x0000000000000002L});
6236 public static final BitSet FOLLOW_value_in_mapAssignment3148 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000400L});
6237 public static final BitSet FOLLOW_74_in_mapAssignment3150 = new BitSet(new long[]{0x2155200000000000L,0x0000000000018000L});
6238 public static final BitSet FOLLOW_value_in_mapAssignment3152 = new BitSet(new long[]{0x0000000000000002L});
6239 public static final BitSet FOLLOW_arrayType_in_synpred1_Graph2075 = new BitSet(new long[]{0x0000000000000002L});
6240 public static final BitSet FOLLOW_LPAREN_in_synpred2_Graph2354 = new BitSet(new long[]{0x0000000000000002L});