From: Stefan S. <se...@sy...> - 2004-09-11 18:05:40
|
Grzegorz Jakacki wrote: >> yes, '-s' is already there. My proposal is to change the semantics such >> that it will behave as it always did when '-p' is specified, and else >> display the ptree after the translation instead of before. > > > Yes, that makes sense to me, pls. go ahead. ... >> I honestly strongly doubt anybody would ever notice, as '-s' seems to >> me to be a debugging / testing / learning tool only. > > >> >> The change I'd like to make is thus trivial and involves only three lines >> of code that are moved down a bit :-) ok, The change is checked in. I'v tried it out and I'm a bit surprized, as I expected to find the translation to modify the ptree in almost all cases, but a little test I ran didn't appear to do anything in the translation, i.e. the resulting ptree was identical to the original one. Why is that ? AFAIK translation includes the second stage of the parsing (i.e. resolving any ambiguities that only exist because to resolve them one needs a symbol lookup table which didn't exist in the first pass), and it also includes anything related to metaprogramming, i.e. metaclass tokens that were part of the original source, and are now expanded. Anyways, that's precisely one of the reasons I want to put this testing stuff in the original code: to be able to study occ systematically on a broad sample of existing input files. Regards, Stefan |