-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(regression): add created source files to spoon input (#70)
- Loading branch information
1 parent
4f6de46
commit f2bc42c
Showing
10 changed files
with
147 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<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>test.javacc.spoon</groupId> | ||
<artifactId>foo</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<properties> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<maven.compiler.target>1.8</maven.compiler.target> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
<dependencies> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>javacc-maven-plugin</artifactId> | ||
<version>2.6</version> | ||
<executions> | ||
<execution> | ||
<id>javacc</id> | ||
<goals> | ||
<goal>javacc</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<dependencies> | ||
<dependency> | ||
<groupId>net.java.dev.javacc</groupId> | ||
<artifactId>javacc</artifactId> | ||
<version>7.0.6</version> | ||
</dependency> | ||
</dependencies> | ||
</plugin> | ||
<plugin> | ||
<groupId>fr.inria.gforge.spoon</groupId> | ||
<artifactId>spoon-maven-plugin</artifactId> | ||
<version>3.5-SNAPSHOT</version> | ||
<executions> | ||
<execution> | ||
<phase>generate-sources</phase> | ||
<goals> | ||
<goal>generate</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<includeTest>false</includeTest> | ||
<includeSource>true</includeSource> | ||
<noClasspath>false</noClasspath> | ||
<debug>true</debug> | ||
<processors> | ||
<processor>fr.inria.gforge.spoon.mojo.CountStatementProcessor</processor> | ||
</processors> | ||
</configuration> | ||
<dependencies> | ||
<dependency> | ||
<groupId>fr.inria.gforge.spoon</groupId> | ||
<artifactId>processors</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</dependency> | ||
</dependencies> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
19 changes: 19 additions & 0 deletions
19
src/test/projects/javacc-generate/src/main/java/test/javacc/spoon/App.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package test.javacc.spoon; | ||
|
||
import generate.javacc.spoon.Example; | ||
/** | ||
* Hello world! | ||
*/ | ||
public final class App { | ||
private App() { | ||
} | ||
|
||
/** | ||
* Says hello to the world. | ||
* @param args The arguments of the program. | ||
*/ | ||
public static void main(String[] args) { | ||
Example example = new Example(System.in); | ||
System.out.println("Hello World!"); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
src/test/projects/javacc-generate/src/main/javacc/Example.jj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
PARSER_BEGIN(Example) | ||
package generate.javacc.spoon; | ||
/** Simple brace matcher. */ | ||
public class Example { | ||
|
||
/** Main entry point. */ | ||
public static void main(String args[]) throws ParseException { | ||
Example parser = new Example(System.in); | ||
parser.Input(); | ||
} | ||
|
||
} | ||
|
||
PARSER_END(Example) | ||
|
||
/** Root production. */ | ||
void Input() : | ||
{} | ||
{ | ||
MatchedBraces() ("\n"|"\r")* <EOF> | ||
} | ||
|
||
/** Brace matching production. */ | ||
void MatchedBraces() : | ||
{} | ||
{ | ||
"{" [ MatchedBraces() ] "}" | ||
} |