[htdig3-dev] isn't state 6 in Display::expandVariables redundant?


Gilles Detillieux (grdetil@scrc.umanitoba.ca)
Tue, 10 Aug 1999 16:13:18 -0500 (CDT)


Hi, folks. I need the help of someone else's eyes. It seems to me,
looking at the code for Display::expandVariables, that state 6 in the
scanner is totally redundant. Couldn't the same task be accomplished
by changing state 5 to treat the '$' just like any other non-alpha,
non-underscore character, and fall back to state 2 with a continue?
State 6 seems like just a concatenation of states 2 and 3, with handling
of non-$ characters stripped out. If I can get rid of state 6, it makes
adding code to handle $%(foo) and $&(foo) easier, but I don't want to
break something inadvertently. As far as I can tell, the only function
of state 6 is to handle the character after the second '$' in something
like $foo$bar or $foo$(bar), which I think a fallback to state 2 would
accomplish. Any reason not to remove it?

-- 
Gilles R. Detillieux              E-mail: <grdetil@scrc.umanitoba.ca>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930

------------------------------------ To unsubscribe from the htdig3-dev mailing list, send a message to htdig3-dev@htdig.org containing the single word "unsubscribe" in the SUBJECT of the message.



This archive was generated by hypermail 2.0b3 on Tue Aug 10 1999 - 14:14:00 PDT