TODO 8.62 KB
Newer Older
POTTIER Francois's avatar
POTTIER Francois committed
1
* Document the recent additions (CHANGES + doc).
POTTIER Francois's avatar
POTTIER Francois committed
2
  - slightly nicer syntax error messages
POTTIER Francois's avatar
POTTIER Francois committed
3 4 5 6 7 8 9
  - attributes in .mly files
    rationale / purpose
    syntax of attributes
    placement of attributes
    attributes are incompatible with %inline
    how attributes are propagated during expansion of parameterized definitions
    how %attribute is desugared
POTTIER Francois's avatar
POTTIER Francois committed
10
  - ability to split a %public symbol, even within a single unit
11
  - --cmly command line flag
POTTIER Francois's avatar
POTTIER Francois committed
12
  - menhirSdk; document the .cmly API...?
13
  - demo of menhirSdk: generate-printers
POTTIER Francois's avatar
POTTIER Francois committed
14
  - menhirLib: new functions
POTTIER Francois's avatar
POTTIER Francois committed
15
      loop_handle_undo, shifts, acceptable
POTTIER Francois's avatar
POTTIER Francois committed
16
      find_default_reduction
POTTIER Francois's avatar
POTTIER Francois committed
17
      pop, top, equal, pop_many, get
POTTIER Francois's avatar
POTTIER Francois committed
18 19 20
      force_reduction
      input_needed
      feed (inspection API)
21
      production numbers (production_index, find_production)
POTTIER Francois's avatar
POTTIER Francois committed
22
      current_state_number
POTTIER Francois's avatar
POTTIER Francois committed
23
    menhirLib: possibly incompatible change of type 'a env
POTTIER Francois's avatar
POTTIER Francois committed
24 25 26
    MenhirLib.Printers: incompatible type change of print_stack
    deprecated streams, [stack], MenhirLib.General.
    MenhirLib.ErrorReports: new module
POTTIER Francois's avatar
POTTIER Francois committed
27
  - Change of LICENSE. Clarify the status of test/.
POTTIER Francois's avatar
POTTIER Francois committed
28
  - Send CompCert pull request.
POTTIER Francois's avatar
POTTIER Francois committed
29

POTTIER Francois's avatar
POTTIER Francois committed
30 31 32 33 34 35 36
* The table back-end should not use Invariant.prodstack,
  and should produce code for all semantic actions, regardless
  of whether they are ever reduced.

* The table back-end should not use Invariant at all?
  And we should be able to save time by not running Invariant.

POTTIER Francois's avatar
POTTIER Francois committed
37
* Move more of ErrorReports from CompCert to MenhirLib.
POTTIER Francois's avatar
POTTIER Francois committed
38
  In [show], might want to apply [shorten] to the output of [f].
POTTIER Francois's avatar
POTTIER Francois committed
39

POTTIER Francois's avatar
POTTIER Francois committed
40 41 42 43
* Implementing may_reduce by looping over the action table may be too
  conservative? There may be situations where there is no reduce action
  in the table (because they were killed off by conflict resolution) yet
  this state is still capable of reducing this production.
POTTIER Francois's avatar
POTTIER Francois committed
44 45

* clean up this TODO file! and use gitlab issues for known bugs.
POTTIER Francois's avatar
POTTIER Francois committed
46 47

* Use Markdown format for CHANGES, etc.
POTTIER Francois's avatar
POTTIER Francois committed
48

POTTIER Francois's avatar
POTTIER Francois committed
49 50
* Contribute ocamlbuild rules for dealing with .messages files.

POTTIER Francois's avatar
POTTIER Francois committed
51 52 53 54
* see if --only-preprocess-for-ocamlyacc could be implemented.
  Re-introduce $1 keywords.
  Define $startpos, etc.

POTTIER Francois's avatar
POTTIER Francois committed
55 56 57 58 59
* The documentation says not to use _i,
  but --only-preprocess produces it.
  Should we avoid producing it?
  Should we check that it is not used?

POTTIER Francois's avatar
POTTIER Francois committed
60
* Possible extensions to the inspection API:
POTTIER Francois's avatar
POTTIER Francois committed
61
  - offer a way of mapping an initial state (number) back to its nonterminal symbol
POTTIER Francois's avatar
POTTIER Francois committed
62 63 64 65 66
  - expose the number of states (useful for memoisation).
  - expose the number of productions.
  - expose an isomorphism between token and xtoken = exists 'a. ('a terminal * 'a)
      T.token2terminal, T.token2value offer one direction
      the other direction would have to be generated
POTTIER Francois's avatar
POTTIER Francois committed
67

POTTIER Francois's avatar
POTTIER Francois committed
68 69 70 71 72 73 74
* BUG: the warning "this production is never reduced" is sound but incomplete.
  See never_reduced.mly:
  a: b B | B {}
  b:         {}
  where we get a warning that "b -> " is never reduced, but actually (as a
  result) "a -> b B" is never reduced either. Reword the current warning?
  Document the problem? Develop a new warning based on LRijkstra?
POTTIER Francois's avatar
POTTIER Francois committed
75 76
  By the same token, some states could be unreachable, without us knowing.
  What should we do about it?
POTTIER Francois's avatar
POTTIER Francois committed
77 78
  Note that the incremental API may allow reaching some states that LRijkstra
  would declare unreachable -- so, be careful.
POTTIER Francois's avatar
POTTIER Francois committed
79

POTTIER Francois's avatar
POTTIER Francois committed
80 81 82
* standard library: define "%public %inline epsilon: {}", which allows using
  "epsilon" as a marker for an empty right-hand side.

POTTIER Francois's avatar
POTTIER Francois committed
83 84 85
* explain how to simulate inherited attributes in the manual
  (cf. post by David Chemouil on mailing list)

86 87 88
* Look for "artificial dependency" and remove them.
  Make sure every module is explicitly called.

89 90 91 92
* A %type declaration with parameters is not properly checked;
  it could be useless or even ill-typed.
  Same for %on_error_reduce.

POTTIER Francois's avatar
POTTIER Francois committed
93 94 95 96 97
* If the right-hand side of a production provably generates the empty
  language, remove this production. (Must remove it explicitly, otherwise
  we lose the property that errors are detected as early as possible.
  Also, this avoids triggering the detection of epsilon-cycles, which
  assumes that all symbols are inhabited.)
POTTIER Francois's avatar
POTTIER Francois committed
98 99
  Currently we warn about nonterminals that generate the empty language.
  Maybe we need a %void annotation when this is intended?
POTTIER Francois's avatar
POTTIER Francois committed
100 101 102 103
  Document this trick: the empty language can be defined by "void: void"
  and can be used as an actual parameter in parameterized definitions.
  This allows making extensible definitions and instantiating them with
  "no extension".
POTTIER Francois's avatar
POTTIER Francois committed
104

105 106 107
* --compile-errors could warn about messages wider than 80 columns
                   could also warn statically about out-of-range $i?

POTTIER Francois's avatar
POTTIER Francois committed
108 109
* Dans les avantages de Menhir versus ocamlyacc (dans la doc et
  sur la page Web), ajouter le back-end Coq, l'API incrémentale
POTTIER Francois's avatar
POTTIER Francois committed
110 111
  et l'API d'inspection, les règles anonymes, la gestion fine des
  erreurs de syntaxe...
POTTIER Francois's avatar
POTTIER Francois committed
112

113
* Pénible que l'API d'inspection ne donne pas accès
114 115
  à l'état courant lorsque la pile est vide (état initial donc).
  Pourrait-on exposer cet état? Polymorphe? incoming_symbol
POTTIER Francois's avatar
POTTIER Francois committed
116
  devrait alors produire une option. Et le cas Nil du type
117
  stream devrait contenir l'état initial...
POTTIER Francois's avatar
POTTIER Francois committed
118
  attention, car si on lui applique la fonction items, on va
119 120
  obtenir un item spécial S' -> S # qui va poser problème.
  Exposer l'état initial avec un type différent lr1initial?
POTTIER Francois's avatar
POTTIER Francois committed
121 122
  Ou alors, exposer juste le symbole de départ correspondant?
  Mais comment le retrouver?
POTTIER Francois's avatar
POTTIER Francois committed
123

POTTIER Francois's avatar
POTTIER Francois committed
124
* autoriser %token FOO [@unused]
125
  équivalent à --unused-token FOO sur la ligne de commande.
POTTIER Francois's avatar
POTTIER Francois committed
126 127
  Add an analogous mechanism for nonterminals that are known
  to be unreachable.
POTTIER Francois's avatar
POTTIER Francois committed
128

129
* Produce well-chosen (predictable) names for anonymous rules?
POTTIER Francois's avatar
POTTIER Francois committed
130

131 132
* In the standard library, possibly rename "anonymous" and "embedded" and
  document them. The non-inline version allows embedding an action in the
133
  middle of a rule.
134

POTTIER Francois's avatar
POTTIER Francois committed
135 136
* Add left-recursive lists to the standard library.

POTTIER Francois's avatar
POTTIER Francois committed
137
* Define [print_checkpoint].
138
  Define a printer that shows the states in the stack.
POTTIER Francois's avatar
POTTIER Francois committed
139

POTTIER Francois's avatar
POTTIER Francois committed
140 141 142
* Documenter la différence de philosophie avec Denny & Malloy à propos
  des conflits (cf. email à Laurence Tratt).

POTTIER Francois's avatar
POTTIER Francois committed
143 144 145
* bundle the Coq library with menhir, and add demos/calc-coq
  to show how it is used

146
* BUG: la directive $type<...> nt donne lieu à un message d'erreur bizarre
147 148
  si le non-terminal nt n'existe pas. (Jacques-Henri.)

149 150 151
* On pourrait rendre moins restrictif le critère qui garantit la terminaison
  de l'expansion des non-terminaux paramétrés. Il suffirait de vérifier que
  les paramètres effectifs sont toujours des atomes (symboles terminaux ou
152 153
  non-terminaux), non? (Jacques-Henri.)

154
* Reconnaître les directives # n "foo" dans le fichier .mly et en tenir
POTTIER Francois's avatar
POTTIER Francois committed
155 156
  compte dans les locations.

157 158 159 160 161
* BUG: message de Valentin Gatien-Baron du 09/01/2010: le bug de --explain
  est-il bien le bug connu? peut-on le corriger? ne suffirait-il pas de
  passer sous silence les conflits qui ont lieu dans une partie inaccessible
  de l'automate?

162 163 164
* Implémenter un test de détection de boucles. Si la grammaire contient une
  boucle, elle est infiniment ambiguë. Pour le test, calculer tous les
  nullables, ajouter une production unité A -> B dès qu'il existe une
165
  production A -> alpha B beta avec alpha et beta nullables, et regarder
166
  ensuite s'il existe un cycle de productions unité.
167

POTTIER Francois's avatar
POTTIER Francois committed
168
* Permettre une trace avec autre chose que fprintf stderr. Cela permettrait
169 170 171
  au programmeur (par exemple) de décider à runtime s'il veut afficher ou
  non la trace. (En mode --trace.) Et si possible, donner accès depuis
  l'extérieur à la fonction print_token qui est engendrée.
172

173
* (petit) BUG: --follow-construction n'affiche pas le contenu des états
174 175 176 177
  initiaux (r0)

* que fait/que doit faire la combinaison --tokens-only --depend?

178
* Préserver dirname/ dans les directives #line émises.
179

180 181
* BUG: Boris (1.- bouclage parser sur une entrée erronée 2.- une lecture
  trop loin dans le stream, également liée à error).
182

183 184
* éviter "Warning: 22 conflicts ..." car emacs prend "Warning" pour un
  nom de fichier; d'après Damien, il devrait suffire que la phrase après
185 186
  les deux points ne commence pas par un nombre.

187 188
* si une variable est inutilisée dans une action sémantique, le
  warning est affiché dans le code produit.
189 190 191

* BUG: solving a shift/reduce conflict in favor of reduction can
  cut a path that was required in order to explain another conflict.
POTTIER Francois's avatar
POTTIER Francois committed
192
  (see e.g. belloeil.mly) (et le reduced_parser.mly d'Adrien Guatto)
POTTIER Francois's avatar
POTTIER Francois committed
193
  (also check the parser.mly sent by Andrej Bauer on 2016/01/21)
POTTIER Francois's avatar
POTTIER Francois committed
194
  Or just give up on explaining the conflict in this case.
195 196 197
  Take priorities into account *during* the construction of the
  automaton? Is it feasible? Compatible with Pager?

198 199
* BUG: cutdown.mly

200 201 202 203
* le fichier .conflicts devrait etre supprime par --explain s'il
  n'y a aucun conflit

* dans le dump de l'automate, rajouter les transitions qui ont
POTTIER Francois's avatar
POTTIER Francois committed
204
  ete supprimees par resolution de conflits. Afficher aussi les
205
  réductions par défaut?