作者arjuna (机器泽新一)
站内NTUEE_VAL
标题Re: import的问题
时间Sun May 11 02:14:32 2008
※ 引述《arjuna (机器泽新一)》之铭言:
: ※ 引述《arjuna (机器泽新一)》之铭言:
: : 分头进行
: : 把group //掉就会有output,就先从这边去检查你写的功能是不是正常
: : 时间不多了加油
: import的处理方法我还想到
: 就是去parse那个档案,把parsing tree的root传回main里面一个
: import list,这样有需要资料的话可以去那个paring tree找
http://www.facweb.iitkgp.ernet.in/~niloy/COURSE/Autumn2006/Compiler/main.html
Assignment 1: Assignment on Thompson's Construction
- understand the working of #include, #define, #ifdef, #ifndef and
commenting in C preprocessor.
Write a mini pre-processor for a C-language. The preprocessor should
do the following:
- inclusion of header files
-- Implement #include preprocessor directive. The content of the
argument file should be copied to the output file.
- textual replacement
-- Implement #define preprocessor (macro) directive that is replace
the macro calls inside the program with the macro contents.
Parametrized and recursive #define need not be considered.
- conditional inclusion/exclusion
-- Implement #ifdef and #ifndef preprocessor directives. According to
the value copy the #ifdef ot #ifndef part to the output file
- stripping out the comments.
-- Implement both single line (//) and multiple line comments
(/* */)stripping.
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.216.80.156