Small Basic abstract syntax tree, interpreter and embedded DSL. Supports Small Basic's keywords and arithmetic, logical and comparison operators.
11 people like thisPosted: 10 years ago by Phillip Trelford
Based on Uncle Bob's State Machine Compiler for Clean Code video series, parser implemented with FParsec, see https://github.com/unclebob/CC_SMC for Uncle Bob's Java implementation.
7 people like thisPosted: 9 years ago by Phillip Trelford
Parsers a minimal expression tree allowing for functions of the form "func(arg1,arg2,...)->{body}"
5 people like thisPosted: 7 years ago by devshorts
Small Basic abstract syntax tree, parser and interpreter. Supports Small Basic's keywords and arithmetic, logical and comparison operators.
8 people like thisPosted: 6 years ago by Phillip Trelford
This little snippet shows you how you can create a simple recursive data type and define a pair of functions that maps the set of positive integers to unique instances in the AST and back again.
2 people like thisPosted: 5 years ago by Steve Goguen
Based on Uncle Bob's State Machine Compiler for Clean Code video series, parser implemented with FParsec, see https://github.com/unclebob/CC_SMC for the Java implementation.
8 people like thisPosted: 9 years ago by Phillip Trelford
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: http://en.wikipedia.org/wiki/SNOBOL and most of the pattern matching examples from the SNOBOL 4 Tutorial http://www.snobol4.org/docs/burks/tutorial/ch4.htm
2 people like thisPosted: 9 years ago by Phillip Trelford
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 thisPosted: 7 years ago by Phillip Trelford
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 thisPosted: 5 years ago by Ayrat Hudaygulov
Simple prototype C# AST and parser using the FParsec parser combinator library. Parses a subset of C# 1.1 constructs.
8 people like thisPosted: 4 years ago by Phillip Trelford