[antlr3] 15/17: Backported two fixes for the C template

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Wed Jul 22 16:58:52 UTC 2015


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository antlr3.

commit e0cb356bf26f5deee679864e1dd7fb564931d796
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Wed Jul 22 16:55:21 2015 +0200

    Backported two fixes for the C template
---
 debian/changelog                       |  1 +
 debian/patches/03-fix-c-template.patch | 35 ++++++++++++++++++++++++++++++++++
 debian/patches/series                  |  1 +
 3 files changed, 37 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index efa5553..db765c3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ antlr3 (3.5.2-1) UNRELEASED; urgency=medium
     - Added a dependency on libstringtemplate4-java
     - Refreshed debian/generated-sources
     - Updated the man page
+    - Backported two fixes for the C template
   * debian/rules:
     - Changed the bnd command to work with any upstream version
     - Remove the antlr3 artifacts from debian/maven-repo before invoking Maven
diff --git a/debian/patches/03-fix-c-template.patch b/debian/patches/03-fix-c-template.patch
new file mode 100644
index 0000000..6eabc08
--- /dev/null
+++ b/debian/patches/03-fix-c-template.patch
@@ -0,0 +1,35 @@
+Description: Fix various issues with the C template (backports of patchs proposed upstream)
+Origin: backport, https://github.com/stephengaito/antlr3/commit/adc5e54
+                  https://github.com/stephengaito/antlr3/commit/71df80c
+--- a/tool/src/main/resources/org/antlr/codegen/templates/C/C.stg
++++ b/tool/src/main/resources/org/antlr/codegen/templates/C/C.stg
+@@ -2132,7 +2132,9 @@
+ <if(LEXER)>
+     LRECOVER();
+ <else>
++<! use following code to make it recover inline;
+     RECOVERFROMMISMATCHEDSET(&FOLLOW_set_in_<ruleName><elementIndex>);
++!>
+ <endif>
+     goto rule<ruleDescriptor.name>Ex;
+ }<\n>
+@@ -2143,7 +2145,10 @@
+ EXCEPTION->type         = ANTLR3_MISMATCHED_SET_EXCEPTION;
+ EXCEPTION->name         = (void *)ANTLR3_MISMATCHED_SET_NAME;
+ <if(PARSER)>
++EXCEPTION->expectingSet = NULL;
++<! use following code to make it recover inline;
+ EXCEPTION->expectingSet = &FOLLOW_set_in_<ruleName><elementIndex>;
++!>
+ <endif>
+ >>
+ 
+@@ -2510,7 +2515,7 @@
+  */
+ static const ANTLR3_INT32 * const dfa<dfa.decisionNumber>_transitions[] =
+ {
+-    <dfa.transitionEdgeTables:{xref|dfa<dfa.decisionNumber>_T<xref>}; separator=", ", wrap="\n", null="_empty">
++    <dfa.transitionEdgeTables:{xref|dfa<dfa.decisionNumber>_T<xref>}; separator=", ", wrap="\n", null="NULL">
+ };
+ 
+ <if(dfa.specialStateSTs)>
diff --git a/debian/patches/series b/debian/patches/series
index 43dc470..215f469 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 01-ignore-antlr-plugin.patch
 02-increase-default-conversion-timeout.patch
+03-fix-c-template.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/antlr3.git



More information about the pkg-java-commits mailing list