...
 
Commits (4)
acgtk.install
acgtk.url
......@@ -27,6 +27,7 @@ TAR_RELEASE = $(RELEASE)
ACGtk_DIR = $(shell basename `pwd`)
clean:
dune clean
find . -name "*~" -exec rm -f {} \;
......@@ -41,7 +42,7 @@ tar:
if test -d ../$(TAR_RELEASE) ; then rm ../$(TAR_RELEASE) ; fi
cd .. && ln -s $(ACGtk_DIR) $(TAR_RELEASE) && cd $(ACGtk_DIR)
echo Building $(TAR_RELEASE).tar.gz
tar --exclude="*/.git*" --exclude "*/_build" --exclude "$(TAR_RELEASE)/data" --exclude "$(TAR_RELEASE)/src/data" --exclude "$(TAR_RELEASE)/*.tar.*" --exclude "$(TAR_RELEASE)/TODO" --exclude "*~" --exclude "opam-package" -zcvf $(TAR_RELEASE).tar.gz -C .. -h $(TAR_RELEASE)
tar --exclude="*/.git*" --exclude "*/_build" --exclude "$(TAR_RELEASE)/data" --exclude "$(TAR_RELEASE)/src/data" --exclude "$(TAR_RELEASE)/*.tar.*" --exclude "$(TAR_RELEASE)/TODO" --exclude "*~" --exclude "Makefile" --exclude "acgtk.url" -zcvf $(TAR_RELEASE).tar.gz -C .. -h $(TAR_RELEASE)
if test -d ../$(TAR_RELEASE) ; then rm ../$(TAR_RELEASE) ; fi
www:
......@@ -73,8 +74,9 @@ OPAM_GIT_REPO_DIR=~/work/dev/opam-contrib/opam-repository/packages
OPAM_ACG_REPO_DIR=~/www-acg/opam
OPAM_CALLIGRAMME_ACG_REPO_DIR=~/www-calligramme-acg/software/opam-acg
opam-package/url: tar
md5sum acg-$(VERSION).tar.gz | cut -d " " -f 1 | xargs -i printf "archive: \"http://acg.loria.fr/software/acg-$(VERSION).tar.gz\"\nchecksum: \"%s\"\n" {} > $@
acgtk.url: tar acg-$(VERSION).tar.gz
md5sum acg-$(VERSION).tar.gz | cut -d " " -f 1 | xargs -I{} printf 'url {\n src: "http://acg.loria.fr/software/acg-$(VERSION).tar.gz"\n checksum: "%s"\n}\n' {} | cat acgtk.opam - > $@
opam lint $@
test-www-acg: opam-admin
cd $(OPAM_ACG_REPO_DIR) && opam admin make && echo "Going to rsync with loria.loria.fr:$(OPAM_ACG_REPO_DIR)" && rsync -vaz --rsh="ssh -l pogodall" ./ pogodall@loria.loria.fr:$(OPAM_ACG_REPO_DIR) && echo "Going to rsync with loria.loria.fr:$(OPAM_CALLIGRAMME_ACG_REPO_DIR)" && rsync -vaz --rsh="ssh -l pogodall" ./ pogodall@loria.loria.fr:$(OPAM_CALLIGRAMME_ACG_REPO_DIR)
......@@ -85,13 +87,9 @@ sync: opam-admin
opam-admin:
cd $(OPAM_ACG_REPO_DIR) && opam admin make
package-copying: tar
opam lint opam-package/opam
cp -rT opam-package $(OPAM_TESTING_DIR)/acgtk/acgtk.$(VERSION_BASENAME)
cp -rT opam-package $(OPAM_GIT_REPO_DIR)/acgtk/acgtk.$(VERSION_BASENAME)
cp -rT opam-package $(OPAM_ACG_REPO_DIR)/packages/acgtk/acgtk.$(VERSION_BASENAME)
opam-meta: package-copying opam-admin sync
package-copying: acgtk.url
mkdir -p $(OPAM_TESTING_DIR)/acgtk/acgtk.$(VERSION_BASENAME) && cp $< $(OPAM_TESTING_DIR)/acgtk/acgtk.$(VERSION_BASENAME)/opam
mkdir -p $(OPAM_GIT_REPO_DIR)/acgtk/acgtk.$(VERSION_BASENAME) && cp $< $(OPAM_GIT_REPO_DIR)/acgtk/acgtk.$(VERSION_BASENAME)/opam
mkdir -p $(OPAM_ACG_REPO_DIR)/packages/acgtk/acgtk.$(VERSION_BASENAME) && cp $< $(OPAM_ACG_REPO_DIR)/packages/acgtk/acgtk.$(VERSION_BASENAME)/opam
opam:opam-package/url www version package-copying opam-admin sync
opam: version acgtk.url www package-copying opam-admin sync
opam-package/opam
\ No newline at end of file
opam-version: "2.0"
maintainer: "sylvain.pogodalla@inria.fr"
build: [
["dune" "subst"] {pinned}
# remove the -p to also build the local libraries: conflict with the
# fact that some libraries are also part of the acgtkLib package
# ["dune" "build" "-p" name "-j" jobs]
["dune" "build" "-j" jobs]
]
install: ["dune" "install"]
depends: [
"ocaml" { >= "4.03.0"}
"dune" {build}
"menhir"
"ANSITerminal"
"fmt"
"logs"
"mtime"
"cairo2"
"yojson"
"easy-format"
"ocf"
]
dev-repo: "git+https://gitlab.inria.fr/ACG/dev/ACGtk.git"
homepage: "http://acg.inria.fr/"
license: "CeCILL"
authors: ["Sylvain Pogodalla"]
bug-reports: "sylvain.pogodalla@inria.fr"
synopsis: "Abstract Categorial Grammar development toolkit"
description: "This toolkit provides a compiler and an interpreter for Abstract Categorial Grammars (ACGs). Grammars can be compiled and then used by the interpreter to parse (if the grammar is at most second-order) or to generate terms. See http://acg.loria.fr for more details and bibliographic references."
Abstract Categorial Grammar development toolkit
This toolkit provides a compiler and an interpreter for Abstract Categorial Grammars (ACGs). Grammars can be compiled and then used by the interpreter to parse (if the grammar is at most second-order) or to generate terms. See http://acg.loria.fr for more details and bibliographic references.
opam-version: "2.0"
maintainer: "sylvain.pogodalla@inria.fr"
build: [
["dune" "subst"] {pinned}
# remove the -p to also build the local libraries: conflict with the
# fact that some libraries are also part of the acgtkLib package
# ["dune" "build" "-p" name "-j" jobs]
["dune" "build" "-j" jobs]
]
install: ["dune" "install"]
depends: [
"ocaml" {version >= "4.03.0"}
"dune" {build}
"menhir"
"ANSITerminal"
"fmt"
"logs"
"mtime"
"cairo2"
"yojson"
"easy-format"
"ocf"
]
dev-repo: "git+https://gitlab.inria.fr/ACG/dev/ACGtk.git"
homepage: "http://acg.inria.fr/"
license: "CeCILL"
authors: ["Sylvain Pogodalla"]
bug-reports: "sylvain.pogodalla@inria.fr"
archive: "http://acg.loria.fr/software/acg-1.5.0-20181018.tar.gz"
checksum: "846ce34835d46a2a7bf1c3e0918de204"
This diff is collapsed.
......@@ -75,109 +75,69 @@
%%
main:
| dec=sig_or_lex+ EOI { fun ?(overwrite=false) e -> List.fold_left (fun acc d -> d ~overwrite acc) e dec
}
main:
| dec=sig_or_lex+ EOI { fun ?(overwrite=false) e -> List.fold_left (fun acc d -> d ~overwrite acc) e dec
}
sig_or_lex:
| s=signature { fun ~overwrite e -> s ~overwrite e }
| l=lexicon { fun ~overwrite e -> l ~overwrite e }
signature :
| SIG_OPEN id=IDENT EQUAL entries = end_of_dec (sig_entry)
{
fun ~overwrite e ->
let s,loc = id in
if is_signature s e then
raise (Error.(Error (Env_error (Duplicated_signature s,loc))))
else
let new_sig =
List.fold_left
(fun acc entry -> entry acc e)
(Environment.Signature1.empty id)
entries in
Environment.(insert ~overwrite (Signature new_sig) ~to_be_dumped:true e)
}
(*
signature_end_of_dec :
| entry = sig_entry SEMICOLON? END_OF_DEC
{
[entry]
}
| entry = sig_entry SEMICOLON entries = signature_end_of_dec
{ entry :: entries }
*)
(*
| SIG_OPEN id=IDENT EQUAL entries=separated_list(SEMICOLON,sig_entry) END_OF_DEC
{
fun e ->
let s,loc = id in
if is_signature s e then
raise (Error.(Error (Env_error (Duplicated_signature s,loc))))
else
let new_sig =
List.fold_left
(fun acc entry -> entry acc e)
(Environment.Signature1.empty id)
entries in
Environment.(insert (Signature new_sig) false e)
}
*)
| s=signature { fun ~overwrite e -> s ~overwrite e }
| l=lexicon { fun ~overwrite e -> l ~overwrite e }
signature :
| SIG_OPEN id=IDENT EQUAL entries = end_of_dec (sig_entry)
{
fun ~overwrite e ->
let s,loc = id in
if is_signature s e then
raise (Error.(Error (Env_error (Duplicated_signature s,loc))))
else
let new_sig =
List.fold_left
(fun acc entry -> entry acc e)
(Environment.Signature1.empty id)
entries in
Environment.(insert ~overwrite (Signature new_sig) ~to_be_dumped:true e)
}
lexicon :
| LEX_OPEN lex=lex_declaration
{fun ~overwrite e -> lex ~overwrite ~non_linear:false e }
| NL_LEX_OPEN lex=lex_declaration
{fun ~overwrite e -> lex ~overwrite ~non_linear:true e }
| LEX_OPEN lex=IDENT EQUAL exp=lexicon_exp {fun ~overwrite e ->
let new_lex = exp (Some lex) e in
Environment.(insert ~overwrite (Lexicon new_lex) ~to_be_dumped:true e)}
| LEX_OPEN lex=lex_declaration
{fun ~overwrite e -> lex ~overwrite ~non_linear:false e }
| NL_LEX_OPEN lex=lex_declaration
{fun ~overwrite e -> lex ~overwrite ~non_linear:true e }
| LEX_OPEN lex=IDENT EQUAL exp=lexicon_exp {fun ~overwrite e ->
let new_lex = exp (Some lex) e in
Environment.(insert ~overwrite (Lexicon new_lex) ~to_be_dumped:true e)}
%inline lex_declaration :
(*| lex=IDENT LPAREN abs=IDENT RPAREN COLON obj=IDENT EQUAL END_OF_DEC
{
fun ~non_linear e ->
let lex_name,lex_loc = lex in
let abs',obj'= get_sig abs e,get_sig obj e in
if is_lexicon lex_name e then
raise (Error.(Error (Env_error (Duplicated_lexicon lex_name,lex_loc))))
else
let lex' = Environment.Lexicon.empty lex ~abs:abs' ~obj:obj' ~non_linear in
Environment.(insert (Lexicon lex') false e)
}
*)
| lex=IDENT LPAREN abs=IDENT RPAREN COLON obj=IDENT EQUAL entries = end_of_dec(lex_entry)
{fun ~overwrite ~non_linear e ->
let lex_name,lex_loc = lex in
let abs',obj'= get_sig abs e,get_sig obj e in
if is_lexicon lex_name e then
raise (Error.(Error (Env_error (Duplicated_lexicon lex_name,lex_loc))))
else
let lex' = List.fold_left
(fun acc entry -> entry acc e)
(Environment.Lexicon.empty lex ~abs:abs' ~obj:obj' ~non_linear)
entries in
let () = Environment.Lexicon.check lex' in
Environment.(insert ~overwrite (Lexicon lex') ~to_be_dumped:true e)
}
end_of_dec(entry_type):
| entry = entry_type SEMICOLON? END_OF_DEC { [entry] }
| entry = entry_type SEMICOLON entries = end_of_dec(entry_type) { entry :: entries }
lexicon_exp0 :
| lex = IDENT { fun _ e -> get_lex lex e }
| LPAREN lex = lexicon_exp RPAREN { lex }
lexicon_exp :
| lex = lexicon_exp0 { lex }
| lex1 = lexicon_exp0 COMPOSE lex2 = lexicon_exp
| lex=IDENT LPAREN abs=IDENT RPAREN COLON obj=IDENT EQUAL entries = end_of_dec(lex_entry)
{fun ~overwrite ~non_linear e ->
let lex_name,lex_loc = lex in
let abs',obj'= get_sig abs e,get_sig obj e in
if is_lexicon lex_name e then
raise (Error.(Error (Env_error (Duplicated_lexicon lex_name,lex_loc))))
else
let lex' = List.fold_left
(fun acc entry -> entry acc e)
(Environment.Lexicon.empty lex ~abs:abs' ~obj:obj' ~non_linear)
entries in
let () = Environment.Lexicon.check lex' in
Environment.(insert ~overwrite (Lexicon lex') ~to_be_dumped:true e)
}
end_of_dec(entry_type):
| entry = entry_type SEMICOLON? END_OF_DEC { [entry] }
| entry = entry_type SEMICOLON entries = end_of_dec(entry_type) { entry :: entries }
lexicon_exp0 :
| lex = IDENT { fun _ e -> get_lex lex e }
| LPAREN lex = lexicon_exp RPAREN { lex }
lexicon_exp :
| lex = lexicon_exp0 { lex }
| lex1 = lexicon_exp0 COMPOSE lex2 = lexicon_exp
{
fun name e ->
let l1,l2 = (lex1 None e),(lex2 None e) in
......@@ -192,4 +152,4 @@ lexicon :
new_name,new_loc in
Environment.Lexicon.compose l1 l2 new_name
}
This diff is collapsed.
(* This file was auto-generated based on "command_parser.messages.new". *)
(* This file was auto-generated based on "command_parser.messages". *)
(* Please note that the function [message] can raise [Not_found]. *)
......
......@@ -17,4 +17,4 @@
(* *)
(**************************************************************************)
let version = "1.5.0-20181016"
let version = "1.5.0-20181019"