摘要 |
This invention relates to parsing program statements. A parser in accordance with this invention dynamically associates an object with a token in a program stateme nt and executes the object when the token is being processed. The objects collectively embody the grammar of the domain for the program statement. Particularly, an aspect of the invention is a computer readable medium containing computer executable instructions for parsing program statements which when executed by a processor, cause the processor to instantiate a root object having a list of all permissible initial tokens for a program statement and, where an initial token in the program statement is represente d in the list, instantiate a subsequent object having a list of all permissible subsequent tokens which may follow the initial token.
|