Commit c5a04a37 authored by POTTIER Francois's avatar POTTIER Francois

TODO.

parent 758c76be
......@@ -100,21 +100,6 @@
obtenir un item spécial S' -> S # qui va poser problème.
Exposer l'état initial avec un type différent lr1initial?
* gros BUG à corriger: il ne faut pas exiger le prochain token
AVANT une réduction par défaut. Il faut suivre ocamlyacc et
bison. Réfléchir... et corriger les deux back-ends. Attention
toutefois, c'est un changement incompatible. Option de ligne
de commande?
(voir aussi messages de Tiphaine Turpin à partir du 30/08/2011)
Idée de F. Bour: on pourrait annoter une production %default
pour indiquer qu'elle doit toujours être réduite par défaut.
Il faut aussi revisiter la notion de conflit end-of-stream.
- si réduction par défaut, alors pas de conflit possible!
- si conflit, alors pourquoi on le résoud en éliminant la
réduction sur #? on pourrait faire aussi le choix opposé,
à savoir éliminer toutes les autres actions. Que fait
ocamlyacc?
* autoriser %token FOO [@unused]
équivalent à --unused-token FOO sur la ligne de commande.
Add an analogous mechanism for nonterminals that are known
......
......@@ -2,6 +2,31 @@ This file contains a series of ideas and remarks that could be in
the TODO list -- except I do not intend to do anything about them,
for now.
* Incompatibility with ocamlyacc/yacc/bison: these tools guarantee
to perform a default reduction without looking ahead at the next
token, whereas Menhir does not.
(See messages by Tiphaine Turpin from 30/08/2011 on.)
- Changing this behavior would involve changing both back-ends.
- Changing this behavior could break existing Menhir parsers.
(Make it a command line option.)
- This affects only people who are doing lexical feedback.
- Suggestion by Frédéric Bour: allow annotating a production with %default
to indicate that it should always be a default reduction. (Not sure why
this helps, though.)
- Think about end-of-stream conflicts, too.
If there is a default reduction, there is no end-of-stream conflict.
(Do we report one at the moment?)
If there is a conflict, why do we arbitrarily solve it in favor of
looking ahead (eliminating the reduction on #)? What does ocamlyacc do?
* Idea following our work with Jacques-Henri: allow asserting that the
distinction between certain tokens (say, {A, B, C}) cannot influence
which action is chosen. Or (maybe) asserting that no reduction can take
place when the lookahead symbol is one of {A, B, C}. The goal is to ensure
that a lexer hack is robust, i.e., even if the lexer cannot reliably
distinguish between A, B, C, this cannot cause the parser to become
misguided.
* Incompatibility with ocamlyacc: Menhir discards the lookahead token when
entering error mode, whereas ocamlyacc doesn't. (Reported by Frédéric Bour.)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment