Skip to content

Make it work with Chinese on ubuntu 18.04 #64

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
422 changes: 422 additions & 0 deletions antlr-3.1.3/BUILD.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions antlr-3.1.3/antlr.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fred=99
81 changes: 81 additions & 0 deletions antlr-3.1.3/gunit/CHANGES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
gUnit 1.0.5
Nov 25, 2008

Leon, Jen-Yuan Su
leonsu at mac com

CHANGES

Feb 17, 2009

* added new interfaces for GUI editor

* recognizes invalid input as a FAIL case instead of throwing an exception

Steve Ebersole provided a patch for the following two fixes.
* allows setting an output directory (for JUnitCodeGen)

* allows providing a classloader (for both JUnitCodeGen and gUnitExecutor)

Nov 25, 2008

* fixed external test file path issue. if an input test file is not found under the current dir, then try to look for it under the package dir also.

* fixed multiple-line input indentation issue.

* fixed bug: FileNotFoundException terminated gUnit tests due to any non-existent input test file.

* display escaped text for newline characters in the test result for comparing expected and actual string.

Nov 20, 2008

* added new functionality of testing lexical rules

* fixed bug of using PipedInput/Output Stream and changed to ByteArrayOutputStream. Jared Bunting provided a patch on this issue.

* improved jUnit translation mode and moved supporting codes into gUnitBaseTest.

Oct 31, 2008

* fixed bug of testing a tree grammar's template output

July 9, 2008

* fixed bug: program exited upon InvocationTargetException
Sumanto Biswas pointed out the issue and provided suggestions.

* Better handle on test rule's StringTemplate output

May 10, 2008

* added exit code functionality

* fixed string escaping bug for junit generator

1.0.2 - Apr 01, 2008

* fixed grammar bug: multiple-line input, AST output

* adjusted the output of test result

Mar 20, 2008

* moved test result to string template (gUnitTestResult.stg)

* added the display of line of test in the test result

Feb 19, 2008

* fixed bug of displaying test sequence and error message from ANTLR

Feb 8, 2008

* made compatible with ANTLR 3.1b1

1.0.1 - Jan 11, 2008

* Kenny MacDermid helps with code refactoring

1.0 - Aug 20, 2007

Initial early access release
26 changes: 26 additions & 0 deletions antlr-3.1.3/gunit/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[The "BSD licence"]
Copyright (c) 2007-2008 Leon, Jen-Yuan Su
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
56 changes: 56 additions & 0 deletions antlr-3.1.3/gunit/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
gUnit 1.0.5
Feb 21, 2009

Leon, Jen-Yuan Su
leonsu at mac com

INTRODUCTION

Welcome to gUnit! I've been working on gUnit from 2007 summer and
this is a project in USF CS, sponsored by professor Terence.

You should use the latest ANTLR v3.1 with gUnit:

http://www.antlr.org/download.html

See the wiki document:

http://www.antlr.org/wiki/display/ANTLR3/gUnit+-+Grammar+Unit+Testing

Per the license in LICENSE.txt, this software is not guaranteed to
work and might even destroy all life on this planet:

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

----------------------------------------------------------------------

EXAMPLES

See the wiki tutorial of gUnit:

http://www.antlr.org/wiki/display/ANTLR3/gUnit+-+Grammar+Unit+Testing

----------------------------------------------------------------------

What is gUnit?

gUnit is an unit testing framework for ANTLR grammars. It provides a
simple way to write and run automated tests for grammars in a manner
similar to what jUnit does for unit testing.

----------------------------------------------------------------------

How do I install gUnit?

Just add gunit-1.0.5.jar to your CLASSPATH, and also make sure that
both ANTLR and StringTemplate jars lie in CLASSPATH.
Empty file added antlr-3.1.3/gunit/antlr.config
Empty file.
168 changes: 168 additions & 0 deletions antlr-3.1.3/gunit/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.antlr</groupId>
<artifactId>gunit</artifactId>
<packaging>jar</packaging>

<name>ANTLR gUnit</name>
<!--

Inherit from the ANTLR master pom, which tells us what
version we are and allows us to inherit dependencies
and so on.

-->
<parent>
<groupId>org.antlr</groupId>
<artifactId>antlr-master</artifactId>
<version>3.1.3</version>
</parent>

<url>http://www.antlr.org/wiki/display/ANTLR3/gUnit+-+Grammar+Unit+Testing</url>

<!--

Define where the ANTLR gUnit jar is deployed both for
the main ANTLR repository, which syncs with the maven main
repository, and the snapshot repository, which can be
used by developers that need the latest development version of
something, but is used here to ensure that snapshot builds of the
ANTLR tool pick up the latest snapshot of the runtime and string tempalte
and whatever else it might need in the future.
-->
<distributionManagement>

<repository>
<id>antlr-repo</id>
<name>ANTLR Testing repository</name>
<url>scpexe://antlr.org/home/mavensync/antlr-repo</url>
</repository>

<snapshotRepository>
<id>antlr-snapshot</id>
<name>ANTLR Testing Snapshot Repository</name>
<url>scpexe://antlr.org/home/mavensync/antlr-snapshot</url>
</snapshotRepository>

</distributionManagement>

<!--

Inform Maven of the ANTLR snapshot repository, which it will
need to consult to get the latest snapshot build of the runtime and so on, should
this project need the latest builds from the antlr snapshots and not the pre-built
released jars from the repository.
-->
<repositories>

<!--
This is the ANTLR repository.
-->
<repository>
<id>antlr-snapshot</id>
<name>ANTLR Testing Snapshot Repository</name>
<url>http://antlr.org/antlr-snapshot</url>
<snapshots>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>

</repositories>

<!--

Tell Maven which other artifacts we need in order to
build, run and test the ANTLR Tool. The ANTLR Tool uses earlier versions
of ANTLR at runtime (for the moment), uses the current
released version of ANTLR String template, but obviously is
reliant on the latest snapshot of the runtime, which will either be
taken from the antlr-snapshot repository, or your local .m2
repository if you built and installed that locally.

-->
<dependencies>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr</artifactId>
<version>${project.version}</version>
<scope>compile</scope>

</dependency>

<dependency>
<groupId>org.antlr</groupId>
<artifactId>stringtemplate</artifactId>
<version>3.2</version>
<scope>compile</scope>
</dependency>



</dependencies>

<build>

<defaultGoal>install</defaultGoal>

<plugins>

<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr3-maven-plugin</artifactId>
<version>${project.version}</version>
<configuration></configuration>
<executions>
<execution>
<goals>
<goal>antlr</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<sourceDirectory>src</sourceDirectory>
</configuration>
</plugin>

<plugin>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<findbugsXmlOutput>true</findbugsXmlOutput>
<findbugsXmlWithMessages>true</findbugsXmlWithMessages>
<xmlOutput>true</xmlOutput>
</configuration>
</plugin>

</plugins>

<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh-external</artifactId>
<version>1.0-beta-2</version>
</extension>
</extensions>


</build>

</project>
Loading