Hi, I think, that Parse has got a bug as in:

>> parse "a" [none skip]
== true

cc-ing to feedback. Here is a version of A-B-rule, that should
work reliably. Test it please.

A-B-rule: func [
    "Generate an A-B parse rule"
    A [block!] {A-rule}
    B [block!] {B-rule}
    /local o
] [
    o: make object! [
        A-rule: A
        B-rule: B
        res-rule: none
    ]
    bind/copy [
        (self)
        [
            B-rule (res-rule: [to end skip]) |
            A-rule (res-rule: []) |
            (res-rule: [to end skip])
        ]
        res-rule
    ] in o 'self
]


Reply via email to