예제 #1
0
 public HashMap<String, WFunctionSymbol> getfunctions() {
   HashMap<String, WFunctionSymbol> functions = new HashMap<>();
   for (Symbol s : GLOBALS.getAllSymbols()) {
     if (s instanceof WFunctionSymbol) {
       functions.put(s.getName(), (WFunctionSymbol) s);
     }
   }
   return functions;
 }
예제 #2
0
 public int defineStringLiteral(String s) {
   if (strings.containsKey(s)) return strings.get(s);
   else strings.put(s, ++strIndex);
   return strIndex;
 }