tnelson / Forge

Forge: A Tool and Language for Teaching Formal Methods
https://forge-fm.org/
MIT License
67 stars 9 forks source link

Lexer is grouping `n1 <- n2` (a likely typo) as `n1 < -n2` #208

Closed tnelson closed 8 months ago

tnelson commented 1 year ago

Minimum example:

#lang forge
sig Person { age: one Int }
test expect {
    parsing: {all p: Person | (p.age <- 17) iff (p.age < -17)} is theorem
}

This test passes in 2.8.0. My expectation was that it would produce a parser error, since <- isn't a valid token in that position. (This example was extracted from a real typo made by a real user.)

tnelson commented 8 months ago

Resolved by the above PR