Hi /PeO

you wrote:
>; name must start with a letter
>let-char
>
>; may have any number of letters, digits and
>; hyphens in between, but this sequence must
>; end with a letter or digit if it exists
>0 1 [any let-digit-hyph-char let-digit-char]
>
>The problem is combining them to a working ruleset...

The problem is how you formulate your specification. You say:
>; may have any number of letters, digits and
>; hyphens in between, but this sequence must
>; end with a letter or digit if it exists

This is too general. You need to redefine your rules so that you precisely
state that a hyphen - if it occurs - must be followed by a letter or digit.
I.e., I believe you have a let-digit-char rule, your let-digit-hyph-char
rule then must be:

let-digit-hyph-char: [ "-" let-digit-char]

This rule only evaluates to true if a hyphen is immediately followed by a
character. It permits that a hyphen appear, provided that the hyphen is
followed by a an obligatory character and thereby excludes the possibility
of a trailing hyphen.

Hope this helps


;- Elan >> [: - )]

Reply via email to