On this page:
parser?
parse-syntax
parse-datum
6.1 Earley parsing
8.12

6 Parsers🔗ℹ

 (require yaragg/parser) package: yaragg

A parser parses sequences of tokens into parse trees represented by derivation trees, syntax objects, or S-expressions. In Yaragg, each parser is specific to a particular grammar. Parser construction functions like earley-parser consume the grammar as an input and produce a parser for that grammar.

procedure

(parser? v)  boolean?

  v : any/c
A predicate for parsers.

procedure

(parse-syntax parser tokens)  syntax?

  parser : parser?
  tokens : (sequence/c token?)
Parses tokens into a syntax object using parser.

procedure

(parse-datum parser tokens)  any/c

  parser : parser?
  tokens : (sequence/c token?)
Parses tokens into an S-expression using parser.

6.1 Earley parsing🔗ℹ

 (require yaragg/parser/earley) package: yaragg

(earley-parser [grammar grammar?]) parser? "Constructs a parser for " (racket grammar) " implemented using the Earley parsing algorithm."