public static List<String> getListOfArgumentsFromAction(String actionText, int separatorChar) { List<String> args = new ArrayList<String>(); getListOfArgumentsFromAction(actionText, 0, -1, separatorChar, args); return args; }
public static List<String> getListOfArgumentsFromAction(String actionText, int separatorChar) { List<String> args = new ArrayList<String>(); getListOfArgumentsFromAction(actionText, 0, -1, separatorChar, args); return args; }
public static List<String> getListOfArgumentsFromAction(String actionText, int separatorChar) { List<String> args = new ArrayList<String>(); getListOfArgumentsFromAction(actionText, 0, -1, separatorChar, args); return args; }
public static List<String> getListOfArgumentsFromAction(String actionText, int separatorChar) { List<String> args = new ArrayList<String>(); getListOfArgumentsFromAction(actionText, 0, -1, separatorChar, args); return args; }
break; case '(' : p = getListOfArgumentsFromAction(actionText,p+1,')',separatorChar,args); break; case '{' : p = getListOfArgumentsFromAction(actionText,p+1,'}',separatorChar,args); break; case '<' : p = getListOfArgumentsFromAction(actionText,p+1,'>',separatorChar,args); p = getListOfArgumentsFromAction(actionText,p+1,']',separatorChar,args); break; default :
break; case '(' : p = getListOfArgumentsFromAction(actionText,p+1,')',separatorChar,args); break; case '{' : p = getListOfArgumentsFromAction(actionText,p+1,'}',separatorChar,args); break; case '<' : p = getListOfArgumentsFromAction(actionText,p+1,'>',separatorChar,args); p = getListOfArgumentsFromAction(actionText,p+1,']',separatorChar,args); break; default :
break; case '(' : p = getListOfArgumentsFromAction(actionText,p+1,')',separatorChar,args); break; case '{' : p = getListOfArgumentsFromAction(actionText,p+1,'}',separatorChar,args); break; case '<' : p = getListOfArgumentsFromAction(actionText,p+1,'>',separatorChar,args); p = getListOfArgumentsFromAction(actionText,p+1,']',separatorChar,args); break; default :
/** 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); } }
break; case '(' : p = getListOfArgumentsFromAction(actionText,p+1,')',separatorChar,args); break; case '{' : p = getListOfArgumentsFromAction(actionText,p+1,'}',separatorChar,args); break; case '<' : p = getListOfArgumentsFromAction(actionText,p+1,'>',separatorChar,args); p = getListOfArgumentsFromAction(actionText,p+1,']',separatorChar,args); break; default :
/** 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); } }
List<String> args = getListOfArgumentsFromAction(actionText,','); List<ST> translatedArgs = new ArrayList<ST>(); for (String arg : args) {
List<String> args = getListOfArgumentsFromAction(actionText,','); List<ST> translatedArgs = new ArrayList<ST>(); for (String arg : args) {
List<String> args = getListOfArgumentsFromAction(actionText,','); List<StringTemplate> translatedArgs = new ArrayList<StringTemplate>(); for (String arg : args) {
List<String> args = getListOfArgumentsFromAction(actionText,','); List<StringTemplate> translatedArgs = new ArrayList<StringTemplate>(); for (String arg : args) {