Patent ID: 8161466

Claim:
A method of pre-processing a conditional region, the method comprising: when compiling is requested, analyzing codes included in an arbitrary file, searching a conditional region in a pre-processing region, and designating and storing line information according to a conditional command included in the conditional region; generating a token list by tokenizing the codes and storing the generated token list; sequentially detecting an arbitrary code from the token list for compiling; determining if the detected code is a conditional command; when it is determined that the detected code is a conditional command, identifying line information for the detected code among the stored line information according to a conditional state of a conditional expression accompanying a previous conditional command and a conditional state of a conditional expression accompanying the conditional command, and detecting a next relevant code from the token list for compiling according to the line information; when it is determined that the detected code is not a conditional command, detecting the next relevant code from the token list for compiling in a sequential manner; and repeating the determining, identifying and detecting steps such that the arbitrary file is compiled having only those codes of the conditional region that are to be executed.