Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 518 Bytes

README.md

File metadata and controls

24 lines (17 loc) · 518 Bytes

Getting Started

How it works

  1. Write the language grammar
  2. Generate the language parser
cargo run --features=gen
  1. Parse a human-readable expression into an Abstract Syntax Tree

Example

cargo run --example parse "<expression>"
cargo run --example parse "[0,1,2][0]"

Problem

How do we differentiate between these two:

  • a list with a single integer element: [0]
  • a list access operator: [1,2,3][0]