help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help asap


From: Anthony DeRobertis
Subject: Re: Help asap
Date: Sun, 22 Jun 2003 19:39:45 -0400


On Sunday, Jun 22, 2003, at 13:14 US/Eastern, MC B wrote:

 Using C++ lexer, flex and bison .l and .y files

how to implement a program that outputs the number of roman numbers

Example: if in the text there is V, it must return 5

Using flex and bison to convert from Roman to Indo-Aribic numerals is a huge overkill.

It'd be what, 10 lines of C++? Considering all you have to do is look ahead one character to see things like IV; otherwise, it's strait
        if (c = 'V')
                i += 5;
etc.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]