summaryrefslogtreecommitdiff
path: root/tool/src/org/antlr/v4/codegen/model/decl
diff options
context:
space:
mode:
Diffstat (limited to 'tool/src/org/antlr/v4/codegen/model/decl')
-rw-r--r--tool/src/org/antlr/v4/codegen/model/decl/AltLabelStructDecl.java2
-rw-r--r--tool/src/org/antlr/v4/codegen/model/decl/AttributeDecl.java2
-rw-r--r--tool/src/org/antlr/v4/codegen/model/decl/CodeBlock.java2
-rw-r--r--tool/src/org/antlr/v4/codegen/model/decl/ContextGetterDecl.java2
-rw-r--r--tool/src/org/antlr/v4/codegen/model/decl/ContextRuleGetterDecl.java7
-rw-r--r--tool/src/org/antlr/v4/codegen/model/decl/ContextRuleListGetterDecl.java2
-rw-r--r--tool/src/org/antlr/v4/codegen/model/decl/ContextRuleListIndexedGetterDecl.java2
-rw-r--r--tool/src/org/antlr/v4/codegen/model/decl/ContextTokenGetterDecl.java7
-rw-r--r--tool/src/org/antlr/v4/codegen/model/decl/ContextTokenListGetterDecl.java2
-rw-r--r--tool/src/org/antlr/v4/codegen/model/decl/ContextTokenListIndexedGetterDecl.java2
-rw-r--r--tool/src/org/antlr/v4/codegen/model/decl/Decl.java2
-rw-r--r--tool/src/org/antlr/v4/codegen/model/decl/ElementListDecl.java2
-rw-r--r--tool/src/org/antlr/v4/codegen/model/decl/RuleContextDecl.java2
-rw-r--r--tool/src/org/antlr/v4/codegen/model/decl/RuleContextListDecl.java2
-rw-r--r--tool/src/org/antlr/v4/codegen/model/decl/StructDecl.java2
-rw-r--r--tool/src/org/antlr/v4/codegen/model/decl/TokenDecl.java2
-rw-r--r--tool/src/org/antlr/v4/codegen/model/decl/TokenListDecl.java2
-rw-r--r--tool/src/org/antlr/v4/codegen/model/decl/TokenTypeDecl.java2
18 files changed, 26 insertions, 20 deletions
diff --git a/tool/src/org/antlr/v4/codegen/model/decl/AltLabelStructDecl.java b/tool/src/org/antlr/v4/codegen/model/decl/AltLabelStructDecl.java
index b855b28..a0a8cc8 100644
--- a/tool/src/org/antlr/v4/codegen/model/decl/AltLabelStructDecl.java
+++ b/tool/src/org/antlr/v4/codegen/model/decl/AltLabelStructDecl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
+ * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
diff --git a/tool/src/org/antlr/v4/codegen/model/decl/AttributeDecl.java b/tool/src/org/antlr/v4/codegen/model/decl/AttributeDecl.java
index 80af232..0436752 100644
--- a/tool/src/org/antlr/v4/codegen/model/decl/AttributeDecl.java
+++ b/tool/src/org/antlr/v4/codegen/model/decl/AttributeDecl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
+ * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
diff --git a/tool/src/org/antlr/v4/codegen/model/decl/CodeBlock.java b/tool/src/org/antlr/v4/codegen/model/decl/CodeBlock.java
index 89e1f20..2e608a1 100644
--- a/tool/src/org/antlr/v4/codegen/model/decl/CodeBlock.java
+++ b/tool/src/org/antlr/v4/codegen/model/decl/CodeBlock.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
+ * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
diff --git a/tool/src/org/antlr/v4/codegen/model/decl/ContextGetterDecl.java b/tool/src/org/antlr/v4/codegen/model/decl/ContextGetterDecl.java
index fc4b262..b708f8a 100644
--- a/tool/src/org/antlr/v4/codegen/model/decl/ContextGetterDecl.java
+++ b/tool/src/org/antlr/v4/codegen/model/decl/ContextGetterDecl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
+ * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
diff --git a/tool/src/org/antlr/v4/codegen/model/decl/ContextRuleGetterDecl.java b/tool/src/org/antlr/v4/codegen/model/decl/ContextRuleGetterDecl.java
index b763965..322054d 100644
--- a/tool/src/org/antlr/v4/codegen/model/decl/ContextRuleGetterDecl.java
+++ b/tool/src/org/antlr/v4/codegen/model/decl/ContextRuleGetterDecl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
+ * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
@@ -11,8 +11,11 @@ import org.antlr.v4.codegen.OutputModelFactory;
/** {@code public XContext X() { }} */
public class ContextRuleGetterDecl extends ContextGetterDecl {
public String ctxName;
- public ContextRuleGetterDecl(OutputModelFactory factory, String name, String ctxName) {
+ public boolean optional;
+
+ public ContextRuleGetterDecl(OutputModelFactory factory, String name, String ctxName, boolean optional) {
super(factory, name);
this.ctxName = ctxName;
+ this.optional = optional;
}
}
diff --git a/tool/src/org/antlr/v4/codegen/model/decl/ContextRuleListGetterDecl.java b/tool/src/org/antlr/v4/codegen/model/decl/ContextRuleListGetterDecl.java
index 4daf182..43e5d3c 100644
--- a/tool/src/org/antlr/v4/codegen/model/decl/ContextRuleListGetterDecl.java
+++ b/tool/src/org/antlr/v4/codegen/model/decl/ContextRuleListGetterDecl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
+ * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
diff --git a/tool/src/org/antlr/v4/codegen/model/decl/ContextRuleListIndexedGetterDecl.java b/tool/src/org/antlr/v4/codegen/model/decl/ContextRuleListIndexedGetterDecl.java
index 175394f..4399c4c 100644
--- a/tool/src/org/antlr/v4/codegen/model/decl/ContextRuleListIndexedGetterDecl.java
+++ b/tool/src/org/antlr/v4/codegen/model/decl/ContextRuleListIndexedGetterDecl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
+ * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
diff --git a/tool/src/org/antlr/v4/codegen/model/decl/ContextTokenGetterDecl.java b/tool/src/org/antlr/v4/codegen/model/decl/ContextTokenGetterDecl.java
index d663181..2ca6478 100644
--- a/tool/src/org/antlr/v4/codegen/model/decl/ContextTokenGetterDecl.java
+++ b/tool/src/org/antlr/v4/codegen/model/decl/ContextTokenGetterDecl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
+ * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
@@ -10,7 +10,10 @@ import org.antlr.v4.codegen.OutputModelFactory;
/** {@code public Token X() { }} */
public class ContextTokenGetterDecl extends ContextGetterDecl {
- public ContextTokenGetterDecl(OutputModelFactory factory, String name) {
+ public boolean optional;
+
+ public ContextTokenGetterDecl(OutputModelFactory factory, String name, boolean optional) {
super(factory, name);
+ this.optional = optional;
}
}
diff --git a/tool/src/org/antlr/v4/codegen/model/decl/ContextTokenListGetterDecl.java b/tool/src/org/antlr/v4/codegen/model/decl/ContextTokenListGetterDecl.java
index 7c8e2ff..0005d4b 100644
--- a/tool/src/org/antlr/v4/codegen/model/decl/ContextTokenListGetterDecl.java
+++ b/tool/src/org/antlr/v4/codegen/model/decl/ContextTokenListGetterDecl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
+ * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
diff --git a/tool/src/org/antlr/v4/codegen/model/decl/ContextTokenListIndexedGetterDecl.java b/tool/src/org/antlr/v4/codegen/model/decl/ContextTokenListIndexedGetterDecl.java
index bc722c9..4db542a 100644
--- a/tool/src/org/antlr/v4/codegen/model/decl/ContextTokenListIndexedGetterDecl.java
+++ b/tool/src/org/antlr/v4/codegen/model/decl/ContextTokenListIndexedGetterDecl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
+ * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
diff --git a/tool/src/org/antlr/v4/codegen/model/decl/Decl.java b/tool/src/org/antlr/v4/codegen/model/decl/Decl.java
index 2cbcf9c..b2b9742 100644
--- a/tool/src/org/antlr/v4/codegen/model/decl/Decl.java
+++ b/tool/src/org/antlr/v4/codegen/model/decl/Decl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
+ * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
diff --git a/tool/src/org/antlr/v4/codegen/model/decl/ElementListDecl.java b/tool/src/org/antlr/v4/codegen/model/decl/ElementListDecl.java
index f5fa1bb..e89db11 100644
--- a/tool/src/org/antlr/v4/codegen/model/decl/ElementListDecl.java
+++ b/tool/src/org/antlr/v4/codegen/model/decl/ElementListDecl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
+ * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
diff --git a/tool/src/org/antlr/v4/codegen/model/decl/RuleContextDecl.java b/tool/src/org/antlr/v4/codegen/model/decl/RuleContextDecl.java
index a6c7eff..2169618 100644
--- a/tool/src/org/antlr/v4/codegen/model/decl/RuleContextDecl.java
+++ b/tool/src/org/antlr/v4/codegen/model/decl/RuleContextDecl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
+ * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
diff --git a/tool/src/org/antlr/v4/codegen/model/decl/RuleContextListDecl.java b/tool/src/org/antlr/v4/codegen/model/decl/RuleContextListDecl.java
index 8418dbf..decf0f6 100644
--- a/tool/src/org/antlr/v4/codegen/model/decl/RuleContextListDecl.java
+++ b/tool/src/org/antlr/v4/codegen/model/decl/RuleContextListDecl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
+ * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
diff --git a/tool/src/org/antlr/v4/codegen/model/decl/StructDecl.java b/tool/src/org/antlr/v4/codegen/model/decl/StructDecl.java
index 14a764c..f7a48ee 100644
--- a/tool/src/org/antlr/v4/codegen/model/decl/StructDecl.java
+++ b/tool/src/org/antlr/v4/codegen/model/decl/StructDecl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
+ * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
diff --git a/tool/src/org/antlr/v4/codegen/model/decl/TokenDecl.java b/tool/src/org/antlr/v4/codegen/model/decl/TokenDecl.java
index 6545125..b42e9c7 100644
--- a/tool/src/org/antlr/v4/codegen/model/decl/TokenDecl.java
+++ b/tool/src/org/antlr/v4/codegen/model/decl/TokenDecl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
+ * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
diff --git a/tool/src/org/antlr/v4/codegen/model/decl/TokenListDecl.java b/tool/src/org/antlr/v4/codegen/model/decl/TokenListDecl.java
index ecbfac7..beb334d 100644
--- a/tool/src/org/antlr/v4/codegen/model/decl/TokenListDecl.java
+++ b/tool/src/org/antlr/v4/codegen/model/decl/TokenListDecl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
+ * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
diff --git a/tool/src/org/antlr/v4/codegen/model/decl/TokenTypeDecl.java b/tool/src/org/antlr/v4/codegen/model/decl/TokenTypeDecl.java
index c13ce63..da9e037 100644
--- a/tool/src/org/antlr/v4/codegen/model/decl/TokenTypeDecl.java
+++ b/tool/src/org/antlr/v4/codegen/model/decl/TokenTypeDecl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
+ * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/