Patent ID: 7197746

Claim:
A method for lexically analyzing an input stream comprising: invoking a multipurpose lexical analyzer, wherein invoking the multipurpose lexical analyzer comprises examining a parameter setting; and returning a subset of a plurality of tokens from the input stream to a calling process by the multipurpose lexical analyzer, wherein returning the subset of the plurality of tokens to the calling process comprises: scanning the input stream to obtain the plurality of tokens using token definitions; for each token of the plurality of tokens: determining whether to ignore the token using the parameter setting; echoing the token to a buffer, if the token is to be ignored; and returning the token to the calling process if the token is not to be ignored; wherein the subset of the plurality of tokens comprises at least one token of the plurality of tokens, wherein at least one action selected from a group consisting of: pre-processing to generate output to a monitor, compiling to generate an application, and printing to generate output to a monitor is performed on the subset of the plurality of tokens.