Closed knuton closed 10 years ago
Yikes. I fixed it in the latest commits. npm update
and see if the bug persists.
Thanks for reporting this. Out of curiosity, what are you using nearley for? :-)
Looking good, thanks for the quick fix!
$ time node_modules/.bin/nearleyc indent6.ne > /dev/null
real 0m0.124s
user 0m0.097s
sys 0m0.020s
I am toying around with various type checking approaches for my Master's thesis so I need to implement parsers for some simple applicative languages, nothing too fancy. @iarna mentioned nearley in a recent JavaScript Jabber episode, so I thought I'd give it a try.
I commented out a block of lines for debugging purposes and ran into some strange behaviour: the complexity of parsing a parser definition seems to grow dramatically with the number and indentation level of subsequent indented comments.
For example, with a series of files named
indentn.ne
, where a block of comments is indented n spaces, i.e.etc., execution time shoots up rapidly:
time node_modules/.bin/nearleyc indent6.ne > /dev/null
has not yet finished. :wink: