Skip to content
πŸ“ JagTag is a simple - yet powerful and customizable - interpretted text parsing language!
Branch: master
Clone or download
Latest commit 024e308 May 22, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
LICENSE
README.md
nb-configuration.xml
pom.xml

README.md

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!!!

Maven

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

  <repository>
    <id>central</id>
    <name>bintray</name>
    <url>http://jcenter.bintray.com</url>
  </repository>
  <dependency>
    <groupId>com.jagrosh</groupId>
    <artifactId>JagTag</artifactId>
    <version>0.5</version>
  </dependency>

Current Projects

Here are some other projects that utilize JagTag:

Other Libraries

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

You can’t perform that action at this time.