Tuesday, May 6, 2014
Parse All the Things
Packrat Parsers are interesting things. They basically try every possibility everywhere. Surprisingly, this turns out to be fast because they only do it once. They get away with this because they record every single thing they do. In recent years, computers started having enough memory that this idea is no longer completely ridiculous.
Been continuing work on the parser I started. The first stage is more or less complete. That is to say, I can give the parser a file, ask it if that file is valid, and get a yes-or-no answer. However, it's going to need to do a little more than that before it's useful. Ultimately, I will need a syntax tree representing the file. There are still a few more grammar rules that I need to add, but I'm going to cross those bridges when I come to them.
I've also been playing Skyrim in my spare time and getting a lot of ideas for things I could add to my other project. I got an idea for how to better organize possible features so I don't get inundated with all the possibilities. If I get burnt out on the parser, you might actually see some progress being made on that project someday.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment