GithubHelp home page GithubHelp logo

markwright / antlrc-examples Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 837 KB

Examples for the Haskell binding to the ANTLR parser generator C runtime library.

Home Page: http://www.users.on.net/~markwright/?x=cat:8

License: BSD 3-Clause "New" or "Revised" License

Fortran 0.20% C 44.66% Haskell 55.13%

antlrc-examples's Introduction

Providing a build system for examples using ANTLR, libantlr3c and
the Haskell antlrc runtime binding is difficult due to the following
issues:

(1) There is no ANTLR 3.2 or 3.3 ebuild for Gentoo Linux, and hence no
standard location for the ANTLR jar files.

(2) There is no standard antlr command to run the ANTLR parser generator tool
provided by ANTLR:

http://www.antlr.org/jira/browse/ANTLR-369

(3) It seems difficult to find a portable method to build a C program that calls Haskell.

I provide some example makefiles, however they would need to be modified
for your system.

src/tapl/arith
--------------

I wrote this Haskell/C/ANTLR example based on the arith example from the book
Types and Programming Languages by Benjamin Pierce chapter 4.

(ghc7) argus% ./arith test.f
"true"
"false"
"0"
"1"
"false"
(ghc7) argus% 

src/tapl/fullarith
------------------

This example is incomplete.

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.