Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/UPCParser.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/UPCParser.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/UPCParser.java
index e0d60a5636b..6b063b6fc6c 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/UPCParser.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/UPCParser.java
@@ -91,7 +91,7 @@ public class UPCParser extends PrsStream implements RuleAction , IParserActionTo
for (int i = 0; i < unimplemented_symbols.size(); i++)
{
Integer id = (Integer) unimplemented_symbols.get(i);
- System.out.println(" " + UPCParsersym.orderedTerminalSymbols[id.intValue()]);//$NON-NLS-1$
+ System.out.println(" " + UPCParsersym.orderedTerminalSymbols[id.intValue()]);//$NON-NLS-1$
}
System.out.println();
}
@@ -172,8 +172,8 @@ public class UPCParser extends PrsStream implements RuleAction , IParserActionTo
}
-private UPCParserAction action = null;
-private List commentTokens = null;
+private UPCParserAction action = new UPCParserAction (this, UPCParserprs.orderedTerminalSymbols);
+private List commentTokens = new ArrayList();
private IKeywordMap keywordMap = new UPCKeywordMap ();
public UPCParser() { // constructor
@@ -240,6 +240,7 @@ public IParseResult parse() {
boolean encounteredError = action.encounteredError();
IASTCompletionNode compNode = action.getASTCompletionNode();
+ resetTokenStream(); // important, allows memory to be reclaimed
return new C99ParseResult(tu, compNode, encounteredError);
}

Back to the top