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

→‎incorrect programs?: added concern about characters versus tokens. -- ~~~~
(→‎incorrect programs?: added concern about characters versus tokens. -- ~~~~)
Line 6:
 
<nowiki>{{improved}}</nowiki>! --[[User:Paddy3118|Paddy3118]] 05:47, 6 December 2011 (UTC)
 
==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 effect 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 ==
This seems to be about infix to RPN but it doesn't say it explicitly. --[[User:Dgamey|Dgamey]] 04:00, 13 December 2011 (UTC)