vmware / differential-datalog

DDlog is a programming language for incremental computation. It is well suited for writing programs that continuously update their output in response to input changes. A DDlog programmer does not write incremental algorithms; instead they specify the desired input-output mapping in a declarative manner.
MIT License
1.38k stars 119 forks source link

Make parser errors more user-friendly. #554

Open ryzhyk opened 4 years ago

ryzhyk commented 4 years ago

The error message for the following code is not particularly helpful:

function f(...): bool = {
    for (...) {
        ...
    } // MISSING SEMICOLON
    false
}

Instead of suggesting a semicolon, it just says:

ddlog: Failed to parse input file: "......" (line 96, column 5):
unexpected "f"
expecting operator or "}"
mihaibudiu commented 4 years ago

parser errors are not easy to fix