huevo 1.0.0-DEV copy "huevo: ^1.0.0-DEV" to clipboard
huevo: ^1.0.0-DEV copied to clipboard

outdated

A basic compiler infrastructure for Learning how to create a compile without any compiler's compiler

What it is #

A basic compiler infrastructure for Learning how to create a compile without any compiler's compiler

Features and bugs #

  • a parser combinator library for parsing text
  • a set of AST nodes that can represent basic arithmetic operations and boolean operations
  • a machine code generator for WebAssembly

Please file feature requests and bugs at the tracker.

Usage #

A simple parser combinator example:

import 'package:huevo/huevo.dart';

var inputSource = InputSource('This is A Parser Combinator'.split(''));
var whiteSpace = Parser.fromElement(' ');
var keywordThis = StringParser('This');
var keywordis = StringParser('is');
var keywordA = StringParser('A');
var keywordParser = StringParser('Parser');
var keywordCombinator = StringParser('Combinator');

var sentanceParser = Parser.join(
    [keywordThis, keywordis, keywordA, keywordParser, keywordCombinator],
    whiteSpace).end();
var result = sentanceParser.parse(inputSource);
print(result);
1
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A basic compiler infrastructure for Learning how to create a compile without any compiler's compiler

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

tuple

More

Packages that depend on huevo