diff --git a/src/main/java/org/sablecc/sablecc/analysis/Analysis.java b/src/main/java/org/sablecc/sablecc/analysis/Analysis.java index 999e37aa76d901764bba0d5d048dbe255ea3fadd..85fdad18cd97a8c34a5bde4b63275e119e532ac4 100644 --- a/src/main/java/org/sablecc/sablecc/analysis/Analysis.java +++ b/src/main/java/org/sablecc/sablecc/analysis/Analysis.java @@ -6,38 +6,6 @@ import org.sablecc.sablecc.node.*; public interface Analysis extends Switch { - /** - * @param node the node for which to look up the associated object - * @return the corresponding object previously associated using {@link #setIn(Node, Object)}, or {@code null} if there is none - * @deprecated If you need a map field, declare it yourself. - */ - @Deprecated - Object getIn(Node node); - - /** - * @param node the node with which to associate the given object - * @param o the object to associate with the node - * @deprecated If you need a map field, declare it yourself. - */ - @Deprecated - void setIn(Node node, Object o); - - /** - * @param node the node for which to look up the associated object - * @return the corresponding object previously associated using {@link #setOut(Node, Object)}, or {@code null} if there is none - * @deprecated If you need a map field, declare it yourself. - */ - @Deprecated - Object getOut(Node node); - - /** - * @param node the node with which to associate the given object - * @param o the object to associate with the node - * @deprecated If you need a map field, declare it yourself. - */ - @Deprecated - void setOut(Node node, Object o); - void caseStart(Start node); void caseAGrammar(AGrammar node); void caseAHelpers(AHelpers node); diff --git a/src/main/java/org/sablecc/sablecc/analysis/AnalysisAdapter.java b/src/main/java/org/sablecc/sablecc/analysis/AnalysisAdapter.java index c07b2600c60eb1a18f3fef46da7b244d42d8e74a..5dfa2cec56a25b4cbd219525f7e235f7811fe7dd 100644 --- a/src/main/java/org/sablecc/sablecc/analysis/AnalysisAdapter.java +++ b/src/main/java/org/sablecc/sablecc/analysis/AnalysisAdapter.java @@ -2,85 +2,10 @@ package org.sablecc.sablecc.analysis; -import java.util.*; import org.sablecc.sablecc.node.*; public class AnalysisAdapter implements Analysis { - /** - * @deprecated If you need a map field, declare it yourself. - */ - @Deprecated - private Hashtable<Node,Object> in; - - /** - * @deprecated If you need a map field, declare it yourself. - */ - @Deprecated - private Hashtable<Node,Object> out; - - @Deprecated - @Override - public Object getIn(Node node) - { - if(this.in == null) - { - return null; - } - - return this.in.get(node); - } - - @Deprecated - @Override - public void setIn(Node node, Object o) - { - if(this.in == null) - { - this.in = new Hashtable<Node,Object>(1); - } - - if(o != null) - { - this.in.put(node, o); - } - else - { - this.in.remove(node); - } - } - - @Deprecated - @Override - public Object getOut(Node node) - { - if(this.out == null) - { - return null; - } - - return this.out.get(node); - } - - @Deprecated - @Override - public void setOut(Node node, Object o) - { - if(this.out == null) - { - this.out = new Hashtable<Node,Object>(1); - } - - if(o != null) - { - this.out.put(node, o); - } - else - { - this.out.remove(node); - } - } - @Override public void caseStart(Start node) { diff --git a/src/main/java/org/sablecc/sablecc/parser/Parser.java b/src/main/java/org/sablecc/sablecc/parser/Parser.java index c9535dfa6f49dd99abe9764e6e84e6094d3f2a5a..b8df0f004b0bc22a3ba73146404ac60eec18ce8d 100644 --- a/src/main/java/org/sablecc/sablecc/parser/Parser.java +++ b/src/main/java/org/sablecc/sablecc/parser/Parser.java @@ -145,16 +145,6 @@ public class Parser implements IParser return -1; } - /** - * @param productionRuleAsString internal name of the production rule in question - * @return {@code false} if creation of a new list should be skipped, {@code true} for default behavior - * @deprecated Overriding this method no longer has any effect. This optimization is now applied automatically iff it is safe. - */ - @Deprecated - protected boolean addElementsFromListToNewList(String productionRuleAsString) { - return true; - } - private void push(int numstate, List<Object> listNode) throws ParserException, LexerException, IOException { this.nodeList = listNode; diff --git a/src/main/resources/org/sablecc/sablecc/analyses.txt b/src/main/resources/org/sablecc/sablecc/analyses.txt index 4a316079af302c480ee5a8f21a58d2a4215dfb89..4abcb0807f6cee3f7b3f74bbe818809ed45a7c5e 100644 --- a/src/main/resources/org/sablecc/sablecc/analyses.txt +++ b/src/main/resources/org/sablecc/sablecc/analyses.txt @@ -14,38 +14,6 @@ import $1$.*; public interface Analysis extends Switch { - /** - * @param node the node for which to look up the associated object - * @return the corresponding object previously associated using {@link #setIn(Node, Object)}, or {@code null} if there is none - * @deprecated If you need a map field, declare it yourself. - */ - @Deprecated - Object getIn(Node node); - - /** - * @param node the node with which to associate the given object - * @param o the object to associate with the node - * @deprecated If you need a map field, declare it yourself. - */ - @Deprecated - void setIn(Node node, Object o); - - /** - * @param node the node for which to look up the associated object - * @return the corresponding object previously associated using {@link #setOut(Node, Object)}, or {@code null} if there is none - * @deprecated If you need a map field, declare it yourself. - */ - @Deprecated - Object getOut(Node node); - - /** - * @param node the node with which to associate the given object - * @param o the object to associate with the node - * @deprecated If you need a map field, declare it yourself. - */ - @Deprecated - void setOut(Node node, Object o); - $ Macro:AnalysisStart @@ -69,85 +37,10 @@ Macro:AnalysisAdapterHeader package $0$; -import java.util.*; import $1$.*; public class AnalysisAdapter implements Analysis { - /** - * @deprecated If you need a map field, declare it yourself. - */ - @Deprecated - private Hashtable<Node,Object> in; - - /** - * @deprecated If you need a map field, declare it yourself. - */ - @Deprecated - private Hashtable<Node,Object> out; - - @Deprecated - @Override - public Object getIn(Node node) - { - if(this.in == null) - { - return null; - } - - return this.in.get(node); - } - - @Deprecated - @Override - public void setIn(Node node, Object o) - { - if(this.in == null) - { - this.in = new Hashtable<Node,Object>(1); - } - - if(o != null) - { - this.in.put(node, o); - } - else - { - this.in.remove(node); - } - } - - @Deprecated - @Override - public Object getOut(Node node) - { - if(this.out == null) - { - return null; - } - - return this.out.get(node); - } - - @Deprecated - @Override - public void setOut(Node node, Object o) - { - if(this.out == null) - { - this.out = new Hashtable<Node,Object>(1); - } - - if(o != null) - { - this.out.put(node, o); - } - else - { - this.out.remove(node); - } - } - $ Macro:AnalysisAdapterStart diff --git a/src/main/resources/org/sablecc/sablecc/parser.txt b/src/main/resources/org/sablecc/sablecc/parser.txt index e24642dd9c693de1b61f505c08586fdaba81ff72..9a416e2497df0848d955bfd5fb0b923768cee9d5 100644 --- a/src/main/resources/org/sablecc/sablecc/parser.txt +++ b/src/main/resources/org/sablecc/sablecc/parser.txt @@ -153,16 +153,6 @@ public class Parser implements IParser return -1; } - /** - * @param productionRuleAsString internal name of the production rule in question - * @return {@code false} if creation of a new list should be skipped, {@code true} for default behavior - * @deprecated Overriding this method no longer has any effect. This optimization is now applied automatically iff it is safe. - */ - @Deprecated - protected boolean addElementsFromListToNewList(String productionRuleAsString) { - return true; - } - $ Macro:ParserInliningPushHeader