From 160958cbd84e88447454919eaecf8e36e206ad3f Mon Sep 17 00:00:00 2001 From: hansen <dominik_hansen@web.de> Date: Thu, 9 Mar 2017 18:22:38 +0100 Subject: [PATCH] Parser.java supports inheritance --- src/main/resources/org/sablecc/sablecc/parser.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/resources/org/sablecc/sablecc/parser.txt b/src/main/resources/org/sablecc/sablecc/parser.txt index a94ab0c..e75b2af 100644 --- a/src/main/resources/org/sablecc/sablecc/parser.txt +++ b/src/main/resources/org/sablecc/sablecc/parser.txt @@ -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; -- GitLab