vmf-text-gradle-plugin

VMF-Text Gradle Plugin

Лицензия

Лицензия

Категории

Категории

Gradle Компиляция и сборка
Группа

Группа

eu.mihosoft.vmf
Идентификатор

Идентификатор

vmf-text-gradle-plugin
Последняя версия

Последняя версия

0.1.2.7
Дата

Дата

Тип

Тип

jar
Описание

Описание

vmf-text-gradle-plugin
VMF-Text Gradle Plugin
Ссылка на сайт

Ссылка на сайт

https://github.com/miho/VMF-Text
Система контроля версий

Система контроля версий

https://github.com/miho/VMF-Text.git

Скачать vmf-text-gradle-plugin

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/eu.mihosoft.vmf/vmf-text-gradle-plugin/ -->
<dependency>
    <groupId>eu.mihosoft.vmf</groupId>
    <artifactId>vmf-text-gradle-plugin</artifactId>
    <version>0.1.2.7</version>
</dependency>
// https://jarcasting.com/artifacts/eu.mihosoft.vmf/vmf-text-gradle-plugin/
implementation 'eu.mihosoft.vmf:vmf-text-gradle-plugin:0.1.2.7'
// https://jarcasting.com/artifacts/eu.mihosoft.vmf/vmf-text-gradle-plugin/
implementation ("eu.mihosoft.vmf:vmf-text-gradle-plugin:0.1.2.7")
'eu.mihosoft.vmf:vmf-text-gradle-plugin:jar:0.1.2.7'
<dependency org="eu.mihosoft.vmf" name="vmf-text-gradle-plugin" rev="0.1.2.7">
  <artifact name="vmf-text-gradle-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='eu.mihosoft.vmf', module='vmf-text-gradle-plugin', version='0.1.2.7')
)
libraryDependencies += "eu.mihosoft.vmf" % "vmf-text-gradle-plugin" % "0.1.2.7"
[eu.mihosoft.vmf/vmf-text-gradle-plugin "0.1.2.7"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
eu.mihosoft.vmf : vmf-runtime jar 0.1.1
eu.mihosoft.vmf : vmf-text jar 0.1.2

Модули Проекта

Данный проект не имеет модулей.

VMF-Text Tweet

Download Build Status Build status Join the chat at https://gitter.im/VMF_/Lobby

VMF-Text is a novel framework for grammar-based language modeling on the Java Platform (it works with Java 8, 9, 10 and 11): give it a labeled ANTLR4 grammar and it will generate a rich and clean API (based on VMF) for (un)parsing and transforming custom textual languages. The complete API is derived from just a single ANTLR4 grammar file!

Using VMF-Text

Checkout the tutorial projects: https://github.com/miho/VMF-Text-Tutorials

VMF-Text comes with excellent Gradle support. Just add the plugin like so (click here to get the latest version):

plugins {
  id "eu.mihosoft.vmftext" version "0.1.2.7" // use latest version
}

(optionally) configure VMF-Text:

vmfText {
    vmfVersion   = '0.1.1'   // (runtime version)
    antlrVersion = '4.7.1' // (runtime version)
}

Now just add the labeled ANTLR4 grammar file to the VMF-Text source folder, e.g.:

src/main/vmf-text/my/pkg/ArrayLang.g4

Sample grammar for parsing strings of the form (1,2,3):

grammar ArrayLang;

array:  '(' values+=INT (',' values+=INT)* ')' EOF;

INT: SIGN? DIGIT+
   ;

fragment SIGN :'-' ;
fragment DIGIT : [0-9];

WS
    : [ \t\r\n]+ -> channel(HIDDEN)
    ;

/*<!vmf-text!>
TypeMap() {
  (INT    -> java.lang.Integer) = 'java.lang.Integer.parseInt(entry.getText())'
}
*/

Finally, call the vmfTextGenCode task to generate the implementation.

Building VMF-Text (Core)

Requirements

  • Java >= 1.8
  • Internet connection (dependencies are downloaded automatically)
  • IDE: Gradle Plugin (not necessary for command line usage)

IDE

Open the VMF-Text/core Gradle project in your favourite IDE (tested with NetBeans 8.2 and IntelliJ 2018) and build it by calling the publishToMavenLocal task.

Command Line

Navigate to the Gradle project (i.e., path/to/VMF-Text/core) and enter the following command

Bash (Linux/macOS/Cygwin/other Unix shell)

bash gradlew publishToMavenLocal

Windows (CMD)

gradlew publishToMavenLocal

Building VMF-Text (Gradle Plugin)

Requirements

  • Java >= 1.8
  • Internet connection (dependencies are downloaded automatically)
  • IDE: Gradle Plugin (not necessary for command line usage)

IDE

Open the VMF-Text/gradle-plugin Gradle project in your favourite IDE (tested with NetBeans 8.2 and IntelliJ 2018) and build it by calling the publishToMavenLocal task.

Command Line

Navigate to the Gradle project (i.e., path/to/VMF-Text/gradle-plugin) and enter the following command

Bash (Linux/macOS/Cygwin/other Unix shell)

bash gradlew publishToMavenLocal

Windows (CMD)

gradlew publishToMavenLocal 

Testing VMF-Text (Core & Plugin)

To execute the test suite, navigate to the test project (i.e., path/to/VMF-Text/test-suite) and enter the following command

Bash (Linux/macOS/Cygwin/other Unix shell)

bash gradlew test

Windows (CMD)

gradlew test

This will use the latest snapshot vmf-text and gradle-plugin to execute the tests defined in the test-suite project.

Viewing the Report

An HTML version of the test report is located in the build folder test-suite/build/reports/tests/test/index.html.

Test reports of the travis builds are available as well: [Test reports]

Версии библиотеки

Версия
0.1.2.7