Weird string behaviour when parsing "-", "."

Issue #811 resolved
Ruben Lapauw created an issue

Current behaviour: "-" == "." == "-." == 0. The string "3e-3" == 0.0003. The type {"A", "B", "C", "1", "2", "3"} is not a string type.

This leads to weird behaviour and possible problems when using strings.

vocabulary V {
    type T isa string
  x(T)
    f : T
    g(T) : T
}

theory T : V {
    #{t : T(t)} = 3.
    x(".").
    f = "-".
    g("-") = ".".
}

structure S : V {
    T = {"."; "-"; "-."}
}

procedure main(){
    result= modelexpand(T,S)[1]
    if result == nil then
        return 0
    else 
        return 1
    end
}

Comments (3)

  1. Bart Bogaerts

    Heeft wss niks met bootstrapping te maken. Is gerelateerd aan de issue die @ingdas onlangs gefixed heeft

  2. Log in to comment