cbasics icon indicating copy to clipboard operation
cbasics copied to clipboard

1-24 minilint can't handle the case "({)}"

Open tcztzy opened this issue 9 years ago • 1 comments

The case "({)}" cause syntax error, but your program cannot handle this correctly.

tcztzy avatar Dec 23 '16 01:12 tcztzy

Correct, the solution does not utilize any syntactic analysis. The problem was solved in a way consistent with a chapter one overview lesson for the book. A proper linter would need to be able to parse the language at hand with proper lexical analysis. I would certainly welcome an "extras" pull request which does this. Also, a compromise could be written that simply checks for odd numbered counters when a closing symbol is encountered which would indicate improper nesting.

ptdecker avatar Dec 29 '16 19:12 ptdecker