Beispiel #1
0
  private static SymbolList convertList(LinkedList<String> tokens) {
    List<Symbol> contents = new ArrayList<>();

    tokens.removeFirst();
    while (!tokens.getFirst().equals(")")) {
      contents.add(convert(tokens));
    }
    tokens.removeFirst();

    return SymbolPool.getList(contents);
  }
Beispiel #2
0
 private static SymbolAtom convertAtom(LinkedList<String> tokens) {
   return SymbolPool.getAtom(tokens.removeFirst());
 }