INSPext (Or: Of Uselessness & Usefulness)

To cut things short, INSPext is here.

About a month ago I started a new programming project. It was a moment of feeling isolate at home, and so I went out to a near café and started scribbling on a piece of paper. I had no goal or idea where I was going, other than spending my time so the next day will start already.

In my battle against the Dark Lord of The Blues I started writing my thoughts. It’s a good exercise both for enhancing writing skill and for raising feelings and thoughts to the surface. And then a faint idea came in: wouldn’t it be nice to compile this text I’ve written and output it in a nice, elegant typeset fashion? Not because it would be useful to have my text nicely typeset, but because it would be useful to write a compiler. I was thinking at the time less of a practical tool I’d want and more of a tool I’d want to create.

  ASDF

Asdf as asdfing, asd F asdfed.  "Asdf!" asd asdfed.  "Asdf!".
"Asdf?" F asdfed, "ASDF?!".  "A, asdf".

Asdf asdf, asdfasdfion as asdfing as.  ...

...

It was easy and straightforward to see the pattern in my text. Maybe because I was free-writing, not writing a complex document such as a math-infected assignment or a term paper packed with tables and page numbers and table of contents and images. Just fluent text: nothing but headings and paragraphs. Yes, my headings are always indented with space and my paragraphs are always delimited with an empty line. Even my sentences are clearly separate from each other with two spaces. To some extent, I have a language there which I can parse!

That was the process in which INSPext was coming out to life. I quickly had a grammar written down that defined how I have always structured my text, in terms of headings and paragraphs. It was a simple grammar, composed of maybe 3 or 4 rules. And this, in fact, encouraged me tremendously to go right ahead and bang out the scanner and parser code.

I thought this would be a small project to spend the day. Nothing worth blogging about. But it’s been a month now that I’ve been playing with this little baby, and so I think it’s time I acknowledge its place among the living. So allow me to introduce: INSPext.

This entry was posted in Programming. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>