Commit 160958cb authored by hansen's avatar hansen
Browse files

Parser.java supports inheritance

parent 43310961
......@@ -41,8 +41,8 @@ public class Parser implements IParser
private final static int ACCEPT = 2;
private final static int ERROR = 3;
private ArrayList firstPopped = null;
private ArrayList lastPopped = null;
protected ArrayList firstPopped = null;
protected ArrayList lastPopped = null;
private ITokenListContainer lex;
public Parser( Lexer lexer)
......@@ -60,7 +60,7 @@ public class Parser implements IParser
}
private void checkResult(Object elementToCheck, boolean slurp) {
protected void checkResult(Object elementToCheck, boolean slurp) {
// nodes with no tokens or sub nodes at all may exist
if (this.firstPopped == null) {
return;
......@@ -261,7 +261,7 @@ Macro:ParserCommon
return s.state;
}
private ArrayList pop()
protected ArrayList pop()
{
ArrayList list = ((State) this.stack.previous()).nodes;
if (this.firstPopped == null) {
......@@ -395,7 +395,7 @@ Macro:ParserNewHeader
ArrayList new$0$() /* reduce $1$ */
protected ArrayList new$0$() /* reduce $1$ */
{
this.firstPopped = null;
this.lastPopped = null;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment