Browse Prior Art Database

Parser-State Based Method for Non-reserved Keyword Resolution Disclosure Number: IPCOM000021494D
Original Publication Date: 2004-Jan-21
Included in the Prior Art Database: 2004-Jan-21

Publishing Venue



Most conventional programming languages define sets of reserved words that cannot be used as identifiers, such as names of variables or other programming language entites. Some languages, such as SQL or ADA for example, introduce a lexical construct named nonreserved keyword. Nonreserved words are also keywords and have special meaning in the syntax where they appear as terminals, but they can also be used as identifiers. A typical development environment includes a builder used to validate and compile programs written in the programming language and a specialized editor with functionality such as syntax highlighting and content assist. One of the most popular and widely used tools for compiler and parser construction is YACC (Yet Another Compiler-Compiler) and its various extensions. As a result of a YACC grammar compilation, an ASCII file is generated that contains a table of parser states with corresponding grammar rules. This invention uses this file to automatically generate a lookup table containing states and non-reserved words valid for those states.