Snippets tagged ast

  • Finite State Machine Parser

    Based on Uncle Bob's State Machine Compiler for Clean Code video series, parser implemented with FParsec, see for the Java implementation.

    8 people like this

    Posted: 6 years ago by Phillip Trelford

  • Mini SNOBOL Interpreter

    Minimal SNOBOL abstract syntax tree (AST), interpreter and internal DSL (but no parser), just enough to run some simple samples from Wikipedia's SNOBOL page: and most of the pattern matching examples from the SNOBOL 4 Tutorial

    2 people like this

    Posted: 6 years ago by Phillip Trelford

  • Turtle in Gtk#

    Turtle interpreter example using Mono's Gtk# library with example paths for MonoDevelop (running on Linux) and Xamarin Studio (running on Mac and Windows).

    2 people like this

    Posted: 3 years ago by Phillip Trelford

  • CodeGen example for F#

    This example shows how to add attribute in F# codebase. We use FSharp compiler to get AST, then analyze what we want to change, change it and then combine it back to source code. Example is a little bit naive, it doesn't cover all cases.

    1 people like this

    Posted: 2 years ago by Ayrat Hudaygulov

  • Simple C# Parser

    Simple prototype C# AST and parser using the FParsec parser combinator library. Parses a subset of C# 1.1 constructs.

    7 people like this

    Posted: 1 year ago by Phillip Trelford