Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src
Module Name: src
Committed By: christos
Date: Mon Nov 23 14:37:08 UTC 1998
Modified Files:
src/usr.bin/xlint/lint1: cgram.y func.c
Log Message:
Unfortunately lint uses c-style comments as directives and these get parsed
at the lexical analysis stage not at the syntax parsing stage. The upshot
is that:
if (expr) {
stmt1;
}
/* LINTED */
stmt2;
stmt2 is the look-ahead token for the parser to choose between and if-then-else
statement as opposed to an if-then statement. Unfortunately the side effect
is that the LINTED directive gets reset before stmt2 gets parsed. We fix this,
by remembering the the linted directive during the if statement parsing and
restoring it at the appropriate time.
Home |
Main Index |
Thread Index |
Old Index