• Stars
    star
    943
  • Rank 48,473 (Top 1.0 %)
  • Language
    Java
  • License
    Other
  • Created almost 15 years ago
  • Updated 4 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
17,043
star
2

grammars-v4

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

intellij-plugin-v4

An IntelliJ plugin for ANTLR v4
Java
467
star
4

codebuff

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

antlrcs

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

antlr3

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

antlr4-intellij-adaptor

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

jetbrains-plugin-sample

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

antlrworks

AntlrWorks tool for ANTLR
Java
97
star
10

antlr4-tools

Tools to run antlr4 w/o needing to install java or antlr4!
Python
83
star
11

antlr-php-runtime

PHP Runtime for ANTLR4
PHP
81
star
12

antlr4-cpp

C++ target for ANTLR 4, including templates and runtime
C++
75
star
13

examples-v3

Java
59
star
14

antlr5

Java
52
star
15

symtab

Generic symbol table for lexically/statically scoped languages
Java
48
star
16

Antlr4Formatter

Formatter for ANTLR 4 grammars
ANTLR
40
star
17

antlr4-lab

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

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
24
star
19

jetbrains-plugin-st4

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

antlr4test-maven-plugin

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

stringtemplate3

StringTemplate v3
Java
15
star
22

website-antlr3

The ANTLR 3 Website
HTML
13
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

grammars-v5

3
star
27

_grammar-test

Historical files from grammars-v4 repo
Java
2
star
28

performance

Test the performance of ANTLR parsers (initially just Java target)
Java
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