Coder Social home page Coder Social logo

antlr-d's Introduction

ANTRLR D Target

The ANTLR D Target represents an full featured and tested port of ANTLR 4.

This covers the runtime library, the tool to translate the syntax into D code and the tests for the runtime library. See also ANTLR version 4.9.2.

Like other language ports, this D runtime library uses UTF-8.

Install

  1. Download or clone the package
  2. Change directory to the root of the package and call dub.
  3. You will find the generated ANTLR D-runtime library in lib/libantlr-d.a
  4. The ANTLR tool for D will be generated by make build_examples (./build.ps1 build_examples on windows) in build/antlr4-4.9.2/tool/target/antlr4-4.9.2-complete.jar

Consider providing a shortcut to make it easy to use ANTLR. For example, define an alias:

alias antlr4='java -jar path/to/antlr-d/build/antlr4-4.9.2/tool/target/antlr4-4.9.2-complete.jar'

Dependencies

ANTLR tool

  • java 1.8
  • maven
  • 7-Zip (Only on windows)

Examples

Check out the two simple but complete examples:

  1. Building a Calculator Using a Listener
  2. Building a Calculator Using a Visitor

Extension versus other ANTLR runtime versions

The data type to store text is Variant. This is handy for the rewriting feature on an indent-based syntax like Python. In this case we need a structure representing the text as well as the number of indents.

antlr-d's People

Contributors

bayernev avatar mnxn avatar linkrope avatar feepingcreature avatar burner avatar

Stargazers

Emir avatar Filipp Chertiev avatar

Watchers

 avatar Filipp Chertiev avatar

antlr-d's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.