Commit ca24eea7 authored by POGODALLA Sylvain's avatar POGODALLA Sylvain

compilation for acg doesn't work yet

parent 280903ec
# Version 1.5.0
## The acgc.opt/acgc compiler and the acg.opt/acg interpreter:
* 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
# Version 1.4.0
## The acgc.opt/acgc compiler and the acg.opt/acg interpreter:
* Improved performance by better logging management (for debug)
......
......@@ -146,8 +146,18 @@ if it has to."
(add-hook 'acg-mode-hook 'acg-set-compile-command)
(require 'compile)
;; Add colors to the emacs buffer
(require 'ansi-color)
(defun colorize-compilation-buffer ()
(toggle-read-only)
(ansi-color-apply-on-region compilation-filter-start (point))
(toggle-read-only))
(add-hook 'compilation-filter-hook 'colorize-compilation-buffer)
;; find the line of the error
(defconst acg-error-regexp
;; "^[^\0-@]+ \"\\([^\"\n]+\\)\", [^\0-@]+ \\([0-9]+\\)[-,:]"
......
(* This files gives an example of how to use the ACG toolkit to illustrate
Montague's semantics on a bilingual fragment (French, English). *)
(* First we define the syntactic categories and the syntactic terms. *)
signature syntax =
(* the syntactic types *)
......@@ -66,7 +65,7 @@ lexicon realisation_francais (syntax) : francais =
returns the concatenation subject+loves+object *)
AIMER := lambda o s.s + aime + o;
VOULOIR_CV := lambda vp. Lambda s. s + veut + vp e;
VOULOIR_CV := lambda vp. Lambda s. s + veut + (vp e);
VOULOIR_SC := lambda sc s. s + veut + sc;
CHAQUE := lambda n P. P (chaque + n);
......@@ -112,7 +111,7 @@ lexicon realisation_anglais (syntax) : anglais =
(* 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);
VOULOIR_SC := lambda sc s. s + wants + sc;
CHAQUE := lambda n P. P (every + n);
......
commands: ADD_HELP WAIT
##
## Ends in an error in state: 86.
##
## command -> ADD_HELP . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## ADD_HELP
##
commands: ANALYSE_HELP WAIT
##
## Ends in an error in state: 83.
##
## command -> ANALYSE_HELP . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## ANALYSE_HELP
##
commands: CHECK_HELP WAIT
##
## Ends in an error in state: 80.
##
## command -> CHECK_HELP . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## CHECK_HELP
##
commands: CREATE_HELP WAIT
##
## Ends in an error in state: 70.
##
## command -> CREATE_HELP . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## CREATE_HELP
##
commands: COMPOSE IDENTT IDENTT AS IDENTT WAIT
##
## Ends in an error in state: 76.
##
## command -> COMPOSE IDENTT IDENTT AS IDENTT . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## COMPOSE IDENTT IDENTT AS IDENTT
##
commands: CREATE_LEX IDENTT IDENTT IDENTT WAIT
##
## Ends in an error in state: 68.
##
## command -> CREATE_LEX IDENTT IDENTT IDENTT . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## CREATE_LEX IDENTT IDENTT IDENTT
##
commands: CREATE_SIG IDENTT WAIT
##
## Ends in an error in state: 63.
##
## command -> CREATE_SIG IDENTT . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## CREATE_SIG IDENTT
##
commands: EXIT WAIT
##
## Ends in an error in state: 51.
##
## command -> EXIT . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## EXIT
##
commands: IDENTT PRINT WAIT
##
## Ends in an error in state: 90.
##
## command -> option(IDENTT) PRINT . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
## command -> option(IDENTT) PRINT . HELP SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## option(IDENTT) PRINT
##
commands: LOAD_HELP WAIT
##
## Ends in an error in state: 35.
##
## command -> LOAD_HELP . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## LOAD_HELP
##
commands: LOAD_SCRIPT SEMICOLONN
##
## Ends in an error in state: 108.
##
## list(command) -> command . list(command) [ EOII ]
##
## The known suffix of the stack is as follows:
## command
##
commands: PARSE_HELP WAIT
##
## Ends in an error in state: 30.
##
## command -> PARSE_HELP . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## PARSE_HELP
##
commands: QUERY_HELP WAIT
##
## Ends in an error in state: 27.
##
## command -> QUERY_HELP . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## QUERY_HELP
##
commands: REALIZE_HELP WAIT
##
## Ends in an error in state: 24.
##
## command -> REALIZE_HELP . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## REALIZE_HELP
##
commands: REALIZE_SHOW_HELP WAIT
##
## Ends in an error in state: 21.
##
## command -> REALIZE_SHOW_HELP . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## REALIZE_SHOW_HELP
##
commands: SAVE_HELP WAIT
##
## Ends in an error in state: 18.
##
## command -> SAVE_HELP . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## SAVE_HELP
##
commands: SELECT IDENTT WAIT
##
## Ends in an error in state: 14.
##
## command -> SELECT IDENTT . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## SELECT IDENTT
##
commands: UNSELECT WAIT
##
## Ends in an error in state: 5.
##
## command -> UNSELECT . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
## command -> UNSELECT . HELP SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## UNSELECT
##
commands: WAIT HELP WAIT
##
## Ends in an error in state: 3.
##
## command -> WAIT HELP . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## WAIT HELP
##
A semicolon ":" is expected
commands: DONT TRACE WAIT
##
## Ends in an error in state: 58.
##
## command -> DONT TRACE . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
## command -> DONT TRACE . HELP SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## DONT TRACE
##
commands: DONT WAIT WAIT
##
## Ends in an error in state: 54.
##
## command -> DONT WAIT . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
## command -> DONT WAIT . HELP SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## DONT WAIT
##
commands: HELP WAIT
##
## Ends in an error in state: 47.
##
## command -> HELP . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
## command -> HELP . HELP SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## HELP
##
commands: IDENTT IDB WAIT
##
## Ends in an error in state: 94.
##
## command -> option(IDENTT) IDB . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
## command -> option(IDENTT) IDB . HELP SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## option(IDENTT) IDB
##
commands: LIST WAIT
##
## Ends in an error in state: 38.
##
## command -> LIST . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
## command -> LIST . HELP SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## LIST
##
commands: TRACE WAIT
##
## Ends in an error in state: 9.
##
## command -> TRACE . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
## command -> TRACE . HELP SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## TRACE
##
commands: WAIT WAIT
##
## Ends in an error in state: 1.
##
## command -> WAIT . SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
## command -> WAIT . HELP SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## WAIT
##
A semicolon ":" or the keyword "help is expected.
commands: COMPOSE IDENTT IDENTT AS WAIT
##
## Ends in an error in state: 75.
##
## command -> COMPOSE IDENTT IDENTT AS . IDENTT SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## COMPOSE IDENTT IDENTT AS
##
An identifier (the name of a new lexicon) is expected.
commands: COMPOSE IDENTT IDENTT WAIT
##
## Ends in an error in state: 74.
##
## command -> COMPOSE IDENTT IDENTT . AS IDENTT SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## COMPOSE IDENTT IDENTT
##
The keyword "as" is expected.
commands: COMPOSE IDENTT WAIT
##
## Ends in an error in state: 73.
##
## command -> COMPOSE IDENTT . IDENTT AS IDENTT SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## COMPOSE IDENTT
##
commands: COMPOSE WAIT
##
## Ends in an error in state: 72.
##
## command -> COMPOSE . IDENTT IDENTT AS IDENTT SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
## command -> COMPOSE . HELP SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## COMPOSE
##
commands: CREATE_LEX IDENTT IDENTT WAIT
##
## Ends in an error in state: 67.
##
## command -> CREATE_LEX IDENTT IDENTT . IDENTT SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## CREATE_LEX IDENTT IDENTT
##
commands: CREATE_LEX IDENTT WAIT
##
## Ends in an error in state: 66.
##
## command -> CREATE_LEX IDENTT . IDENTT IDENTT SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## CREATE_LEX IDENTT
##
commands: CREATE_LEX WAIT
##
## Ends in an error in state: 65.
##
## command -> CREATE_LEX . IDENTT IDENTT IDENTT SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## CREATE_LEX
##
An identifier (the name of a lexicon) or the command "help" are expected.
commands: CREATE_SIG WAIT
##
## Ends in an error in state: 62.
##
## command -> CREATE_SIG . IDENTT SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## CREATE_SIG
##
An identifier (the name of a signature) or the command "help" are expected.
commands: DONT UNSELECT
##
## Ends in an error in state: 53.
##
## command -> DONT . WAIT SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
## command -> DONT . WAIT HELP SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
## command -> DONT . TRACE SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
## command -> DONT . TRACE HELP SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## DONT
##
The command "trace" or "wait" is expected.
commands: IDENTT IDENTT WAIT
##
## Ends in an error in state: 45.
##
## nonempty_list(IDENTT) -> IDENTT . [ SAVE REALIZE_SHOW REALIZE CHECK ANALYSE ADD ]
## nonempty_list(IDENTT) -> IDENTT . nonempty_list(IDENTT) [ SAVE REALIZE_SHOW REALIZE CHECK ANALYSE ADD ]
##
## The known suffix of the stack is as follows:
## IDENTT
##
The commands "save", "check", "realize" (and the deprecated "analyse" and "realize_show") are expected.
commands: IDENTT WAIT
##
## Ends in an error in state: 42.
##
## command -> IDENTT . PARSE [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
## command -> IDENTT . QUERY [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
## nonempty_list(IDENTT) -> IDENTT . [ SAVE REALIZE_SHOW REALIZE CHECK ANALYSE ADD ]
## nonempty_list(IDENTT) -> IDENTT . nonempty_list(IDENTT) [ SAVE REALIZE_SHOW REALIZE CHECK ANALYSE ADD ]
## option(IDENTT) -> IDENTT . [ PRINT IDB ]
##
## The known suffix of the stack is as follows:
## IDENTT
##
A command is expected after an identifier.
commands: SELECT WAIT
##
## Ends in an error in state: 13.
##
## command -> SELECT . IDENTT SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
## command -> SELECT . HELP SEMICOLONN [ WAIT UNSELECT TRACE SELECT SAVE_HELP SAVE REALIZE_SHOW_HELP REALIZE_SHOW REALIZE_HELP REALIZE QUERY_HELP QUERY PRINT PARSE_HELP PARSE LOAD_SCRIPT LOAD_OBJECT LOAD_HELP LOAD_DATA LIST IDENTT IDB HELP EXIT EOII DONT CREATE_SIG CREATE_LEX CREATE_HELP COMPOSE CHECK_HELP CHECK ANALYSE_HELP ANALYSE ADD_HELP ADD ]
##
## The known suffix of the stack is as follows:
## SELECT
##
An identifier (the name of a signature or of a lexicon) or the command "help" are expected.
commands: SEMICOLONN
##
## Ends in an error in state: 0.
##
## commands' -> . commands [ # ]
##
## The known suffix of the stack is as follows:
##
##
A command is expected.
%{
open Logic
open AcgData.Environment
open Script_lexer
let id = fun x -> x
let pr s = Logs.app (fun m -> m "%s" s)
......@@ -58,123 +57,320 @@
let ctx' = F.wait ctx in
(ctx',e)}
| WAIT HELP l = SEMICOLONN {
fun ctx e ->
let () = echo ctx l in
let () = F.help (F.Help (Some F.Wait)) in
ctx,e}
| DONT WAIT l = SEMICOLONN {
fun ctx e ->
let () = echo ctx l in
let ctx' = F.dont_wait ctx in (ctx',e)}
| DONT WAIT HELP l = SEMICOLONN {
fun ctx e ->
let () = echo ctx l in
let () = F.help (F.Help (Some F.Dont_Wait)) in
ctx,e}
| params = LOAD_DATA {
fun ctx e ->
let s,loc,l = params in
let () = echo ctx l in
let e' = F.load F.Data s (F.dirs ctx) e in
ctx,e'
}
| LOAD_OBJECT<s,loc,l> {fun e -> let () = echo dyp.global_data l in
let _,_,incl,_ = dyp.global_data in
F.load F.Object s incl e}
| LOAD_SCRIPT<s,loc,l> {fun e -> let () = echo dyp.global_data l in
let _,_,includes,_ = dyp.global_data in
let new_env = F.load (F.Script (snd dyp.last_local_data)) s includes e in
new_env}
| LIST SEMICOLONN<l> {fun e -> let () = echo dyp.global_data l in let () = F.list e in e}
| SELECT IDENTT<name,loc> SEMICOLONN<l> {fun e -> let () = echo dyp.global_data l in F.select name loc e}
| UNSELECT SEMICOLONN<l> { let () = echo dyp.global_data l in F.unselect}
| TRACE SEMICOLONN<l> { let () = echo dyp.global_data l in fun e -> let () = F.trace () in e}
| DONT TRACE SEMICOLONN<l> { let () = echo dyp.global_data l in fun e -> let () = F.dont_trace () in e}
| optional_ident<name> PRINT<p> SEMICOLONN<l> {
let () = echo dyp.global_data l in fun e ->
let loc =
match name with
| None -> p
| Some (_,l) -> l in
match name with
| None -> let () = F.print e loc in e
| Some (n,l) -> let () = F.print ~name:n e loc in e}
| optional_idents<names> ANALYSE<t,l,line> { let () = echo dyp.global_data line in fun e ->
match names with
| [] -> let () = F.analyse e t l in e
| _ -> let () = F.analyse ~names e t l in e}
| optional_idents<names> CHECK<t,l,line> {
let () = echo dyp.global_data line in fun e ->
match names with
| [] -> let () = F.check e t l in e
| _ -> let () = F.check ~names e t l in e}
| optional_idents<names> REALIZE<t,l,line> {
let () = echo dyp.global_data line in fun e ->
match names with
| [] -> let () = F.realize ?svg_output:(svg dyp.global_data) e t l in e
| _ -> let () = F.realize ~names ?svg_output:(svg dyp.global_data) e t l in e}
| optional_idents<names> REALIZE_SHOW<t,l,line> {
let () = echo dyp.global_data line in fun e ->
match names with
| [] -> let () = F.realize_show e t l in e
| _ -> let () = F.realize_show ~names e t l in e}
| optional_ident<name> PARSE<t,l,line> {
let () = echo dyp.global_data line in fun e ->
match name with
| None -> let () = F.parse e t l in e
| Some (n,lex_loc) -> let () = F.parse ~name:n e t lex_loc in e}
| optional_ident<name> QUERY<t,l,line> {
let () = echo dyp.global_data line in fun e ->
match name with
| None -> let () = F.query e t l in e
| Some (n,lex_loc) -> let () = F.query ~name:n e t lex_loc in e}
| optional_ident<name> IDB<p> SEMICOLONN<l> {
let () = echo dyp.global_data l in fun e ->
let loc =
match name with
| None -> p
| Some (_,l) -> l in
match name with
| None -> let () = F.idb e loc in e
| Some (n,l) -> let () = F.idb ~name:n e loc in e}
| optional_idents<names> ADD<t,l,line> { let () = echo dyp.global_data line in fun e ->
match names with
| [] -> F.add e t l
| _ -> F.add ~names e t l}
| COMPOSE IDENTT<n1> IDENTT <n2> AS IDENTT<n3> SEMICOLONN<l> { let () = echo dyp.global_data l in fun e -> F.compose n1 n2 n3 e}
| HELP SEMICOLONN<l> {let () = echo dyp.global_data l in fun e -> let () = F.help (F.Help None) in e}
| all_commands<c> HELP SEMICOLONN<l> {let () = echo dyp.global_data l in fun e -> let () = F.help (F.Help (Some c)) in e}
| LOAD_HELP SEMICOLONN<l> {let () = echo dyp.global_data l in fun e -> let () = F.help (F.Help (Some F.Load)) in e}
| LOAD_HELP SEMICOLONN<l> {let () = echo dyp.global_data l in fun e -> let () = F.help (F.Help (Some F.Load)) in e}
| ANALYSE_HELP SEMICOLONN<l> {let () = echo dyp.global_data l in fun e -> let () = F.help (F.Help (Some F.Analyse)) in e}
| REALIZE_HELP SEMICOLONN<l> {let () = echo dyp.global_data l in fun e -> let () = F.help (F.Help (Some F.Realize)) in e}
| REALIZE_SHOW_HELP SEMICOLONN<l> {let () = echo dyp.global_data l in fun e -> let () = F.help (F.Help (Some F.RealizeShow)) in e}
| CHECK_HELP SEMICOLONN<l> {let () = echo dyp.global_data l in fun e -> let () = F.help (F.Help (Some F.Check)) in e}
| PARSE_HELP SEMICOLONN<l> {let () = echo dyp.global_data l in fun e -> let () = F.help (F.Help (Some F.Parse)) in e}
| QUERY_HELP SEMICOLONN<l> {let () = echo dyp.global_data l in fun e -> let () = F.help (F.Help (Some F.Query)) in e}
| SAVE_HELP SEMICOLONN<l> {let () = echo dyp.global_data l in fun e -> let () = F.help (F.Help (Some F.Save)) in e}
| ADD_HELP SEMICOLONN<l> {let () = echo dyp.global_data l in fun e -> let () = F.help (F.Help (Some F.Add)) in e}
| CREATE_HELP SEMICOLONN<l> {let () = echo dyp.global_data l in fun e -> let () = F.help (F.Help (Some F.Create)) in e}
| CREATE_SIG IDENTT<n> SEMICOLONN<l> {let () = echo dyp.global_data l in fun e -> F.create_sig n e}
| CREATE_LEX IDENTT<n> IDENTT<n1> IDENTT<n2> SEMICOLONN<l> {let () = echo dyp.global_data l in fun e -> F.create_lex ~abs:n1 ~obj:n2 n e}
| optional_idents<names> SAVE<filename,l,line> { let () = echo dyp.global_data line in fun e ->
match names with
| [] -> let () = F.save filename e l in e
| _ -> let () = F.save ~names filename e l in e}
all_commands:
| WAIT {F.Wait}
| DONT WAIT {F.Dont_wait}
| LIST {F.List}
| SELECT {F.Select}
| UNSELECT {F.Unselect}
| TRACE {F.Trace}
| DONT TRACE {F.Dont_trace}
| PRINT {F.Print}
| ANALYSE {F.Analyse}
| CHECK {F.Check}
| REALIZE {F.Realize}
| REALIZE_SHOW {F.RealizeShow}
| PARSE {F.Parse}
| IDB {F.Idb}
| QUERY {F.Query}
| ADD {F.Add}
| COMPOSE {F.Compose}
| HELP {F.Help None}
| SAVE {F.Save}
ctx,e'}
| params = LOAD_OBJECT {
fun ctx e ->
let s,loc,l = params in
let () = echo ctx l in
ctx,F.load F.Object s (F.dirs ctx) e}
| params = LOAD_SCRIPT {
fun ctx e ->
let s,loc,l = params in
let () = echo ctx l in
ctx,F.load (F.Script (F.parse_script ctx)) s (F.dirs ctx) e }
| LIST l = SEMICOLONN {fun ctx e ->
let () = echo ctx l in
let () = F.list e in
ctx, e}
| LIST HELP l = SEMICOLONN {
fun ctx e ->
let () = echo ctx l in
let () = F.help (F.Help (Some F.List)) in
ctx,e}
| SELECT id = IDENTT l = SEMICOLONN {
fun ctx e ->
let name,loc = id in
let () = echo ctx l in
ctx,F.select name loc e}
| SELECT HELP l = SEMICOLONN {
fun ctx e ->
let () = echo ctx l in
let () = F.help (F.Help (Some F.Select)) in
ctx,e}
| UNSELECT l = SEMICOLONN {
fun ctx e ->
let () = echo ctx l in
ctx,F.unselect}
| UNSELECT HELP l = SEMICOLONN {
fun ctx e ->
let () = echo ctx l in
let () = F.help (F.Help (Some F.Unselect)) in
ctx,e}
| TRACE l = SEMICOLONN {
fun ctx e ->
let () = echo ctx l in
let () = F.trace () in
ctx,e}
| TRACE HELP l = SEMICOLONN {
fun ctx e ->
let () = echo ctx l in
let () = F.help (F.Help (Some F.Trace)) in
ctx,e}
| DONT TRACE l = SEMICOLONN {
fun ctx e ->
let () = echo ctx l in
let () = F.dont_trace () in
ctx,e}
| DONT TRACE HELP l = SEMICOLONN {
fun ctx e ->
let () = echo ctx l in
let () = F.help (F.Help (Some F.Dont_trace)) in
ctx,e}
| name = IDENTT? p = PRINT l = SEMICOLONN {
fun ctx e ->
let () = echo ctx l in
let () =
match name with
| None -> F.print e p
| Some (n,l) -> F.print ~name:n e loc in
ctx,e}
| IDENTT? PRINT HELP l = SEMICOLONN {
fun ctx e ->
let () = echo ctx l in
let () = F.help (F.Help (Some F.Print)) in
ctx,e}
| params = ANALYSE {
fun ctx e ->
let t,l,line = params in
let () = echo ctx line in
let () = F.analyse e t l in
ctx, e}
| names = IDENTT+ params = ANALYSE {
fun ctx e ->
let t,l,line = params in
let () = echo ctx line in
let () = F.analyse ~names e t l in
ctx, e}
| params = CHECK {
fun ctx e ->
let t,l,line = params in
let () = echo ctx line in
let () = F.check e t l in
ctx, e}
| names = IDENTT+ params = CHECK {
fun ctx e ->
let t,l,line = params in