* Removed the dependency to BOLT (replaced by Logs) and dypgen (replaced by menhir)
* Some syntax changes:
1. Prefix operators have the highest priority
2. Infix operators have a higher priority than application (*Note: this may break existing code*)
3. An associativity property (none, left, right) can be set to infix operators (left is the default), and a precedence level as well
2. Application has precedence over infix operators
3. An associativity property (none, left, right) can be set to infix operators (left is the default), and a precedence level as well. See the associativity and the precedence section in the [README](README.me).
* Removed the dependency to BOLT (replaced by Logs) and dypgen (replaced by menhir)
# Version 1.4.0
## The acgc.opt/acgc compiler and the acg.opt/acg interpreter:
* `SYM t` if `SYM` is a prefix symbol (highest priority)
* `BINDER x y z.t` if `BINDER` is a binder
* About associativity and precedence of operators
Prefix operators have precedence over application, and application has precedence over infix operators. Relative precedence among infix operators can be defined.
When no associativity specification is set, the default is left associative.
When no precedece definition is given, the default is higher precedence over any infix operator defined so far.
When declaring or defining an infix operator with the keyword 'infix', the optional specification for the associativity and the relative precedence can be set.
A specification is given between square brackets. The syntax is as follows:
```
infix [specification] SYM …
```
(the remaining part of the declaration is the same as without the specification)
A specification is non-empty comma-separated list of:
+ an (optional) associativity specification, given by one of the keywords `Left`, `Right`, or `NonAssoc`. If not present, left associativity is set by default to infix operators
+ an (optional) precedence declaration (if not present, the highest precedence over all the infix operators defined so far is given). It is defined as `< SYM` (where `SYM` is a symbol). It assigns to the operator being declared or defined the greates precedence *below* the precedence of `SYM`.
(* LOVE is interpreted as a function taking two arguments. The first one is the object and the second one is the subject. It returns the concatenation subject+loves+object *)
AIMER := lambda o s.s + loves + o;
VOULOIR_CV := lambda vp. Lambda s. s + wants + to + (vp e);
VOULOIR_CV := lambda vp. Lambda s. s + wants + to + vp e;
* DONE Add an optional ";" before the "end" keyword
* DONE Change lexers to avoid problems with keywords
* TODO Add precedence values and management in the signature
* DONE Add precedence values and management in the signature
* TODO Add (+) notation style to prevent the infix use of +
* TODO Add syntactic extensions to handle associativity and precedence of infix operators
* DONE Add syntactic extensions to handle associativity and precedence of infix operators
* TODO Add error (and warning) messages management to the Error module, and make a difference between "real" parsing errors and errors resulting from evaluating the parsing against some environment. The latter can be output all together (may be some limit to be set)
* DONE Move from dypgen to menhir in scripts
* TODO change README and INSTALL files:
* DONE change README and INSTALL files:
+ [X] to indicate new dependencies (menhir, logs...)
+ [] to document syntax extensions for infix operators, precedence of the latter over application. Highest precedence for prefix operators
* TODO What about lexicon composition when one lexicon at least is non-linear?
+ [X] to document syntax extensions for infix operators, precedence of the latter over application. Highest precedence for prefix operators
* DONE What about lexicon composition when one lexicon at least is non-linear?
"A signature entry (type declaration, type definition, term declaration, or term definition) is expected.\n"
|75->
"A declaration of a signature (keyword 'signature') or of a lexicon (keyword 'lexicon' or 'nl_lexicon') is expected.\n"
|133->
|150->
"An identifier (the name of a new lexicon) is expected.\n"
|134->
|151->
"A left parenthesis '(' is expected.\n"
|136->
|153->
"A right parenthesis ')' is expected.\n"
|137->
|154->
"A colon ':' is expected.\n"
|138->
|155->
"An identifier (the name of a signature) is expected.\n"
|139->
|156->
"An equality symbol '=' is expected.\n"
|141->
|158->
"A semi-colon ';' or the 'end' keyword are expected.\n"
|147->
|164->
"An identifier (the name of a new lexicon) is expected\n"
|148->
|165->
"A left parenthesis '(' is expected.\n"
|149->
|166->
"An identifier (the name of a signature) is expected.\n"
|150->
|167->
"A right parenthesis ')' is expected.\n"
|151->
|168->
"A expression in the form of \": <identifier> =\" where the identifier is the name of a signature is expected.\n"
|152|135|76->
|169|152|76->
"An identifier (the name of a signature) is expected.\n"
|153->
|170->
"An equality symbold '=' is expected.\n"
|154|142|140->
|171|159|157->
"A lexicon entry of the form \"<term> := <term>;\" or \"<type> := <type>\" is expected.\n"
|157|156->
|174|173->
"An expression representing the composition of lexicons is expected.\n"
|162->
|179->
"The composition operator '<<' or a right parenthesis ')' is expected.\n"
|159|166->
|176|183->
"The composition operator '<<' is expected.\n"
|160->
|177->
"An identifier (the name of a lexicon), or an expression representing the composition of lexicons is expected.\n"
|172->
|189->
"An identifier or a keyword ('infix', 'prefix', or 'binder') is expected.\n"
|87|79->
|79->
"A symbol is expected.\n"
|88|80->
"A typing judgmenet in the form of \": <type>;\" or a defintion in the form of \"= <term>: <type>;\" is expected.\n"
|89|81->
|95->
"An associativity specification (one of the keywords 'Left', 'Right', or 'NonAssoc') or a precedence specification in the form of \"< <sym>\" where \"<sym>\" is an other infix symbol are expected.\n"
|99->
"A right square bracket ']' or a comma \",\" followed by a precedence specification in the form of \"< <sym>\" where \"<sym>\" is an other infix symbol are expected.\n"
|98->
"An associativity specification (one of the keywords 'Left', 'Right', or 'NonAssoc') is expected.\n"
|100->
"A precedence specification in the form of \"< <sym>\" where \"<sym>\" is an other infix symbol is expected.\n"
|97->
"A right square bracket ']' or a comma ',' followed by an associativity specification (one of the keywords 'Left', 'Right', or 'NonAssoc') are expected.\n"
|96->
"An identifier is expected.\n"
|87|104->
"A symbol or a declaration of associativity an precedence property are expected.\n"
|88|80|105->
"A typing judgement in the form of \": <type>;\" or a defintion in the form of \"= <term>: <type>;\" is expected.\n"
|89|81|106->
"A typing judgment in the form \"<term> : <type>;\" is expected.\n"