Language Machine

The language machine is a toolkit for language and grammar that is published by PeriHankey under the Gnu GPL at http://languagemachine.sourceforge.net.

As can be seen from http://languagemachine.sourceforge.net/lambda.html, the language machine is in effect an engine for functional and grammatical evaluation which contains the capabilities of the LambdaCalculus and adds the ability to apply unrestricted rules for recognising and substituting grammatical sequences.

The key components are

The grammatical engine is written in DeeLanguage, and the lmn MetaLanguage is written in LmnLanguage. There are descriptions and examples at the website. The key features of the system are

The symbols that can occur in the left- and right-sides of rules are

Applying a rule involves

Because mismatch events typically occur during the recognition phase of a rule application, the recognition phases of rules tend to be nested within each other. Substitution phases tend also to be nested. You can tell a great deal about the workings of an analysis by looking at the way nested recognition phases overlap with nested substitution phases, and this can be displayed in a diagram which is explained at http://languagemachine.sourceforge.net.

The lmn language allows rules to be written so that they can be related to specific classes of mismatch event. When a mismatch event occurs there is a limited number of alternative rules available for resolving the mismatch, and these are tried in turn and in a predictable order. So the language machine has a systematic way of dealing with partial ambiguity, and can be made reasonably efficient.

The side-effect actions in rule left- and right-sides can include assignments, conditionals, loops, and calls on external procedures, and they can also construct and transmit transformed representations of material that has been analysed. The value of a variable can itself be a deferred sequence of symbols and actions, and variable references can produce material to be matched as part of the left-side of a rule, or material to be substituted as part of the right-side of a rule.

In effect, the language machine directly implements a parser which applies unrestricted grammatical rules. But it turns out that there is a strong relationship between this difficult concept and the much better understood concept of a macro processor - one that happens to recognise and substitute grammatical patterns. And it also turns out that perfectly ordinary rules which directly represent and evaluate the LambdaCalculus are a subset of the rules that can usefully be applied by the language machine.


CategoryProgrammingLanguage


EditText of this page (last edited November 21, 2005) or FindPage with title or text search