esotope IL

SKETCH IN PROGRESS. DO NOT EXPECT THAT MUCH.

esotope IL is a group of intermediate languages defined for each esolang classes. They forms a common ground for interpretation, compilation and analysis: for example, Kipple and Aheui is very similar that we can use multiple stacks and sequential code flow, despite the latter is two-dimensional (albeit not self-modifying). Not to mention various Brainfuck derivates.

Structure

Esotope IL is a big S-expression, which is very similar to (actually, a subset of) Scheme lexical syntax. It is of the form:

(esotope-il
    (requires <requirements>)
    (class <class> <params> ...)
    (meta <metadata>)
    (defines (<name> <kind> <params>) ...)
)

<requirements> specify what is required for the implementation to process this IL, and might be entirely removed. It is a combination of the following elements:

<class> denotes the class of esolang used. It is mandatory, and the first element of it is one of the following classes:

Other elements are parameters specific to given class.

<metadata> is any data that doesn’t affect the actual processing. It may affect the error message or some, though. You can use any well-formed S-expression in it, and currently the following expressions are assigned the definite meaning:

(defines ...) specifies the common definitions and routines throughout the IL. It accepts the list of name-value pairs, and the definition or routine would be assigned to the name. Names should be unique. The name main is reserved for an entry point of the program.

Types

The following types are supported in the esotope IL:

Classes

Classes, as defined in esotope IL, are used to group several esolangs into common representation. It is possible to convert some class to other class, but it might not be trivial.

stack-sequential class

This class of languages has one or more stacks, some of which may be defined to have reversed pop (conventionally called “queue”). This class has the following parameters:


ikiwiki를 씁니다.
마지막 수정