Support arbitrary infix predicates (#87)
* Simplify parsing of predicate application * Change lexing of identifiers: * schematic symbols can only be variable-like: a mix of letters, digits, and _, preceded by ' * constant symbols can be: - variable-like - sequence of digits - sequence of selected ASCII characters to allow ids such as ++, :: - 1 arbitrary non-whitespace symbol * constant symbols can be path-qualified (a path is words, separated by $: abc$def$): algebra$matrices$* Since paths are currently not supported by LISA, the path gets merged into the id on the lexer level. This is a temporary behaviour to be changed once paths are supported. * Generalize supported infix predicates In addition to equality, parse as infix all predicates on whose names isInfix returns true
Showing
- lisa-utils/src/main/scala/lisa/utils/Parser.scala 50 additions, 29 deletionslisa-utils/src/main/scala/lisa/utils/Parser.scala
- lisa-utils/src/test/scala/lisa/utils/ParserTest.scala 9 additions, 0 deletionslisa-utils/src/test/scala/lisa/utils/ParserTest.scala
- lisa-utils/src/test/scala/lisa/utils/PrinterTest.scala 8 additions, 0 deletionslisa-utils/src/test/scala/lisa/utils/PrinterTest.scala
Loading
Please register or sign in to comment