Hi,
Le 12/11/2010 18:38, Etienne M. Gagnon a écrit :
Here are two alternatives:
// a keyword is the identifier on a line
keyword = identifier Lookback (Start | eol) blank*;
This syntax seems quite natural to me and is what I expect when thinking
of lookback:
I am now reading identifier and I read the Lookback part in the past.
OR
keyword = Back (Start | eol) blank* Then identifier;
This one is more verbose and gives me the impression of the following
semantics:
I am now trying to match `(Start | eol) blank*' and if it matches, then
I can try to match identifier.
I don't know what is your exact semantics for lookback but I would
intuitively say that the first possibility as I understood it is closer
to what is meant...
So I would say the first one for me.
Lucas
Which one do you prefer (and why)?
Etienne
--
Etienne M. Gagnon, Ph.D.
SableCC:http://sablecc.org
_______________________________________________
SableCC-Discussion mailing list
[email protected]
http://lists.sablecc.org/listinfo/sablecc-discussion
_______________________________________________
SableCC-Discussion mailing list
[email protected]
http://lists.sablecc.org/listinfo/sablecc-discussion