sdpc 0.1.1

Stupid D parser combinator


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

sdpc

build statuscodecov

sdpc is a set of very simple, deterministic parser combinators. You can using these combinators to build deterministic parsers for unambiguous grammar without left-recursion.

Because of the determinism, each parser should return a single ParseResult, and indicate the next input position via modifing the input Stream variable.

Example

import sdpc;

@safe ParseResult!(string, void, ParseError!string) parse_parentheses(string i) {
	return many!(between!(token!"(", parse_parentheses, token!")"), true)(i);
}
void main() {
	auto i = "(())()(()())";
	assert(parse_parentheses(i).ok);
}

Authors:Yuxuan Shui

Dependencies: none

Versions:
0.1.1 2017-Mar-24
0.1.0 2017-Mar-23
~master 2017-May-13
~allocator 2017-May-15
Show all 4 versions
Stats:

statistics are temporarily disabled.