diff --git a/prism/src/parser/PrismParser.java b/prism/src/parser/PrismParser.java index b6753290..60182b44 100644 --- a/prism/src/parser/PrismParser.java +++ b/prism/src/parser/PrismParser.java @@ -16,6 +16,12 @@ public class PrismParser implements PrismParserConstants { // List of keyword strings private static ArrayList keywordList = new ArrayList(); + { + keywordList.clear(); + for (int i = PrismParserConstants.COMMENT+1; i < PrismParserConstants.NOT; i++) { + keywordList.add(PrismParserConstants.tokenImage[i].replaceAll("\u005c"", "")); + } + } //----------------------------------------------------------------------------------- // Main method for testing purposes @@ -85,11 +91,6 @@ public class PrismParser implements PrismParserConstants { { // Call default constructor this(System.in); - // Build a list of strings for keywords - keywordList.clear(); - for (int i = PrismParserConstants.COMMENT+1; i < PrismParserConstants.NOT; i++) { - keywordList.add(PrismParserConstants.tokenImage[i].replaceAll("\u005c"", "")); - } } // Parse modules file diff --git a/prism/src/parser/PrismParser.jj b/prism/src/parser/PrismParser.jj index 692df6cd..7a7de295 100644 --- a/prism/src/parser/PrismParser.jj +++ b/prism/src/parser/PrismParser.jj @@ -49,6 +49,12 @@ public class PrismParser // List of keyword strings private static ArrayList keywordList = new ArrayList(); + { + keywordList.clear(); + for (int i = PrismParserConstants.COMMENT+1; i < PrismParserConstants.NOT; i++) { + keywordList.add(PrismParserConstants.tokenImage[i].replaceAll("\"", "")); + } + } //----------------------------------------------------------------------------------- // Main method for testing purposes @@ -118,11 +124,6 @@ public class PrismParser { // Call default constructor this(System.in); - // Build a list of strings for keywords - keywordList.clear(); - for (int i = PrismParserConstants.COMMENT+1; i < PrismParserConstants.NOT; i++) { - keywordList.add(PrismParserConstants.tokenImage[i].replaceAll("\"", "")); - } } // Parse modules file