Hi [EMAIL PROTECTED]

you wrote:
>let-char: charset[#"a" - #"z" #"A" - #"Z"]
>let-digit-char: charset[#"a" - #"z" #"A" - #"Z" #"0" - #"9"]
>let-digit-hyph-char: charset[#"a" - #"z" #"A" - #"Z" #"0" - #"9" #"-"]
>hname-rule: [name-rule some ["." name-rule]]
>name-rule: [let-char [none | [[some let-digit-hyph-char] let-digit-char]]
to end]
>>> parse "asdfg-" name-rule
>== true
>ERR!    last character is not one of the allowed ones
>
>>> parse "a%$#" name-rule  
>== true
>ERR!    none of the characters following the "a" are allowed
>
>What is wrong with the rule generating the too-many true's ?

Your name-rule requres a let-char then it permits for none and then goes to
end. In both ERR! cases let-char is fulfilled, then at some point the none
part of the following bracket is fulfilled and then to end is performed. No
wonder you end up with true in both cases. Compare to:

>> parse "abcdefg" [none to end]
== true



;- Elan >> [: - )]

Reply via email to