Skip to content

Comment on A Brutal Look at Balanced Parentheses, Computing Machines, and Pushdown Automataparent

Comments

You're presuming you have only a non-rewindable stream as opposed to a file interface, which is why I was explicit about the requirement to be able to rewind the position to avoid a stack. If you only have a non-rewindable stream, then, yes, you need a strack. If you have a file handle, you do not.

(and yes, you did presume something; if you have rewindable file handle, you do not need to keep the characters; you can instead-re-read them)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.