|Hybrid LR and LL parser tools? firstname.lastname@example.org (Dennis Brueni) (1992-05-20)|
|Parsing Roman numbers email@example.com (1992-05-22)|
|Re: Parsing Roman numbers firstname.lastname@example.org (1992-05-23)|
|Re: Parsing Roman numbers email@example.com (1992-05-24)|
|Re: Parsing Roman numbers firstname.lastname@example.org (1992-05-24)|
|Re: Parsing Roman numbers Martin.Ward@durham.ac.uk (Martin Ward) (1992-05-26)|
|From:||email@example.com (Henry Spencer)|
|Organization:||U of Toronto Zoology|
|Date:||Sun, 24 May 1992 00:36:46 GMT|
firstname.lastname@example.org (Joe Armstrong) writes:
>Has anybody got a grammar (preferably yacc) for parsing roman numbers?
I don't understand why you need a parser for this. Roman numerals are
described by the regular expression
(using POSIX 1003.2 regular-expression notation) unless you want to write
in a requirement that they be non-null, which would take a slightly more
complex form to deal with the requirement that at least one of the parts
be non-empty. Variations in notation, like allowing VIIII (which was
legitimate Roman practice at one time) are trivial to accommodate.
>Are they LL(k) LR(k) or what?
Since they can be described by a regular expression, they can be parsed
by a regular grammar, which is a still more restricted form. So the
answer is "all of the above".
Henry Spencer @ U of Toronto Zoology, email@example.com utzoo!henry
Return to the
Search the comp.compilers archives again.