Guest:
Register
|
Login
|
Member List
|
Search
|
Statistics
|
FAQ
Language
----------
Simplifed Chinese
Traditional Chinese
English
CnPack Forum
»
CnPack IDE 专家包(CnWizards)
» 能否实现编译前的预处理?
‹‹ Last Thread
|
Next Thread ››
Poll
Trade
Reward
Activity
Printable Version
|
Email to Friend
|
Subscription
|
Favorites
Subject: 能否实现编译前的预处理?
haitao
新警察
UID 23002
Digest Posts 0
Credits 18
Posts 7
点点分 18
Reading Access 10
Registered 2007-8-14
Status Offline
#1
Post at 2008-2-4 23:05
Profile
|
Blog
|
P.M.
能否实现编译前的预处理?
这样,改进一种语言,就是很简单的事情了:编译器都还是原有现成的,只要定制实现一种预处理,就可以试验自己改进的“新”语言了
宏替换:好像比较土,或者叫代码块自动生成/替换?——编译前,由专家预处理生成一个最终的源代码参加编译
块内变量:过程/函数的var定义离实现代码太远了,虽然提倡小函数,但是有些事情分得太细也不好——第一个目标,实现本行的需求。不过,这个可能不是简单的预处理能完成的,因为需要在begin-end内提取块内变量,重命名再移到过程/函数的var定义位置,有点是编译器的工作了
另外,预处理后的源代码编译报错,比较难以与预处理前的源代码(行号、变量/函数名)关联起来
shenloqi
灌水处处长
UID 34
Digest Posts
1
Credits 287
Posts 179
点点分 287
Reading Access 10
Registered 2003-3-15
Status Offline
#2
Post at 2008-2-15 11:05
Profile
|
P.M.
理论上应该是可以的,DLangExt就是基于这个原理实现的
fdltc
普通灌水员
UID 957
Digest Posts 0
Credits 76
Posts 38
点点分 76
Reading Access 10
Registered 2005-7-21
Status Offline
#3
Post at 2008-3-18 12:38
Profile
|
Blog
|
P.M.
什么叫DlangExt,楼上自己开发的?
Poll
Trade
Reward
Activity
CnPack Forum
CnPack English Forum
> CnWizards IDE Wizards
> CVSTracNT
> Announcements & Others
All times are GMT++8, the time now is 2024-11-23 13:25
Powered by
Discuz!
5.0.0
© 2001-2006
Comsenz Inc.
Processed in 0.008135 second(s), 7 queries , Gzip enabled
TOP
Clear Cookies
-
Contact Us
-
CnPack Website
-
Archiver
-
WAP
Member's CP Home
Edit Profile
Credits Transaction
Public User Groups
Buddy List
Main
Page Views
User Agents
Posts History
Top Forums
Top Threads
Post Ranking
Credit Ranking
Online Time
Team
Moderation Stats