[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with { __ }
Dear friends,
based on Frederic Voisins CASL grammar for yacc, we have built a CASL parser
using ML-yacc. The HOL-CASL system will be soon available also with this
alternative parser.
We have managed to fine-tune the parsers in such a way that they produce
almost the same input-output behaviour. Now the most important open
point is the treatment of braces within identifiers.
At the CoFI meeting in Amsterdam last year we decided to allows braces
within identifiers, also covering {__}. We have verified that this decision
makes sense by an implementing it into our parser.
Now it turns out that it seems to be difficult to implement this using
an LALR(1) parser. Notice that I am talking only of the first pass
of parsing, without any mixfix analysis, using the grammar for TERMs
as described on page C-4 of the summary.
The grammar we are using can be obtained under
http://www.informatik.uni-bremen.de/~cofi/CASL/yacc/CASL.yacc
and a description of the states and conflicts under
http://www.informatik.uni-bremen.de/~cofi/CASL/yacc/CASL.yacc.desc
It still has many conflicts, which do not seem to be relevant in pratice,
except for the problem with {__}.
Can anyone see a LALR(1) solution of this problem?
Greetings,
Till
-----------------------------------------------------------------------------
Till Mossakowski Phone +49-421-218-4683, monday: +49-4252-1859
Dept. of Computer Science Fax +49-421-218-3054
University of Bremen till@informatik.uni-bremen.de
P.O.Box 330440, D-28334 Bremen http://www.informatik.uni-bremen.de/~till
-----------------------------------------------------------------------------