|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re:
> 1) .. (2 votes)
> 2); (1 vote?)
Note that the complexity is between 1 and N (N > 1)
character as you'll have to ``put back'' those
characters in the buffer/IO stream if they don't
match, and going about it with a single char
is so much easy...
Hmm, why do we need a _different_
character for ranges? Don't we have the
variable context already?
As Bill pointed out, even if we use dash/minus,
allowing negative numbers in ranges is NO problem.
You can see this for yourselves by either
writing down the context free grammar rules for it,
or equivalently an automata for parsing it.
If we decide on ``..'', then this _is_equivalent_
to ``range'', i.e.
OFMarkInt=1..10
parses as
OFMarkInt=1range10
since you'll have to get to _another_ state upon
parsing the second ``.'', the only difference
is that you need more states for ``range''.
--
Luben
Home Last updated: Thu Mar 21 16:18:15 2002 9258 messages in chronological order |