• Stars
    star
    920
  • Rank 47,749 (Top 1.0 %)
  • Language
    Java
  • License
    Other
  • Created over 14 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

StringTemplate 4

ST (StringTemplate) is a java template engine (with ports for C#, Python, and Objective-C coming) for generating source code, web pages, emails, or any other formatted text output. ST is particularly good at multi-targeted code generators, multiple site skins, and internationalization / localization. It evolved over years of effort developing jGuru.com and then ANTLR v3.

The main website is:

https://www.stringtemplate.org

Its distinguishing characteristic is that it strictly enforces model-view separation, unlike other engines. See:

https://www.cs.usfca.edu/~parrt/papers/mvc.templates.pdf

The documentation is in this repo

https://github.com/antlr/stringtemplate4/tree/master/doc/index.md

Per the BSD license in LICENSE.txt, this software is not guaranteed to work and might even destroy all life on this planet.

INSTALLATION

Manual Installation

All you need to do is get the StringTemplate jar into your CLASSPATH. See Java StringTemplate.

Maven

To reference StringTemplate from a project built using Maven, add the following to the <dependencies> element in your pom.xml file.

<dependency>
  <groupId>org.antlr</groupId>
  <artifactId>ST4</artifactId>
  <version>4.3.4</version>
  <scope>compile</scope>
</dependency>

Gradle

In build.gradle, add the following dependency:

dependencies {
    // ...

    // https://mvnrepository.com/artifact/org.antlr/ST4
    compile group: 'org.antlr', name: 'ST4', version: '4.3.4'
}

Make sure you are using the mavenCentral repository by adding it if necessary:

repositories {
    // ...
    mavenCentral()
}

Other

Select a version on mvnrepository, and copy the snippet relevant to your build tool.

BUILDING FROM SOURCE

The source is at github.com:

https://github.com/antlr/stringtemplate4

If you would like to make changes to ST and build it yourself, just run mvn install from the root directory of the repo.

You can also run ant from the root dir.

More Repositories

1

antlr4

ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
Java
16,313
star
2

grammars-v4

Grammars written for ANTLR v4; expectation that the grammars are free of actions.
ANTLR
9,737
star
3

intellij-plugin-v4

An IntelliJ plugin for ANTLR v4
Java
450
star
4

codebuff

Language-agnostic pretty-printing through machine learning (uh, like, is this possible? YES, apparently).
Java
428
star
5

antlrcs

The C# port of ANTLR 3, StringTemplate 3, and StringTemplate 4
C#
271
star
6

antlr3

antlr v3 repository (pulled from p4 with history from //depot/code/antlr/antlr3-main
Java
238
star
7

antlr4-intellij-adaptor

A library to support the use of ANTLR grammars in jetbrains IDE plugins for building custom languages.
Java
193
star
8

jetbrains-plugin-sample

A sample plugin for jetbrains IDEs that uses an ANTLR grammar for a nontrivial custom language.
Java
115
star
9

antlrworks

AntlrWorks tool for ANTLR
Java
96
star
10

antlr-php-runtime

PHP Runtime for ANTLR4
PHP
78
star
11

antlr4-cpp

C++ target for ANTLR 4, including templates and runtime
C++
72
star
12

antlr4-tools

Tools to run antlr4 w/o needing to install java or antlr4!
Python
63
star
13

examples-v3

Java
59
star
14

symtab

Generic symbol table for lexically/statically scoped languages
Java
49
star
15

antlr5

Java
39
star
16

Antlr4Formatter

Formatter for ANTLR 4 grammars
ANTLR
38
star
17

antlr4-lab

A client/server for trying out and learning about ANTLR
Java
29
star
18

jetbrains-plugin-st4

An intellij/jetbrains plugin for StringTemplate .st and .stg files
Java
23
star
19

grammars-v3

Grammars written for ANTLR v3; expectation that the grammars are free of actions but it's not a hard and fast rule. there is no common license!
GAP
23
star
20

antlr4test-maven-plugin

A maven plugin used to test the grammars-v4 repo grammars
Java
18
star
21

stringtemplate3

StringTemplate v3
Java
15
star
22

website-antlr3

The ANTLR 3 Website
HTML
12
star
23

website-antlr4

The ANTLR 4 Website
HTML
11
star
24

antlr-php-runtime-phpstan

Static analysis for ANTLR4 PHP Runtime.
PHP
6
star
25

antlr5-specs

Specs for antlr5
4
star
26

_grammar-test

Historical files from grammars-v4 repo
Java
2
star
27

performance

Test the performance of ANTLR parsers (initially just Java target)
Java
2
star
28

grammars-v5

2
star
29

website-antlr2

The ANTLR 2 Website
Java
1
star
30

website-st4

stringtemplate.org content
HTML
1
star
31

antlr5-lab

TypeScript
1
star