Skip to content
Snippets Groups Projects
Commit 2eaf513c authored by dgelessus's avatar dgelessus
Browse files

Remove apparently unused ignoredTokens field from parser.txt template

This field seems to store all ignored tokens encountered during parsing.
It's not clear what this field is meant to do - we don't use it for
anything, and neither does SableCC itself apparently. Removing it
doesn't seem to break anything and should improve memory usage during
parsing a bit.
parent 97a764b8
Branches
Tags
Loading
Checking pipeline status
......@@ -24,8 +24,6 @@ import java.io.IOException;
@SuppressWarnings({"rawtypes","unchecked","unused"})
public class Parser implements IParser
{
public final Analysis ignoredTokens = new AnalysisAdapter();
protected ArrayList nodeList;
private final Lexer lexer;
......@@ -289,23 +287,11 @@ Macro:ParserCommon
this.getMapping().clear();
push(0, null$0$);
List<Node> ign = null;
while(true)
{
while(index(this.lexer.peek()) == -1)
{
if(ign == null)
{
ign = new LinkedList<Node>();
}
ign.add(this.lexer.next());
}
if(ign != null)
{
this.ignoredTokens.setIn(this.lexer.peek(), ign);
ign = null;
this.lexer.next();
}
this.last_pos = this.lexer.peek().getPos();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment