Closed Fourchaux closed 6 years ago
Translation for non-French speakers:
Small question:
In diagrams, instead of the name of a component (i.e.: 'digit'), can we display its original definition (i.e.: '0' ... '9')?
This seems like a good idea. I've not implemented anything like this, though. It would require either some sort of configuration to choose which components to inline or some sort of annotation in the grammar.
I'm working on it right now. I'm probably going to add a --inline rule_name
command line option and check boxes in the demo.
This was a good idea! Inlining some definitions sometimes produces diagrams easier to read. Thanks!
Interactive demo: there is a new section in the "Settings" tab.
Command line: if you want to try it before I publish it to OPAM, you can:
opam pin add General https://github.com/jacquev6/General.git
opam pin add DrawGrammar https://github.com/jacquev6/DrawGrammar.git
Please let me know if you find anything strange.
( NOTE : $ opam install DrawGrammar
is working. )
(With opam v2.0.0~beta3 - OCaml 4.05.0+flambda - Linux x86_64)
opam pin add General : OK
opam pin add DrawGrammar : ERROR. Damn ....
... =-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= [ERROR] The compilation of DrawGrammar failed at "sh -c cd src; ocamlbuild -use-ocamlfind -no-plugin -menhir \"menhir --table\" draw_grammar.native".
=== ERROR while compiling DrawGrammar.0.1.0 ==================================
=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ┌─ The following actions failed │ λ build DrawGrammar 0.1.0 └─ ╶─ No changes have been performed
I've reproduced your issue easily on 4.05.0+flambda. Thanks for the detailed report.
I've temporarily reverted a743751d (in 4df26145). Compiling to .byte
instead of .native
doesn't require .cmx
files. I'll investigate deeper why it works on 4.05.0 and not on 4.05.0+flambda.
You can
opam pin remove DrawGrammar
opam pin add DrawGrammar https://github.com/jacquev6/DrawGrammar.git
Petite question:
dans les diagrammes, au lieu du nom d'un composant (ex: 'digit'), peut-on choisir d'afficher sa définition originale (ex: '0' ... '9') ?