梦见自己吐血是什么征兆| 防晒衣什么材质最防晒| 右手臂酸痛是什么前兆| deep是什么意思| 孕妇多吃什么食物好| 包皮溃烂是什么原因| ecpm是什么意思| 胃窦在胃的什么位置| 胃糜烂有什么症状| 指甲开裂是什么原因| 排卵期什么症状和反应| 什么是香油| 什么是试管婴儿| 炒牛肉用什么配菜| 男女双修什么意思| 回奶吃什么快最有效的| 接触性皮炎用什么药膏| 十指不沾阳春水什么意思| 男人耳后有痣代表什么| 无极是什么意思| 干是什么意思| speedo是什么牌子| 尿不出尿是什么原因| 孕妇喝可乐对胎儿有什么影响| 鞭挞是什么意思| 清道夫鱼为什么不能吃| 199年属什么生肖| 尿潜血阴性什么意思| ct是什么单位| 子宫肌层回声欠均匀是什么意思| 辣椒炒肉用什么肉| 什么是钾肥| 质地是什么意思| 吸毒什么感觉| 怀孕一个月会有什么反应| 吃什么补精最快| 霉菌性阴道炎是什么症状| 谢娜什么星座| 前列腺有什么症状| 孕妇梦见猫是什么意思| husky是什么牌子| zoom什么意思| 狗狗吐黄水是什么原因| 六一年属什么生肖| 双侧筛窦粘膜增厚是什么意思| bg什么意思| 左下腹是什么部位| 元旦送老师什么礼物| 干什么赚钱| 心电图pr间期缩短是什么意思| 后腰出汗多是什么原因| 司长什么级别| 经常腰疼是什么原因女| 湿气重的人适合吃什么| 小孩爱吃手指头是什么原因| 心率快吃什么药| 瑶五行属性是什么| 阴历三月是什么星座| 下午1点到3点是什么时辰| 胆囊炎不能吃什么食物| 不可漂白是什么意思| 淋巴细胞百分比偏高是什么意思| 哎呀是什么意思| 马可以加什么偏旁| 为什么喝酒后会头疼| 龙的九个儿子都叫什么名字| 糖尿病人晚餐吃什么最好| 白带是什么样子的| 丰都为什么叫鬼城| spi是什么意思| 粉条是什么做的| 烧仙草是什么植物| 广基息肉是什么意思| 3月7日什么星座| 透声差是什么意思| 邋遢是什么意思| 早上喝豆浆有什么好处| 夜咳嗽是什么原因| 卵子排出体外是什么样子| 个性是什么意思| 做肠镜需要准备什么| 氧分压是什么意思| 早孕试纸什么时候测最准确| 腿弯后面疼是什么原因| 舌头边上有锯齿状是什么原因| 什么酒不能喝| 贞操锁是什么| 勾心斗角是什么意思| 食古不化是什么意思| 818是什么星座| 梦到头上长虱子什么意思| 小葱拌豆腐的下一句是什么| 熬夜到什么程度会猝死| 苡是什么意思| 推测是什么意思| 左胸隐隐作痛是什么原因| 牙龈出血是什么病的前兆| 牙齿黄是什么原因| 五七年属什么生肖| 什么是双减| 外阴炎用什么药| 长痘痘去医院挂什么科| 甙是什么意思| 嘴角烂是什么原因| 脚心发热吃什么药| 小姨子是什么关系| 高校自主招生是什么意思| 全身体检挂什么科| 湿气到底是什么| 老年骨质疏松疼痛有什么好疗法| 拉稀吃什么药| 血蛋白低会有什么影响| 乳腺是什么科| 大象灰配什么颜色好看| a和b生的孩子是什么血型| 增生是什么原因造成的| 首善是什么意思| 四肢麻木是什么病| 玻璃水是干什么用的| 脱敏处理是什么意思| 气短挂什么科| hcg是什么意思| 十加一笔是什么字| 八月一日是什么日子| 为什么会莫名其妙的哭| 神采奕奕是什么意思| 芝麻开花节节高是什么意思| 眼睛充血用什么药| 总警司相当于大陆什么官| omo是什么意思| 夏天吃什么菜最好| 红楼梦是一部什么小说| 故宫为什么叫故宫| 尿酸高早餐吃什么| 秃噜皮是什么意思| 衣禄是什么意思| 良辰是什么意思| 体感是什么意思| 梦见大房子是什么预兆| 为什么会心肌梗死| 留守儿童是什么意思| 尿中有泡沫是什么原因| 胃窦充血水肿意味着什么| 石榴花是什么季节开的| 梦到结婚是什么预兆| 带状疱疹有什么症状| 论文检索号是什么| 约会去什么地方比较好| 多吃玉米有什么好处和坏处| 总胆红素偏高吃什么药| 心电监护pr是什么意思| 孕期吃什么| silk什么意思| 残月是什么意思| 经期吃什么补血| 腱鞘炎用什么药能治好| 银色的什么| 为什么会长子宫肌瘤| 大秀是什么意思| 走马观花是什么意思| 子宫出血是什么原因| 夸父为什么要追赶太阳| 蜘蛛痣是什么样的| 扁平疣是什么原因造成的| 盐袋子热敷有什么好处| 猪肝色是什么颜色| 恐惧症吃什么药最好| 四大皆空是什么意思| 自古红颜多薄命是什么意思| 夏天吃羊肉有什么好处| 好麻吉是什么意思| 男人为什么喜欢吸奶| 为什么养鱼双数是大忌| 什么原因导致长水痘| 扁桃体发炎喉咙痛吃什么药| 收缩压和舒张压是什么意思| 辛字五行属什么| 虎属什么五行| 三十周年结婚是什么婚| 梦到别人怀孕是什么意思| 野字五行属什么| 洁癖什么意思| 神经病和精神病有什么区别| 凤毛麟角是什么生肖| 什么叫磨玻璃结节| 用什么香皂洗脸可以祛痘| 痰核流注什么意思| 码农是什么意思| 做是什么感觉| 摘胆对身体有什么影响| 孕酮低跟什么有关系| 画龙点睛是什么生肖| 梦见大蟒蛇是什么征兆| col是什么的缩写| 伸筋草长什么样子| offer是什么| 吃什么药减肥效果好| 79属什么生肖| 喝苹果醋有什么好处| cri是什么意思| 鼻子挤出来的白色东西是什么| 孕妇奶粉什么时候开始喝最好| rsl是什么意思| 肾阴虚吃什么| 睡觉为什么要枕枕头| 减肥去医院挂什么科| 什么叫社保| mz是什么意思| 什么食物黄体酮含量高| 扭伤挂什么科| 犯困是什么原因引起的| 间歇是什么意思| 盛夏是什么意思| 脱相是什么意思| 子宫内膜脱落是什么意思| 白带豆腐渣状用什么药| 轴位是什么意思| 喝什么排湿气| 高什么远什么| 高筋面粉可以做什么| 莱昂纳多为什么叫小李子| 咖啡对心脏有什么影响| 什么叫弱视| 梦见狼狗是什么预兆| 落是什么生肖| 口干舌燥吃什么药| 蕈是什么意思| 雪梨是什么梨| 一起共勉是什么意思| 甲状腺结节有什么症状表现| 喝牛奶放屁多是什么原因| 台湾以前叫什么名字| 类风湿吃什么食物好| 风声鹤唳是什么意思| 唇炎去药店买什么药| 什么叫有气质| 执业药师证有什么用| 碱中毒是什么引起的| 甲状腺结节不能吃什么食物| 26度穿什么衣服合适| 回光返照什么意思| 造影手术是什么意思| 胆气不足吃什么中成药| 窝里横是什么意思| 糖尿病人可以吃什么| 药流用什么药| 喉咙发炎吃什么药好得快| 10月28日是什么日子| 大是大非是什么意思| 婉甸女装属于什么档次| 嗓子有点疼吃什么药| 百年灵手表什么档次| 皮肤变黑是什么原因| 什么属相不能养龙鱼| 逆光是什么意思| 千里马比喻什么样的人| 惴惴不安什么意思| 手发抖是什么病的先兆| tomorrow什么意思| 仙人掌什么时候开花| 芭乐是什么| 干呕是什么病的前兆| 什么猫| 7月28日什么星座| 百度

无人驾驶真能实现无人吗还能带来哪些改变

百度 1927年,准备在英国上市的Selfridge百货公司也非常被美国投资者看好,但无奈于当时英国的法律规定,本国企业不许在海外登记上市。

In computer science, a preprocessor (or precompiler)[1] is a program that processes its input data to produce output that is used as input in another program. The output is said to be a preprocessed form of the input data, which is often used by some subsequent programs like compilers. The amount and kind of processing done depends on the nature of the preprocessor; some preprocessors are only capable of performing relatively simple textual substitutions and macro expansions, while others have the power of full-fledged programming languages.

A common example from computer programming is the processing performed on source code before the next step of compilation. In some computer languages (e.g., C and PL/I) there is a phase of translation known as preprocessing. It can also include macro processing, file inclusion and language extensions.

Lexical preprocessors

edit

Lexical preprocessors are the lowest-level of preprocessors as they only require lexical analysis, that is, they operate on the source text, prior to any parsing, by performing simple substitution of tokenized character sequences for other tokenized character sequences, according to user-defined rules. They typically perform macro substitution, textual inclusion of other files, and conditional compilation or inclusion.

C preprocessor

edit

The most common example of this is the C preprocessor, which takes lines beginning with '#' as directives. The C preprocessor does not expect its input to use the syntax of the C language. Some languages take a different approach and use built-in language features to achieve similar things. For example:

  • Instead of macros, some languages use aggressive inlining and templates.
  • Instead of includes, some languages use compile-time imports that rely on type information in the object code.
  • Some languages use if-then-else and dead code elimination to achieve conditional compilation.

Other lexical preprocessors

edit

Other lexical preprocessors include the general-purpose m4, most commonly used in cross-platform build systems such as autoconf, and GEMA, an open source macro processor which operates on patterns of context.

Syntactic preprocessors

edit

Syntactic preprocessors were introduced with the Lisp family of languages. Their role is to transform syntax trees according to a number of user-defined rules. For some programming languages, the rules are written in the same language as the program (compile-time reflection). This is the case with Lisp and OCaml. Some other languages rely on a fully external language to define the transformations, such as the XSLT preprocessor for XML, or its statically typed counterpart CDuce.

Syntactic preprocessors are typically used to customize the syntax of a language, extend a language by adding new primitives, or embed a domain-specific programming language (DSL) inside a general purpose language.

Customizing syntax

edit

A good example of syntax customization is the existence of two different syntaxes in the Objective Caml programming language.[2] Programs may be written indifferently using the "normal syntax" or the "revised syntax", and may be pretty-printed with either syntax on demand.

Similarly, a number of programs written in OCaml customize the syntax of the language by the addition of new operators.

Extending a language

edit

The best examples of language extension through macros are found in the Lisp family of languages. While the languages, by themselves, are simple dynamically typed functional cores, the standard distributions of Scheme or Common Lisp permit imperative or object-oriented programming, as well as static typing. Almost all of these features are implemented by syntactic preprocessing, although it bears noting that the "macro expansion" phase of compilation is handled by the compiler in Lisp. This can still be considered a form of preprocessing, since it takes place before other phases of compilation.

Specializing a language

edit

One of the unusual features of the Lisp family of languages is the possibility of using macros to create an internal DSL. Typically, in a large Lisp-based project, a module may be written in a variety of such minilanguages, one perhaps using a SQL-based dialect of Lisp, another written in a dialect specialized for GUIs or pretty-printing, etc. Common Lisp's standard library contains an example of this level of syntactic abstraction in the form of the LOOP macro, which implements an Algol-like minilanguage to describe complex iteration, while still enabling the use of standard Lisp operators.

The MetaOCaml preprocessor/language provides similar features for external DSLs. This preprocessor takes the description of the semantics of a language (i.e. an interpreter) and, by combining compile-time interpretation and code generation, turns that definition into a compiler to the OCaml programming language—and from that language, either to bytecode or to native code.

General purpose preprocessor

edit

Most preprocessors are specific to a particular data processing task (e.g., compiling the C language). A preprocessor may be promoted as being general purpose, meaning that it is not aimed at a specific usage or programming language, and is intended to be used for a wide variety of text processing tasks.

M4 is probably the most well known example of such a general purpose preprocessor, although the C preprocessor is sometimes used in a non-C specific role. Examples:

  • using C preprocessor for JavaScript preprocessing.[3][4]
  • using C preprocessor for devicetree processing within the Linux kernel.[5]
  • using M4 (see on-article example) or C preprocessor[6] as a template engine, to HTML generation.
  • imake, a make interface using the C preprocessor, written for the X Window System but now deprecated in favour of automake.
  • grompp, a preprocessor for simulation input files for GROMACS (a fast, free, open-source code for some problems in computational chemistry) which calls the system C preprocessor (or other preprocessor as determined by the simulation input file) to parse the topology, using mostly the #define and #include mechanisms to determine the effective topology at grompp run time.

See also

edit

References

edit
  1. ^ "What is a precompiler?". IBM.
  2. ^ The Revised syntax from The Caml language website
  3. ^ Show how to use C-preprocessor on JavaScript files. "JavaScript is Not Industrial Strength" by T. Snyder.
  4. ^ "The C Preprocessor in Javascript?". espresso-mode.
  5. ^ "Kernel/Git/Stable/Linux.git - Linux kernel stable tree".
  6. ^ Show how to use C-preprocessor as template engine. "Using a C preprocessor as an HTML authoring tool" by J. Korpela, 2000.
edit
吃土豆有什么好处 肛门上长了个肉疙瘩是什么原因 农历11月18日是什么星座 什么情况下必须做胃镜 着凉肚子疼吃什么药
女生问你喜欢她什么怎么回答 偏光镜是什么意思 骨加后念什么 边鱼是什么鱼 为什么会得子宫肌瘤
一个虫一个离念什么 霍金什么病 升白细胞的针剂叫什么 黑松露是什么东西 淋巴结节什么症状
中暑是什么原因 吃什么通便 一孕傻三年是什么意思 大户人家什么意思 舌边有齿痕是什么原因
口腔溃疡喝什么水hcv9jop1ns2r.cn 樱桃红是什么颜色hcv8jop5ns9r.cn 梦见打死黄鼠狼是什么意思hcv8jop1ns0r.cn 懦弱什么意思imcecn.com 农历八月初一是什么星座hcv9jop7ns0r.cn
今晚吃什么hcv9jop1ns7r.cn 吃什么东西会误测怀孕hcv9jop0ns0r.cn 蝉蜕有什么功效520myf.com 宝宝老是摇头是什么原因hcv8jop8ns3r.cn 腿抽筋挂什么科hcv7jop5ns1r.cn
囊肿里面是什么东西hcv9jop3ns3r.cn 为什么崴脚了休息一晚脚更疼xjhesheng.com 肛门瘙痒涂什么药膏dajiketang.com 脚干裂用什么药最好hcv9jop4ns2r.cn 春天有什么hcv9jop6ns5r.cn
1999属什么生肖cl108k.com 翡翠和玉石有什么区别hcv9jop2ns4r.cn 开斋节是什么意思jiuxinfghf.com 笃什么意思hcv9jop6ns4r.cn 嗓子疼不能吃什么hcv8jop5ns3r.cn
百度