enso/docs/parser
Radosław Waśko 11868cb528
Enso Version Management in the Launcher (#1059)
- Adds support for downloading engine and runtime versions in the launcher.
- Adds functionality to install, list and uninstall engine components.
2020-08-10 12:14:39 +02:00
..
architecture.md Add a markdown style guide (#1022) 2020-07-21 13:59:40 +01:00
ast.md Enso Version Management in the Launcher (#1059) 2020-08-10 12:14:39 +02:00
construct-resolution.md Add a markdown style guide (#1022) 2020-07-21 13:59:40 +01:00
flexer.md Refactor the flexer to enable code generation (#1040) 2020-08-03 18:26:10 +01:00
jvm-object-generation.md Add a markdown style guide (#1022) 2020-07-21 13:59:40 +01:00
lexer.md Add a markdown style guide (#1022) 2020-07-21 13:59:40 +01:00
macro-resolution.md Add a markdown style guide (#1022) 2020-07-21 13:59:40 +01:00
operator-resolution.md Add a markdown style guide (#1022) 2020-07-21 13:59:40 +01:00
parser-driver.md Add a markdown style guide (#1022) 2020-07-21 13:59:40 +01:00
reader.md Add a lazy input reader for flexer (#1014) 2020-07-21 16:25:02 +01:00
README.md Add a markdown style guide (#1022) 2020-07-21 13:59:40 +01:00
tech-analysis.md Add a markdown style guide (#1022) 2020-07-21 13:59:40 +01:00

layout title category tags order
docs-index Enso's Parser summary
parser
readme
0

Enso's Parser

The parser is one of the most crucial components of the Enso runtime in that all code that a user writes must be parsed. This means that a good parser is fast, responsive, and lightweight; it shouldn't baulk at having thousands of lines of code thrown at it.

Enso's parser, however, is very special. In order to support interactive use it has to narrow down the scope of a syntax error as much as possible, while still providing useful output for the compiler around the rest of the parse errors. This feature makes it more complex than many common parsers, so making this work while still preserving performance is of paramount importance.

The various components of the parser's design and architecture are described below:

  • Tech Analysis: A brief overview of the reasons for the implementation technologies for the parser.
  • Parser Architecture: An overview of the architecture of the parser as a whole.
  • Flexer: An overview of the design and architecture of the flexer, a generic, DFA-based lexing engine.
  • Lexer: The Enso lexer, responsible for tokenising the input stream of source code.
  • Macro Resolution: The system for defining and resolving macros on the token stream.
  • Operator Resolution: The system for resolving operator applications properly.
  • Construct Resolution: The system for resolving higher-level language constructs in the AST to produce a useful output.
  • Parser Driver:
  • AST: The parser AST.
  • JVM Object Generation: The process for generating the ast representation on the JVM via reflection.
  • Reading Source Code: The flexible architecture for reading source code into the lexer.