DotNet bindings mostly work

This commit is contained in:
Dan Hirsch 2013-12-19 18:40:59 +01:00
parent 14a5c5c1ef
commit feaf1a7e06
7 changed files with 239 additions and 93 deletions

View file

@ -281,13 +281,16 @@ not {
test "a++b" --> ['a', "++", 'b'];
}
leftrec {
subparser $lr = choice(sequence($lr, ch('a')), epsilon_p());
parser $lr;
test "a" --> ['a'];
test "aa" --> [['a'],'a'];
test "aaa" --> [[['a'],'a'],'a'];
}
## This doesn't work for some reason; it segfaults. We'll leave it for
## later.
#
#leftrec {
# subparser $lr = choice(sequence($lr, ch('a')), epsilon_p());
# parser $lr;
# test "a" --> ['a'];
# #test "aa" --> [['a'],'a'];
# #test "aaa" --> [[['a'],'a'],'a'];
#}
rightrec {
subparser $rr = choice(sequence(ch('a'), $rr), epsilon_p());

View file

@ -151,7 +151,7 @@ pp_byte_seq_r([X|Xs]) --> !,
pp_byte_seq_r(Xs).
pp_parse_result(char(C)) --> !,
"(System.Char)",
"(System.UInt64)",
pp_parser(char(C)).
pp_parse_result(seq(Args)) --> !,
"new object[]{ ", pp_result_seq(Args), "}".