Skip to main content

ISHML: API for Parser IF (JavaScript)

Version 1 of ISHML has been released!

ISHML stands for Interactive Story grapH Management Library, but call it “Ishmael.” Its intent is to facilitate the creation of interactive fiction in JavaScript and is intended for client-side applications running in modern browsers.

The ISHML library is a fluent API with straightforwardly named properties and methods, many of which are chainable.

Eventually, ISHML will address all aspects of creating interactive fiction. For now, though, ISHML is just a really flexible and powerful recursive descent parser with backtracking, which is capable of returning multiple interpretations of a given input text.

In ISHML, you create a parser by defining a grammar. A grammar is a set of nested rules that describes the syntax tree to be generated during parsing. The structure of the grammar mirrors the structure of the syntax tree. Rules are, in spirit, a JavaScript adaptation of BNF notation.

There are many, many ways to configure the rules.

If you are looking to write Parser IF in JavaScript but don’t want to hand code a parser from scratch, this may be the library you’ve been looking for. I won’t say writing a good grammar is easy. It isn’t. However, it’s definitely easier than writing a parser. There is a lengthy tutorial and API reference here:

https://whitewhalestories.com

PS Its open source.

Comments

Popular posts from this blog

Project ISML

I've started a new project that I'm quite excited about.  I don't have much to show right now, but I hope to have something interesting in about six months.  In the meantime, here's the vision statement for the project: ISML stands for Interactive Story Modeling Language, but you can call it "Ishmael." It is an authoring system for creating interactive web content including Interactive Fiction (IF) aka text adventure games, Choose Your Own Adventure (CYOA) style hypertext stories, quizzes, chat-bots, hidden object games, spelling bees, tile games, or any other multi-media interactive experience you can imagine. The ISML modeling language makes intuitive sense to authors. You can be successful with ISML even if you have no programming skills. Stumbling blocks such as nested logic, loops, recursion, case-sensitivity, pointers, and variable scope are de-emphasized or non-existent. Where these concepts do exist, the language presents them in a way that is nat...

NLP Resources

This is a list of resources I am using to learn about natural language processing related to the ISHML project.. Infocom Parser:  http://ifwiki.org/index.php/Infocom-type_parser How to understand natural language processing in 81 easy lectures Glossary of terms:  https://glossary.sil.org/term/grammatical-category Break down of noun phrases: https://linguapress.com/grammar/noun-phrases.htm More on noun phrases:  https://learnenglish.britishcouncil.org/en/english-grammar/noun-phrase Adpositions:  https://en.wikipedia.org/wiki/Preposition_and_postposition#Terminology Adpositions can be used to express a wide range of  semantic  relations between their complement and the rest of the context. The relations expressed may be spatial (denoting location or direction), temporal (denoting position in time), or relations expressing comparison, content, agent, instrument, means, manner, cause, purpose, reference, etc. https://en.wikipedia.org/wiki/Phrasal_verb...