Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Talk:Preprocessor

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This article is ratedC-class on Wikipedia'scontent assessment scale.
It is of interest to the followingWikiProjects:
WikiProject iconComputingLow‑importance
WikiProject iconThis article is within the scope ofWikiProject Computing, a collaborative effort to improve the coverage ofcomputers,computing, andinformation technology on Wikipedia. If you would like to participate, please visit the project page, where you can jointhe discussion and see a list of open tasks.ComputingWikipedia:WikiProject ComputingTemplate:WikiProject ComputingComputing
LowThis article has been rated asLow-importance on theproject's importance scale.

Moved web-specific content toweb template

[edit]

The termpreprocessor is customarily associated with compilation of source code.(http://foldoc.org/foldoc.cgi?query=preprocessor&action=Search), (http://www.cs.cf.ac.uk/Dave/C/node14.html).The content related to web application development was moved toweb template toavoid the (potentially misleading) implication that a preprocessor is the same thing as a "web template system" that is used for purposes other than web development. Although thereare similarities, these concepts are sufficiently distinct to warrant separate treatmentin separate articles. Moreover, the similarities go far beyond web application development and thus are more appropriately handled with "See Also" links (e.g., preprocessor similarity to tools like AWK, SED, similarity to Template-based document generation systems, similarity to "mail merge" in word processing software, similarity to perl, similarity to shell-script "Here Documents" ... etc etc).Dreftymac17:04, 9 October 2006 (UTC)[reply]

Final stable resolution: seePreprocessor#General_purpose_preprocessor, and please not delete. -- 17 november 2006.

Discussion

[edit]

"Preprocessors are routinely invoked in the process ofcompilingsource code "

There are only a few languages that include a preprocessor.Derek farn21:46, 9 October 2006 (UTC)[reply]
Agreed, this is consistent with my current understanding. The main goal was to preserve the
semantic correlation between 'compiler' and 'preprocessor' as editorial support for the
opening paragraph, and to reinforce the internal consistency of the article.Dreftymac23:07, 9 October 2006 (UTC)[reply]

"Examples of "general purpose" uses include batch processing ofHTML orPostScript files, and auto-generation of mailing lists and e-mail "

This raises an interesting question about where to draw the line between a preprocessor and a tool. After all, all text processing could be called preprocessing and a preprocessor is a tool.Derek farn21:46, 9 October 2006 (UTC)[reply]
Agreed again, 100%. In fact, the introduction of 'general purpose processing' (originally presented
as 'Preprocessors as template engines') into this article seemed to detract from the conciseness
and internal consistency of the article. Nonetheless, it did not seem appropriate to remove
this concept entirely, as it does seem to have independent relevance in light ofGPP and
M4. These tools seem to have evolved from developers who wanted to do other tasks
that they formerly tried to handle using the C preprocessor, but found it unsatisfactory
which is why they are called 'preprocessors'[citation needed]. The examples given were
gleaned from apparent known uses ofM4.
However, to elaborate much futher on such "general purpose" processing I believe detracts from
the article, and the line should be drawn at leaving your last revision as-is. Any further
discussion of this kind of use should either be supported by authoritative reference, or
presented in a different article that directly relates to the type of processing in question.
Dreftymac23:07, 9 October 2006 (UTC)[reply]
I am always happy to agree that my wording is ok :-). I suspect that others will want to tinker, witness the very long discussion and edits over the issue ofgeneral-purpose_programming_language. Dreftymac, you don't have to break up lines, the layout engine will do it for you.

Paragraph of specialization

[edit]

I'm no expert in Lisp, my paragraph of specialization is not very good. Could anyone improve it ?

I think the problem is that many people use computers arn't computer experts and so wouldn't understand the majority of the jargon on the main article. Also, I'd like to buy a laptop there is no clause stating the different processor speeds and what they are capable of. - The article needs lots of work!

This article is not aboutmicroprocessors, but preprocessors (computer programs). Still, I agree it needs lots of work. It has some rather strange statements about slow and inefficient features of the C preprocessor.Ahy121:10, 17 August 2006 (UTC)[reply]

PHP? I know that the language is run as a sort of "preprocessor" before HTML output, and the name now stands for "PHP: Hypertext Preprocessor", but given the level of programming sophistication it offers, I wouldn't exactly call it a lexical preprocessor. It is a preprocessor of sorts, but it's far more advanced than simple token replacement. (For that matter, so is m4, but that's a bit less clear-cut, I think.)

Also, I've taken the liberty of adding some detail on CPP macros, including their limitations. --Flewellyn05:39, 22 August 2006 (UTC)[reply]

2006-10-10 Purpose and definition of 'preprocessor'

[edit]

Preprocessor implements simplemacro languages. In a preprocessor/compiler pair, likeCPP/C-compiler, themacro language (CPP statements) isembedded on the host language (C code). The use of the preprocessor into this (pair) context isdomain-specific. But if we isolate the "macro language" from this pair, it is not so specific, and it can be used for other purposes:

  • If thehost language is aother programming language, themacro language enable a higher level of abstraction. Example: usingCPP forJavascript preprocessing[1].
  • If thehost language is atext ormarkup text, the macros enable to automatize substitutions and a wide variety of text processing tasks. Example: usingM4(see on-article example) orCPP[2] as atemplate engine, to HTML generation.

Technically, the preprocessorsmacro languages expressalgorithms precisely, and if it can express"all possible algorithms"[3]it can be said "general purpuse".M4 is probably the most well known example of such ageneral purpose preprocessor. TheCPP is sometimes used in a non-C specific role, but not defined asgeneral purpose[4].


--Krauss23:17, 10 October 2006 (UTC)[reply]


The "General purpose preprocessor" is a not usual concept, but need precision (and to be didactic!) into the explain, to use the correct concepts (andavoid misleading interpretations) in other wiki articles, liketemplate engine. It also need authoritative sources (see reference section), to avoid discussion or premature updates.

There are people who claim that their preprocessors have general purpose use. So the name is appropriate.Derek farn14:17, 10 October 2006 (UTC)[reply]

PLEASE NOT CLEAN OR REDUCE the section without justify here.--Krauss 10 October 2006

I see that you have cut and pasted material fromprogramming language. Does a general purpose preprocessor have to beTuring complete? I would hope so, but I think the definition is based on general use, not algorithmic completeness. Others might disagree.Derek farn14:17, 10 October 2006 (UTC)[reply]
Krauss Your statement about "Gen. purpose preprocessor" being unusual concept seems correct. Because of this, it would seem a greater emphasis on this concept might give disproportional weight to something that is only slightly relevant to the main subject of this article. It would also seem that, since we all agree we 'need precision', it is enough to acknowledge the concept exists, identify the product(s) that promote the concept, and let it stop there.
Since *any* software that processes text could be called a "preprocessor,"misleading implications can be avoided by not mixing technical uses of a term with more 'personalized' uses of the term, based on original research. There's a limit to how much didactic correlation between different articles can be done before things start to get confusing and start sounding like someone's individual soapbox.
Nevertheless, the perspectives you bring to these issues is noteworthy and unique, it's just a matter of keeping that uniqueness comprehensible in the context of the existing usage of terms.Dreftymac18:37, 10 October 2006 (UTC)[reply]

References

[edit]
  1. ^Show how to useC-preprocessor on JavaScript files."JavaScript is Not Industrial Strength"by T. Snyder.
  2. ^Show how to useC-preprocessor astemplate engine."Using a C preprocessor as an HTML authoring tool"by J. Korpela, 2000.
  3. ^In mathematical terms, this means the programming language isTuring-complete.MacLennan, Bruce J. (1987).Principles of Programming Languages. OxfordUniversity Press. p. 1.ISBN 0-19-511306-3.{{cite book}}:line feed character in|publisher= at position 7 (help)
  4. ^Proved that theC preprocessor is notTuring-complete, at least not if the template is preprocessed only once."Best abuse of the C preprocessor"by I. Herrmann.

Merging, need review

[edit]

Please seeDirective (programming).

Difference in C preprocessing directives?

[edit]

This article mentions that there are 2 preprocessing directives for C++: #include <...> and #include"...". Is there a difference between the two? If there is, it should be mentioned in the article.--76.234.101.109 (talk)21:52, 19 December 2008 (UTC)[reply]

It's trivia relating to the path in which headers are searched. It should just be removed from the article; it's an implementation detail with no wider consequence.Chris Cunningham (not at work) -talk11:00, 20 December 2008 (UTC)[reply]

About cpp

[edit]

I've removed the overattention given to it(it DOES have its own page and there ARE other preprocessors); in addition, I've taken the liberty of taking the semirabid criticism from the article, instead mentioning that the tasks it's used for are accomplished in other ways in other languages(such as Java's preservation of type information prior to linktime to replace header files and agressive inlining to eliminate macros). The lexical section, which no longer dominates the article, should now read much more neutrally.BioTube (talk)14:33, 15 May 2009 (UTC)[reply]

.i?

[edit]

.i redirects to the preprocessor article. What sort of preprocessing related files does the .i file extension designate? --Abdull (talk)16:05, 10 February 2010 (UTC)[reply]

It appears to be associated with C++ as a preprocessor intermediate file; Microsoft Visual Studio .NET seems to use it as well for the same purpose. (Fromfilext)Lokino (talk)23:40, 2 July 2013 (UTC)[reply]

Removed "rational preprocessing"

[edit]

I removed it because I couldn't find a definition of "rational prerocessing". If this is a thing, please source it when re-inserting.Paradoctor (talk)11:55, 25 July 2017 (UTC)[reply]

2A02:3100:2C9E:9200:B07A:7F01:B32:E062 (talk)23:12, 18 September 2025 (UTC)[reply]

Retrieved from "https://en.wikipedia.org/w/index.php?title=Talk:Preprocessor&oldid=1312155638"
Categories:

[8]ページ先頭

©2009-2026 Movatter.jp