enso/docs/parser/parser-driver.md

31 lines
746 B
Markdown
Raw Normal View History

2020-06-25 15:06:08 +03:00
---
layout: developer-doc
title: Parser Driver
category: parser
tags: [parser, driver]
order: 7
2020-06-25 15:06:08 +03:00
---
# Parser Driver
2020-07-21 15:59:40 +03:00
2020-06-26 16:54:20 +03:00
The parser driver component is responsible for orchestrating the entire action
of the parser. It handles the following duties:
1. Consuming input text using a provided [reader](./reader.md) in a lazy
fashion.
2. Lexing and then parsing the input text.
3. Writing the output AST to the client of the parser.
2020-06-25 15:06:08 +03:00
<!-- MarkdownTOC levels="2,3" autolink="true" -->
2020-06-26 16:54:20 +03:00
- [Driver Clients](#driver-clients)
2020-06-25 15:06:08 +03:00
<!-- /MarkdownTOC -->
2020-06-26 16:54:20 +03:00
## Driver Clients
2020-07-21 15:59:40 +03:00
2020-06-26 16:54:20 +03:00
The parser is going to be employed in two contexts, both running in-process:
1. In the IDE codebase as a rust dependency.
2. In the engine as a native code dependency used via JNI.