Skip to content

Commit

Permalink
fix: Allow zero or more colons in constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
dandxy89 committed Nov 13, 2023
1 parent ea5e188 commit 51be6aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lp_file_format.pest
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ CMP = _{ GTE | GT | LTE | LT | EQ }
CONSTRAINT_EXPR = { OPERATOR? ~ FLOAT? ~ VARIABLE | OPERATOR? ~ FLOAT }
CONSTRAINT_NAME = ${ VALID_CHARS{1, 255} }
CONSTRAINT = {
NEWLINE? ~ (CONSTRAINT_NAME ~ COLON? ~ COLON?)? ~ CONSTRAINT_EXPR ~ (NEWLINE? ~ OPERATOR ~ CONSTRAINT_EXPR)* ~ NEWLINE? ~ CMP ~ FLOAT
NEWLINE? ~ (CONSTRAINT_NAME ~ COLON*)? ~ CONSTRAINT_EXPR ~ (NEWLINE? ~ OPERATOR ~ CONSTRAINT_EXPR)* ~ NEWLINE? ~ CMP ~ FLOAT
}
CONSTRAINTS = { NEWLINE* ~ CONSTRAINT_SECTION ~ CONSTRAINT+ }

Expand Down

0 comments on commit 51be6aa

Please sign in to comment.