Syntaxilizer

Version 1.0


Welcome to Syntaxilizer, a simple formal language interpreter. In mathematics, computer science, and linguistics, a formal language is a set of strings of symbols that may be constrained by rules that are specific to it. All formal languages may be represented by finite state automatons (FSA). In this case, we use the Backus-Naur form to define a language. To understand how to use Syntaxilizer, you'll first have to become familiar with this notation system with a bit of research.



Implementation Details

Since the Backus-Naur form is typically used to describe grammars, languages, and syntax, it is rarely ever implemented in code. Specifications of the form varies from place to place. Syntaxilizer supports the original Backus-Naur form (not Extended Backus-Naur form, using quantifiers like {}, {}?, [], etc). You can represent a symbol by enclosing it in angle brackets <>. You can represent a literal value optionally using quotation marks "". Anything not in quotations will be assumed to be a literal, with the exception of the pipe character |, which represents a union (matching either the statement on its left or its right). In this release, recursive definitions like <foo> = <foo> | "bar" are not supported.



Dictionaries

Sometimes you may wish to load a long list of predefined words without having them clutter up the editing area. A Backus-Naur dictionary (.bnd) file is the same as the normal Backus-Naur Form. When you select a dictionary file, it will be loaded in conjunction with the current inputted form, so definitions from the current view may depend on those from the definitions file and vice versa. You may load a dictionary by placing the .bnd file in the examples folder, and it will be loaded in the list below.



Analysis

After you input a piece of text into the second panel, the automaton will tell you whether your text matches the language you have defined. Comparisons are not case sensitive. All punctuation is stripped from your text, and your sentence will be turned into tokens before they're compared to the automaton. Be careful, you have to be really precise with the definition!