huevo 1.0.3-DEV

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],
var result = sentanceParser.parse(inputSource);

1.0.0-DEV #

  • Initial version

1.0.1-DEV #

  • Add RegexParser

1.0.2-DEV #

  • Bugfix in Parser::or

1.0.3-DEV #

  • introduce concept of lazy evaluation

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  huevo: ^1.0.3-DEV

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:huevo/huevo.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 10, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5

Health suggestions

Fix lib/src/parser.dart. (-0.50 points)

Analysis of lib/src/parser.dart reported 1 hint:

line 2 col 8: Unused import: 'package:tuple/tuple.dart'.

Maintenance suggestions

Package is pre-release. (-5 points)

Pre-release versions should be used with caution; their API can change in breaking ways.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and huevo.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.6.0 <3.0.0
tuple ^1.0.3 1.0.3
Transitive dependencies
matcher 0.12.6
meta 1.1.8
path 1.6.4
quiver 2.1.2+1
stack_trace 1.9.3
Dev dependencies
pedantic ^1.8.0
test ^1.6.0