Il plug-in antlr4-maven non sembra essere presente nel sito Web di Antlr4.Come ottenere aiuto sul plug-in antlr4-maven
risposta
che potrebbero farti niente, come mi ha fatto. Prova questo:
mvn org.antlr:antlr4-maven-plugin:help -Ddetail=true
produce:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- antlr4-maven-plugin:4.0:help (default-cli) @ standalone-pom ---
[INFO] ANTLR 4 Maven plugin 4.0
Maven plugin for ANTLR 4 grammars
This plugin has 2 goals:
antlr4:antlr4
Parses ANTLR 4 grammar files *.g4 and transforms them into Java source files.
Available parameters:
arguments
A list of additional command line arguments to pass to the ANTLR tool.
atn
If set to true then the ANTLR tool will generate a description of the ATN
for each rule in Dot format.
encoding
specify grammar file encoding; e.g., euc-jp
excludes
A set of Ant-like exclusion patterns used to prevent certain files from
being processed. By default, this set is empty such that no files are
excluded.
forceATN
Use the ATN simulator for all predictions.
includes
Provides an explicit list of all the grammars that should be included in
the generate phase of the plugin. Note that the plugin is smart enough to
realize that imported grammars should be included but not acted upon
directly by the ANTLR Tool. A set of Ant-like inclusion patterns used to
select files from the source directory for processing. By default, the
pattern **/*.g4 is used to select grammar files.
libDirectory
Specify location of imported grammars and tokens files.
listener
Generate parse tree listener interface and base class.
options
A list of grammar options to explicitly specify to the tool. These options
are passed to the tool using the -D<option>=<value> syntax.
outputDirectory
Specify output directory where the Java files are generated.
sourceDirectory
The directory where the ANTLR grammar files (*.g4) are located.
treatWarningsAsErrors
Treat warnings as errors.
visitor
Generate parse tree visitor interface and base class.
antlr4:help
Display help information on antlr4-maven-plugin.
Call mvn antlr4:help -Ddetail=true -Dgoal=<goal-name> to display parameter
details.
Available parameters:
detail
If true, display all settable properties for each goal.
goal
The name of the goal for which to show help. If unspecified, all goals
will be displayed.
indentSize
The number of spaces per indentation level, should be positive.
lineLength
The maximum length of a display line, should be positive.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.635s
[INFO] Finished at: Wed Jul 03 14:52:12 EDT 2013
[INFO] Final Memory: 3M/81M
[INFO] ------------------------------------------------------------------------
L'antlr4-Maven-plugin ha un obiettivo di aiuto che può essere eseguito, utilizzando Maven, come questo:
mvn antlr4:help -Ddetail=true
Si noti che questo funzionerà solo se si sono già scaricati gli artefatti appropriati. @ La risposta di TomEE funzionerà per la prima volta e poi funzionerà su chiamate successive. –
Qui ci sono due link per aiutare in questo momento:
- (For Maven users) ANTLR4 Maven Project Setup
- (For Eclipse users) How to automatically generate lexer+parser with ANTLR4 and Maven?
Siamo lavorando per ottenere la documentazione del sito Maven ospitata online.
Metto le mie grammatiche nelle stesse cartelle dei file Java (nel pacchetto in cui voglio che venga visualizzato il codice generato).
Dato che io dichiaro la mia directory di origine al livello più alto in questo modo:
<build>
<sourceDirectory>src</sourceDirectory>
</build>
userei la seguente configurazione del plugin ANTLR 4 Maven:
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
<version>4.0</version>
<configuration>
<sourceDirectory>${basedir}/src</sourceDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>antlr4</goal>
</goals>
</execution>
</executions>
</plugin>
Guida è limitato, ma (in aggiunta alle altre risposte a queste domande ho trovato i seguenti posti utili:
- GitHub abntlr4-maven-plugin documentation site (sembra essere la documentazione autorevole e include esempi)
- ANTLR4 Wiki - Java IDE Integration (sezione mvn in fondo ha alcune informazioni di base)
si presenta come il sito Maven plug-in è ora pubblicato:
È anche possibile controllare lo following blog che descrive entrambi i plugin per la generazione e il test di grammatiche ANTLR 4.
- 1. Symfony come aiuto per lo sviluppo di plugin per Wordpress
- 2. Javascript rimuovere i plugin CKEditor sul carico
- 3. Come ottenere "editor attivo" nel plugin Eclipse?
- 4. Plugin per videocamera Phonegap/Cordova - come ottenere la data/l'ora?
- 5. Aiuto C++ sul refactoring di una classe monster
- 6. Come caricare immagini sul server heroku usando il plugin attachment_fu
- 7. Come impostare il jvm args predefinito sul plugin gradle dell'applicazione?
- 8. Come risolvere i problemi di rake deprecazione sul plugin rails?
- 9. Collegamento a AssemblyVersion in XAML (per Aiuto/Informazioni sul dialogo)
- 10. Serve aiuto Informazioni sul metodo productAttribute() per le pagine prodotto
- 11. Come ottenere l'evento upload prima presso il plugin elfinder (un file manager plugin)
- 12. Come ottenere informazioni sul client in node.js
- 13. Come ottenere l'origine della pagina sul rasoio?
- 14. Come ottenere informazioni sul percorso attuale OnActionExecuting
- 15. Come ottenere tag sul commit corrente
- 16. AngularJS: come posso ottenere $ location.path sul modello
- 17. Come ottenere DIFF sul set ordinato
- 18. plugin jQuery scelto - ottenere dati utilizzando PHP
- 19. Hai bisogno di aiuto per ottenere la finestra popup Slider
- 20. Come stampare aiuto usando jcommander?
- 21. Ho bisogno di aiuto per ottenere la frequenza della CPU
- 22. Aiuto per ottenere frame rate (fps) in Python + Pygame
- 23. Aiuto contestuale Eclipse
- 24. Google Chrome Plugin: come ottenere il dominio dall'URL (tab.url)
- 25. Come ottenere l'albero delle dipendenze in un plugin Maven 3?
- 26. R pagina di aiuto come oggetto
- 27. Jquery convalida Plugin, ottenere serie di errori
- 28. ottenere informazioni sul certificato ssl - .net
- 29. Ottenere righe coinvolte sul ExecuteNonQuery
- 30. Aiuto per ottenere Array di stringhe dal file arrays.xml
Stai solo mostrando l'output, non sono sicuro che chiamerei una risposta. – glts
+1 per includere il comando completo richiesto se non si sono ancora scaricati gli artefatti antlr4. –