/** $x Attribute: rule arguments, return values, predefined rule prop. */ @Override public Attribute resolveToAttribute(String x, ActionAST node) { if ( args!=null ) { Attribute a = args.get(x); if ( a!=null ) return a; } if ( retvals!=null ) { Attribute a = retvals.get(x); if ( a!=null ) return a; } if ( locals!=null ) { Attribute a = locals.get(x); if ( a!=null ) return a; } AttributeDict properties = getPredefinedScope(LabelType.RULE_LABEL); return properties.get(x); }
/** $x Attribute: rule arguments, return values, predefined rule prop. */ @Override public Attribute resolveToAttribute(String x, ActionAST node) { if ( args!=null ) { Attribute a = args.get(x); if ( a!=null ) return a; } if ( retvals!=null ) { Attribute a = retvals.get(x); if ( a!=null ) return a; } if ( locals!=null ) { Attribute a = locals.get(x); if ( a!=null ) return a; } AttributeDict properties = getPredefinedScope(LabelType.RULE_LABEL); return properties.get(x); }
/** $x Attribute: rule arguments, return values, predefined rule prop. */ @Override public Attribute resolveToAttribute(String x, ActionAST node) { if ( args!=null ) { Attribute a = args.get(x); if ( a!=null ) return a; } if ( retvals!=null ) { Attribute a = retvals.get(x); if ( a!=null ) return a; } if ( locals!=null ) { Attribute a = locals.get(x); if ( a!=null ) return a; } AttributeDict properties = getPredefinedScope(LabelType.RULE_LABEL); return properties.get(x); }
/** $x Attribute: rule arguments, return values, predefined rule prop. */ @Override public Attribute resolveToAttribute(String x, ActionAST node) { if ( args!=null ) { Attribute a = args.get(x); if ( a!=null ) return a; } if ( retvals!=null ) { Attribute a = retvals.get(x); if ( a!=null ) return a; } if ( locals!=null ) { Attribute a = locals.get(x); if ( a!=null ) return a; } AttributeDict properties = getPredefinedScope(LabelType.RULE_LABEL); return properties.get(x); }
/** $x Attribute: rule arguments, return values, predefined rule prop. */ @Override public Attribute resolveToAttribute(String x, ActionAST node) { if ( args!=null ) { Attribute a = args.get(x); if ( a!=null ) return a; } if ( retvals!=null ) { Attribute a = retvals.get(x); if ( a!=null ) return a; } if ( locals!=null ) { Attribute a = locals.get(x); if ( a!=null ) return a; } AttributeDict properties = getPredefinedScope(LabelType.RULE_LABEL); return properties.get(x); }
protected void checkLocalConflictingDeclarations(Rule r, AttributeDict attributes, AttributeDict referenceAttributes, ErrorType errorType) { if (attributes == null || referenceAttributes == null) { return; } Set<String> conflictingKeys = attributes.intersection(referenceAttributes); for (String key : conflictingKeys) { errMgr.grammarError( errorType, g.fileName, attributes.get(key).token != null ? attributes.get(key).token : ((GrammarAST)r.ast.getChild(0)).token, key, r.name); } }
protected void checkLocalConflictingDeclarations(Rule r, AttributeDict attributes, AttributeDict referenceAttributes, ErrorType errorType) { if (attributes == null || referenceAttributes == null) { return; } Set<String> conflictingKeys = attributes.intersection(referenceAttributes); for (String key : conflictingKeys) { errMgr.grammarError( errorType, g.fileName, attributes.get(key).token != null ? attributes.get(key).token : ((GrammarAST) r.ast.getChild(0)).token, key, r.name); } }
protected void checkLocalConflictingDeclarations(Rule r, AttributeDict attributes, AttributeDict referenceAttributes, ErrorType errorType) { if (attributes == null || referenceAttributes == null) { return; } Set<String> conflictingKeys = attributes.intersection(referenceAttributes); for (String key : conflictingKeys) { errMgr.grammarError( errorType, g.fileName, attributes.get(key).token != null ? attributes.get(key).token : ((GrammarAST)r.ast.getChild(0)).token, key, r.name); } }
protected void checkLocalConflictingDeclarations(Rule r, AttributeDict attributes, AttributeDict referenceAttributes, ErrorType errorType) { if (attributes == null || referenceAttributes == null) { return; } Set<String> conflictingKeys = attributes.intersection(referenceAttributes); for (String key : conflictingKeys) { errMgr.grammarError( errorType, g.fileName, attributes.get(key).token != null ? attributes.get(key).token : ((GrammarAST) r.ast.getChild(0)).token, key, r.name); } }
protected void checkLocalConflictingDeclarations(@NotNull Rule r, @Nullable AttributeDict attributes, @Nullable AttributeDict referenceAttributes, @NotNull ErrorType errorType) { if (attributes == null || referenceAttributes == null) { return; } Set<String> conflictingKeys = attributes.intersection(referenceAttributes); for (String key : conflictingKeys) { errMgr.grammarError( errorType, g.fileName, attributes.get(key).token != null ? attributes.get(key).token : ((GrammarAST)r.ast.getChild(0)).token, key, r.name); } }
/** $x.y Attribute: x is surrounding rule, label ref (in any alts) */ @Override public Attribute resolveToAttribute(String x, String y, ActionAST node) { LabelElementPair anyLabelDef = getAnyLabelDef(x); if ( anyLabelDef!=null ) { if ( anyLabelDef.type==LabelType.RULE_LABEL ) { return g.getRule(anyLabelDef.element.getText()).resolveRetvalOrProperty(y); } else { AttributeDict scope = getPredefinedScope(anyLabelDef.type); if (scope == null) { return null; } return scope.get(y); } } return null; }
/** $x.y Attribute: x is surrounding rule, label ref (in any alts) */ @Override public Attribute resolveToAttribute(String x, String y, ActionAST node) { LabelElementPair anyLabelDef = getAnyLabelDef(x); if ( anyLabelDef!=null ) { if ( anyLabelDef.type==LabelType.RULE_LABEL ) { return g.getRule(anyLabelDef.element.getText()).resolveRetvalOrProperty(y); } else { AttributeDict scope = getPredefinedScope(anyLabelDef.type); if (scope == null) { return null; } return scope.get(y); } } return null; }
/** $x.y Attribute: x is surrounding rule, label ref (in any alts) */ @Override public Attribute resolveToAttribute(String x, String y, ActionAST node) { LabelElementPair anyLabelDef = getAnyLabelDef(x); if ( anyLabelDef!=null ) { if ( anyLabelDef.type==LabelType.RULE_LABEL ) { return g.getRule(anyLabelDef.element.getText()).resolveRetvalOrProperty(y); } else { AttributeDict scope = getPredefinedScope(anyLabelDef.type); if (scope == null) { return null; } return scope.get(y); } } return null; }
/** $x.y Attribute: x is surrounding rule, label ref (in any alts) */ @Override public Attribute resolveToAttribute(String x, String y, ActionAST node) { LabelElementPair anyLabelDef = getAnyLabelDef(x); if ( anyLabelDef!=null ) { if ( anyLabelDef.type==LabelType.RULE_LABEL ) { return g.getRule(anyLabelDef.element.getText()).resolveRetvalOrProperty(y); } else { AttributeDict scope = getPredefinedScope(anyLabelDef.type); if (scope == null) { return null; } return scope.get(y); } } return null; }
/** $x.y Attribute: x is surrounding rule, label ref (in any alts) */ @Override public Attribute resolveToAttribute(String x, String y, ActionAST node) { LabelElementPair anyLabelDef = getAnyLabelDef(x); if ( anyLabelDef!=null ) { if ( anyLabelDef.type==LabelType.RULE_LABEL ) { return g.getRule(anyLabelDef.element.getText()).resolveRetvalOrProperty(y); } else { AttributeDict scope = getPredefinedScope(anyLabelDef.type); if (scope == null) { return null; } return scope.get(y); } } return null; }