huevo 1.0.3-DEV
huevo: ^1.0.3-DEV

Dart native js
Flutter Android iOS web

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 #

  • [X] 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);
0
likes
80
pub points
0%
popularity

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

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

lanyitin@gmail.com

License

MIT (LICENSE)

Dependencies

tuple

More

Packages that depend on huevo