Re: [Boost-docs] The beauty of LATEX

Subject: Re: [Boost-docs] The beauty of LATEX
From: Joel de Guzman (joel_at_[hidden])
Date: 2011-10-30 10:50:19


On 10/30/2011 1:30 PM, Dave Abrahams wrote:
>
>>> Why? I don't have an opinion, but your assertion lacks any
>>> supporting rationale.
>>
>> I think I've had enough supporting rationale from my previous
>> posts and also from the comments that you've snipped.
>
> Don't take it personally, man. I just didn't get it.

:-) No, I'm not (taking it personally).

>> Anyway:
>>
>> One word: modularity. I want to avoid a monolithic blob of code. I
>> also do not want to pollute the IR language with stuff like quirky
>> wiki syntax. The IR language should be 100% regular and free of
>> wiki-isms and all other similar stuff.
>
> Sure... maybe I don't know what you mean by "IR language." I normally
> think of IR as a kind of data structure.

LLVM code representation, for example, has three different forms: an
in-memory compiler IR, an on-disk bitcode representation, and a
human readable assembly language representation. They are all
one and the same.

In this case, the template language is the human readable
representation of the IR. It just so happens that it is itself
a programming language that can be used to transform itself
as well as generate output.

> If all you're saying is that
> you want to parse wiki-isms before generating any IR, I'm 100% with you.
> That doesn't sound quite like what I think of as a "preprocessor." A
> C++ front-end parses function declarations before generating any IR,
> too, and there's no remnant of C++ syntax (like curly braces) in any
> sensible IR. But none of that happens in the preprocessor.

Ok.

>> What is not clear? I don't see why you can't have multiple
>> text-to-text preprocessors in a system. Do you want me to
>> just call these processors?
>
> I want to not be confused about what you might mean by emphasizing
> "pre," that's all. I guess you say "pre-processor" because the C++
> preprocessor also does a text-to-text transformation... but that again
> leaves me wondering why it's important to be doing a text-to-text
> transformation here... not that I have anything against text, mind you
> :-)

Perhaps it's not that important. I guess I was just emphasizing
that the wiki processor (there, no "pre" :-) need not have access
to the full DOM/AST/IR-tree to do its job. It's important to
emphasize that because there is no tree at that point early
in the processing stage. And, when we reach the step where we
have a full tree, all wiki-isms should have been removed.

>> Sure, but it's just terminology. In my perspective, anything that
>> comes before the main compiler is a preprocessor.
>
> Which stage is the main compiler in this case?

The template engine.

>> Anyway, if it makes you happy, I can call them lexical
>> processors.
>
> It makes me less confused, so thank you.

Ok, I'll stop calling them preprocessors and start using the
term "lexical processors".

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://boost-spirit.com

This archive was generated by hypermail 2.1.7 : 2017-11-11 08:50:41 UTC