Showing
7 changed files
with
34 additions
and
13 deletions
... | @@ -11,7 +11,7 @@ class Nonce (object) : | ... | @@ -11,7 +11,7 @@ class Nonce (object) : |
11 | def __str__ (self) : | 11 | def __str__ (self) : |
12 | return self.__repr__() | 12 | return self.__repr__() |
13 | def __repr__ (self) : | 13 | def __repr__ (self) : |
14 | - return "Nonce(%x)" % self._agent | 14 | + return "Nonce(%s)" % self._agent |
15 | 15 | ||
16 | def _cross (sets) : | 16 | def _cross (sets) : |
17 | if len(sets) == 0 : | 17 | if len(sets) == 0 : | ... | ... |
... | @@ -17,7 +17,11 @@ def doc_files() : | ... | @@ -17,7 +17,11 @@ def doc_files() : |
17 | 17 | ||
18 | if __name__ == "__main__" : | 18 | if __name__ == "__main__" : |
19 | print("Compiling Emacs files...") | 19 | print("Compiling Emacs files...") |
20 | - os.system("emacs -batch -f batch-byte-compile utils/abcd-mode.el") | 20 | + if os.system("emacs -batch -f batch-byte-compile utils/abcd-mode.el") : |
21 | + emacs = [("share/emacs/site-lisp", ["utils/abcd-mode.el", | ||
22 | + "utils/abcd-mode.elc"])] | ||
23 | + else : | ||
24 | + emacs = [("share/emacs/site-lisp", ["utils/abcd-mode.el"])] | ||
21 | # | 25 | # |
22 | setup(name="SNAKES", | 26 | setup(name="SNAKES", |
23 | version=open("VERSION").read().strip(), | 27 | version=open("VERSION").read().strip(), |
... | @@ -47,7 +51,5 @@ if __name__ == "__main__" : | ... | @@ -47,7 +51,5 @@ if __name__ == "__main__" : |
47 | "snakes.utils.abcd", | 51 | "snakes.utils.abcd", |
48 | "snakes.utils.ctlstar", | 52 | "snakes.utils.ctlstar", |
49 | ], | 53 | ], |
50 | - data_files=(doc_files() | 54 | + data_files=doc_files() + emacs, |
51 | - + [("share/emacs/site-lisp", ["utils/abcd-mode.el", | ||
52 | - "utils/abcd-mode.elc"])]), | ||
53 | ) | 55 | ) | ... | ... |
... | @@ -19,7 +19,7 @@ | ... | @@ -19,7 +19,7 @@ |
19 | @contact: franck.pommereau@ibisc.univ-evry.fr | 19 | @contact: franck.pommereau@ibisc.univ-evry.fr |
20 | """ | 20 | """ |
21 | 21 | ||
22 | -version = "0.9.16" | 22 | +version = "0.9.17" |
23 | defaultencoding = "utf-8" | 23 | defaultencoding = "utf-8" |
24 | 24 | ||
25 | """## Module `snakes` | 25 | """## Module `snakes` | ... | ... |
1 | -""" | 1 | +"""This package features the ABCD compiler, this is mainly a |
2 | -@todo: revise (actually make) documentation | 2 | +command-line tool but it can be called also from Python. The API is |
3 | +very simple and mimics the command line interface | ||
4 | + | ||
5 | +### Function `snakes.utils.abcd.main.main` ### | ||
6 | + | ||
7 | + :::python | ||
8 | + def main (args=sys.argv[1:], src=None) : ... | ||
9 | + | ||
10 | +Entry point of the compiler | ||
11 | + | ||
12 | +##### Call API ##### | ||
13 | + | ||
14 | + * `list args`: | ||
15 | + * `str src`: | ||
16 | + * `return PetriNet`: | ||
17 | + | ||
18 | +##### Exceptions ##### | ||
19 | + | ||
20 | + * `DeclarationError`: when | ||
21 | + * `CompilationError`: when | ||
22 | + | ||
3 | """ | 23 | """ |
4 | 24 | ||
25 | +# apidoc stop | ||
5 | from snakes import SnakesError | 26 | from snakes import SnakesError |
6 | 27 | ||
7 | class CompilationError (SnakesError) : | 28 | class CompilationError (SnakesError) : | ... | ... |
-
Please register or login to post a comment