Skip to content
forked from jagrosh/JagTag

JagTag is a simple - yet powerful and customizable - interpretted text parsing language!

License

Notifications You must be signed in to change notification settings

DuncteBot/JagTag

 
 

Repository files navigation

JagTag

JagTag is a simple - yet powerful and customizable - interpretted text parsing language! Some methods are included in the built-in libraries, and additional methods can be defined that utilize the parser environment veriables, as well as the method's input.

Simple Example

import com.jagrosh.jagtag.*;
public class Example
{
  public static void main(String[] args)
  {
    Parser parser = JagTag.newDefaultBuilder()
                .addMethod( new Method("exclaim", (env,in) -> in[0]+"!!!") )
                .build();
    String result = parser.parse("{exclaim:{if:this|=|that|then:Foo Bar|else:Hello World}}");
    System.out.println(result);
  }
}

Result: Hello World!!!

Gradle

repositories {
    maven("https://jitpack.io")
}

dependencies {
    implementation("com.github.DuncteBot:JagTag:Tag")
}

Maven

To use Maven with JagTag, simply add the following sections to your pom.xml

  <repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>
  <dependency>
    <groupId>com.github.DuncteBot</groupId>
    <artifactId>JagTag</artifactId>
    <version>Tag</version>
  </dependency>

Other Libraries

Below are JagTag-related libraries available for other languages or purposes:

About

JagTag is a simple - yet powerful and customizable - interpretted text parsing language!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 98.9%
  • Kotlin 1.1%