Talk:One-pass compiler

From Wikipedia, the free encyclopedia

[edit] Really Not One Pass

I'll note that there really is no such true thing as a one pass or single pass compiler, because the text that is passed by is stored eventually in buffers to analyze again (tokens etc.) and the whole idea of a true one pass compiler is almost a lie, by what people consider one pass compilers today. There are definitely less passes possible with compilers, but it's all just text being thrown around into buffers... and the buffers are passed over individually after the a major consumption is done - and all these little sub passes within the buffers mean we are going over the same data more than once. During the major consumption of the source file, there are little sub passes on temporary buffers of text that are munged around while passing over - and copying part of the source file into a little buffer and going over this buffer is technically destroying the notion of "single pass". Especially if lots of little buffers are checked, it adds up to a total of more than one pass. I may be retentive for noting this, but using Visual thinking I have never once seen a parser in my mind as a true "single pass" or "one pass parser".

I think the terminology in computer science could be improved to identify parsers which go over the data much less than other parsers - but calling it "single pass" or "one pass" is very misleading, especially to those who don't actually know a lot about parsing and are prone to believe this fraud ;-) Some parsers definitely go over the data in several major consumptions over and over again, but there really isn't a true one pass parser other than an UpperCase or LowerCase function. LFiveZeroFive (talk) 15:17, 8 April 2008 (UTC)

"True" "one pass" might be only regular expression (if you forget that "looking back" is done by traversing states - very abstract or by looking at state variable;). Expression with braces needs memory (due to precedence) and thus looks back on what it has previously read ;) I agree with "One pass" being very misleading. "One/single representation" migh be better, even though ... or "One abstract syntax three is enough" :) ca1 (talk) 09:03, 13 May 2008 (UTC)