Skip to main content

Module parser

Module parser 

Source
Expand description

Parser for the CP scheduling modelling language.

Top-level grammar:

model       = "model" IDENT sections* objective?
sections    = variables_block | domains_block | constraints_block

Public entry point: parse_model

Modules§

constraint
Constraints block parser for the CP language.
decl
Variables block parser for the CP language.
domain
Domains block parser for the CP language.
expr
Expression parser for the CP language using Pratt parsing.

Structs§

Parser
Parser state wrapping a token slice with a cursor.

Functions§

parse_expr_str
Parse an expression from a source string (for testing).
parse_model
Parse a Jia model from a token slice.
parse_model_str
Parse a CP model from a source string.