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

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

edits