Talk:Parsing/Shunting-yard algorithm: Difference between revisions

m
→‎incorrect programs?: added whitespace and bigger font to help clarify some character strings.
(→‎incorrect programs?: added concern about characters versus tokens. -- ~~~~)
m (→‎incorrect programs?: added whitespace and bigger font to help clarify some character strings.)
 
(2 intermediate revisions by 2 users not shown)
Line 9:
==incorrect programs?==
 
I noticed that at least one programming example is treating the input string as characters instead of tokens. &nbsp; This works as long as all the numbers (and/or operators) are single characters. &nbsp; Would it be possible to change (shudder) the test input string specification (or add another) to include a (say) multi-digit number? &nbsp; If it's not reasonable to add another test case, how about changing the &nbsp; <big>'''4''' </big> &nbsp; to &nbsp; <big>'''004'''</big> &nbsp; which wouldn't effectaffect the calculated output. &nbsp; Another possibility would be to change (say) the &nbsp; <big>'''5'''</big> &nbsp; to &nbsp; <big>'''5.'''</big> &nbsp; (for instance). &nbsp; And yet another possibility would be to add &nbsp; <big>'''**'''</big> &nbsp; as an additional exponentiation symbol (or some other compound operator). &nbsp; Changing the test case (or adding one) will eliminate the need for flagging the program as &nbsp; ''incorrect'' &nbsp; which I probably won't commit to doing as I really don't have any practical way to verify if the suspect program will work correctly with tokens instead of characters. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] 06:42, 14 December 2012 (UTC)
 
== Improve Description ==