From 3b43b79da15be994348f13035474925ba592fe1f Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Fri, 15 Sep 2017 10:06:42 +0200 Subject: [PATCH] Add standalone template generator --- tool/src/org/antlr/v4/unicode/UnicodeRenderer.java | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tool/src/org/antlr/v4/unicode/UnicodeRenderer.java diff --git a/tool/src/org/antlr/v4/unicode/UnicodeRenderer.java b/tool/src/org/antlr/v4/unicode/UnicodeRenderer.java new file mode 100644 index 0000000..9e53213 --- /dev/null +++ b/tool/src/org/antlr/v4/unicode/UnicodeRenderer.java @@ -0,0 +1,33 @@ +package org.antlr.v4.unicode; + +import org.stringtemplate.v4.*; +import org.stringtemplate.v4.misc.ErrorBuffer; +import org.antlr.v4.unicode.UnicodeDataTemplateController; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.util.Map; +import java.util.Map.Entry; + +public class UnicodeRenderer extends UnicodeDataTemplateController { + public static void main(String[] arg) + throws IOException { + String inputdir = arg[0]; + String input = arg[1]; + String output = arg[2]; + + FileWriter fileWriter = new FileWriter(new File(output)); + ErrorBuffer listener = new ErrorBuffer(); + + STGroupDir group = new STGroupDir(inputdir); + ST st = group.getInstanceOf(input); + + for(Entry entry : getProperties().entrySet()) + st.add(entry.getKey(), entry.getValue()); + + st.write(new AutoIndentWriter(fileWriter), listener); + fileWriter.flush(); + fileWriter.close(); + } +} -- 2.13.5 option value='grep'>log msg
AgeCommit message (Expand)Author
2020-12-27gnu: libffi: On powerpc, patch with --force....As explained in bug 45252, this is the right way to invoke it. Efraim has confirmed that it is OK to make this change on master branch for the generic powerpc case, even though it will in theory cause rebuilds on that architecture, since in practice it isn't actually being used yet. * gnu/packages/libffi.scm (arguments): Change the invocation of the "patch" tool in the case where the %current-target-system or %current-system begins with "powerpc", so that we invoke it using --force instead of --batch. Chris Marusich
2020-12-27gnu: libffi: On powerpc64le, patch using --force....As explained in bug 45252, this is the right way to invoke it. * gnu/packages/libffi.scm (arguments): Change the invocation of the "patch" tool in the case where the %current-target-system or %current-system begins with "powerpc64le", so that we invoke it using --force instead of --batch. Chris Marusich
2020-12-20gnu: libffi: Add unreleased patch to fix float128 on powerpc64le....Fixes <https://bugs.gnu.org/45252>. * gnu/packages/patches/libffi-float128-powerpc64le.patch: Import patch file from <https://github.com/libffi/libffi/pull/561.patch>. * gnu/packages/libffi.scm (libffi)[arguments]: Apply patch conditionally for powerpc64le-* systems in a phase. [inputs]: Add patch as input conditionally for powerpc64le-* systems. * gnu/local.mk (dist_patch_DATA): Add patch file to build system. Signed-off-by: Chris Marusich <cmmarusich@gmail.com> John Doe
2020-11-07gnu: libffi: Fix building on powerpc....* gnu/packages/libffi.scm (libffi)[inputs]: New field. [arguments]: Add 'apply-patch' phase when targeting PowerPC. * gnu/packages/patches/libffi-3.3-powerpc-fixes.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Efraim Flashner