Default actions are useful because they save a lot of space in parsing tables, at the cost of missing expected tokens in the error messages...
printed by the command 'fcheck'. This is the relevant BNF rule for the example given at the end of this message:
So far, my approach has been that improved diagnostics shouldn't slow
down the processing of correct programs. Is it worthwhile to improve diagnostics by disabling default actions in a LALR parser?
This is mainly a parsing question but it's also Fortran related as well.
When I make syntax checking with the command 'fcheck' in the code below,
the error message doesn't contain a '(' in the expected tokens. This
happens due to default actions, although the parser is basically LALR. A
pure LALR parser wouldn't make reductions without examine the lookahead.
This is an interesting case. Since the ( isn't required, it isn't so obvious that the message should mention it.
Seems to me that the question is more user experience, and less
|Location:||Huddersfield, West Yorkshire, UK|
|Nodes:||16 (0 / 16)|