Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 1.23 KB

README.md

File metadata and controls

34 lines (23 loc) · 1.23 KB

While language simulator

Web application for developing and testing WHILE/LOOP programs.

Developed by Simon Meusel and contributors at the research group Knowledge-Based Systems.

Grammar files and parser

  • The WHILE/LOOP language grammar can be found at src/core/parser/nearley/whileGrammar.ne and src/core/parser/nearley/tokens.ts
  • To programmatically parse, analyse and run a WHILE/LOOP program, use the src/core module:
const parser = new NearleyParser();

const programText = 'LOOP x1 DO x0 := x0 + x2 END';
const program = new Program(parser.parseProgramText(programText));

const generator = program.start();

// Simulate the program step by step
for (const configuration of generator) {
    console.log(configuration);
}

How to contribute

  • Docs on how to get the project up and running are in docs/gettingStarted.md.
  • The application structure is described in docs/modules.md
  • Read docs/guidelines.md
  • The application docs should be kept in sync with the source code