public void addAttribute(String name, String decl) { attributes.put(name, new Attribute(name,decl)); }
public Attribute(String decl) { extractAttribute(decl); }
public void addAttribute(String name, String decl) { attributes.put(name, new Attribute(name,decl)); }
public Attribute(String decl) { extractAttribute(decl); }
public void addAttribute(String name, String decl) { attributes.put(name, new Attribute(name,decl)); }
public Attribute(String decl) { extractAttribute(decl); }
public void addAttribute(String name, String decl) { attributes.put(name, new Attribute(name,decl)); }
public Attribute(String decl) { extractAttribute(decl); }
/** From a chunk of text holding the definitions of the attributes, * pull them apart and create an Attribute for each one. Add to * the list of attributes for this scope. Pass in the character * that terminates a definition such as ',' or ';'. For example, * * scope symbols { * int n; * List names; * } * * would pass in definitions equal to the text in between {...} and * separator=';'. It results in two Attribute objects. */ public void addAttributes(String definitions, int separator) { List<String> attrs = new ArrayList<String>(); CodeGenerator.getListOfArgumentsFromAction(definitions,0,-1,separator,attrs); for (String a : attrs) { Attribute attr = new Attribute(a); if ( !isReturnScope && attr.initValue!=null ) { ErrorManager.grammarError(ErrorManager.MSG_ARG_INIT_VALUES_ILLEGAL, grammar, derivedFromToken, attr.name); attr.initValue=null; // wipe it out } attributes.put(attr.name, attr); } }
/** From a chunk of text holding the definitions of the attributes, * pull them apart and create an Attribute for each one. Add to * the list of attributes for this scope. Pass in the character * that terminates a definition such as ',' or ';'. For example, * * scope symbols { * int n; * List names; * } * * would pass in definitions equal to the text in between {...} and * separator=';'. It results in two Attribute objects. */ public void addAttributes(String definitions, int separator) { List<String> attrs = new ArrayList<String>(); CodeGenerator.getListOfArgumentsFromAction(definitions,0,-1,separator,attrs); for (String a : attrs) { Attribute attr = new Attribute(a); if ( !isReturnScope && attr.initValue!=null ) { ErrorManager.grammarError(ErrorManager.MSG_ARG_INIT_VALUES_ILLEGAL, grammar, derivedFromToken, attr.name); attr.initValue=null; // wipe it out } attributes.put(attr.name, attr); } }
/** From a chunk of text holding the definitions of the attributes, * pull them apart and create an Attribute for each one. Add to * the list of attributes for this scope. Pass in the character * that terminates a definition such as ',' or ';'. For example, * * scope symbols { * int n; * List names; * } * * would pass in definitions equal to the text in between {...} and * separator=';'. It results in two Attribute objects. */ public void addAttributes(String definitions, int separator) { List<String> attrs = new ArrayList<String>(); CodeGenerator.getListOfArgumentsFromAction(definitions,0,-1,separator,attrs); for (String a : attrs) { Attribute attr = new Attribute(a); if ( !isReturnScope && attr.initValue!=null ) { ErrorManager.grammarError(ErrorManager.MSG_ARG_INIT_VALUES_ILLEGAL, grammar, derivedFromToken, attr.name); attr.initValue=null; // wipe it out } attributes.put(attr.name, attr); } }
/** From a chunk of text holding the definitions of the attributes, * pull them apart and create an Attribute for each one. Add to * the list of attributes for this scope. Pass in the character * that terminates a definition such as ',' or ';'. For example, * * scope symbols { * int n; * List names; * } * * would pass in definitions equal to the text in between {...} and * separator=';'. It results in two Attribute objects. */ public void addAttributes(String definitions, int separator) { List<String> attrs = new ArrayList<String>(); CodeGenerator.getListOfArgumentsFromAction(definitions,0,-1,separator,attrs); for (String a : attrs) { Attribute attr = new Attribute(a); if ( !isReturnScope && attr.initValue!=null ) { ErrorManager.grammarError(ErrorManager.MSG_ARG_INIT_VALUES_ILLEGAL, grammar, derivedFromToken, attr.name); attr.initValue=null; // wipe it out } attributes.put(attr.name, attr); } }