diff --git a/antlr4-maven-plugin/pom.xml b/antlr4-maven-plugin/pom.xml index b3dfd37e9..4c7eecbb5 100644 --- a/antlr4-maven-plugin/pom.xml +++ b/antlr4-maven-plugin/pom.xml @@ -48,6 +48,11 @@ 2009 + + 3.3.9 + 1.12.2 + + ' ; +CDSect : '' ; + +fragment +Whitespace : ' ' | '\n' | '\t' | '\r' ; + +fragment +Hexdigit : [a-fA-F0-9] ; + +fragment +Digit : [0-9] ; diff --git a/antlr4-maven-plugin/src/test/projects/importsStandard/pom.xml b/antlr4-maven-plugin/src/test/projects/importsStandard/pom.xml new file mode 100644 index 000000000..6d532b781 --- /dev/null +++ b/antlr4-maven-plugin/src/test/projects/importsStandard/pom.xml @@ -0,0 +1,27 @@ + + 4.0.0 + imports.standard + importsStandard + 1.0-SNAPSHOT + jar + Test importing, standard layout + + + junit + junit + 4.11 + test + + + + + + antlr4-maven-plugin + + + + + + diff --git a/antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/imports/TestBaseLexer.g4 b/antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/imports/TestBaseLexer.g4 new file mode 100644 index 000000000..5fcc6d353 --- /dev/null +++ b/antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/imports/TestBaseLexer.g4 @@ -0,0 +1,16 @@ +lexer grammar TestBaseLexer; + +tokens { Name } + +// Default "mode": Everything OUTSIDE of a tag +Comment : '' ; +CDSect : '' ; + +fragment +Whitespace : ' ' | '\n' | '\t' | '\r' ; + +fragment +Hexdigit : [a-fA-F0-9] ; + +fragment +Digit : [0-9] ; diff --git a/antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/test/Hello.g4 b/antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/test/Hello.g4 new file mode 100644 index 000000000..e38ac8781 --- /dev/null +++ b/antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/test/Hello.g4 @@ -0,0 +1,4 @@ +grammar Hello; +r : 'hello' ID ; +ID : [a-z]+ ; +WS : [ \r\t\n]+ -> skip ; \ No newline at end of file diff --git a/antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/test/TestLexer.g4 b/antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/test/TestLexer.g4 new file mode 100644 index 000000000..668b76496 --- /dev/null +++ b/antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/test/TestLexer.g4 @@ -0,0 +1,6 @@ +lexer grammar TestLexer; + +import TestBaseLexer; + +WS : Whitespace+ -> skip; +TEXT : ~[<&]+ ; // match any 16 bit char other than < and & \ No newline at end of file diff --git a/antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/test/TestParser.g4 b/antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/test/TestParser.g4 new file mode 100644 index 000000000..5c25961e1 --- /dev/null +++ b/antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/test/TestParser.g4 @@ -0,0 +1,5 @@ +parser grammar TestParser; + +options { tokenVocab=TestLexer; } + +document : (Comment | Name) EOF ; \ No newline at end of file