1 package edu.uci.eecs.specCompiler.specExtraction;
3 import java.util.ArrayList;
5 public class ParserUtils {
6 public static String trimSpace(String line) {
9 for (i = 0; i < line.length(); i++) {
11 if (ch != ' ' && ch != '\t')
14 for (j = line.length() - 1; j >= 0; j--) {
16 if (ch != ' ' && ch != '\t')
22 return line.substring(i, j + 1);
25 public static String array2Str(ArrayList code) {
26 StringBuilder sb = new StringBuilder();
27 for (int i = 0; i < code.size(); i++) {
28 sb.append(code.get(i) + "\n");