摘要 |
A method for preprocessing a conditional region is provided to efficiently compile the conditional region included in a preprocessing area while a file is compiled, and output an execution result in a short time when the compiled file is executed. A conditional region is searched in a preprocess region by analyzing codes included in a file when compilation is requested, and line information is fixed and stored according to a conditional instruction included in the conditional region. A token list is generated and stored by converting codes into tokens. A predetermined code is sequentially detected from the token list. It is checked whether the searched code is the conditional instruction(505). The line information is searched according to a condition state of a condition sentence accompanied with the previous and current conditional instructions when the searched code is the conditional instruction. The code is detected from the token list according to the line information and a procedure is returned to a search stage. The line information is generated according to a type of a preprocessing instruction and the condition state of the conditional sentence accompanied with the preprocessing instruction.
|