On 3 Jul 2006, at 10:43, chinlu chinawa wrote:
What I'm looking for is a parser, or as I understand it, a way in which I can define new keywords whilst being able to process them as well as any arguments it may take.
Keywords, or hardwired names, are normally added in the lexer, which may be generated by Flex. If you want to have constructs such as 'define <name>...', one way to do it is to make a lookup table, where <name> is entered along with syntactic and semantic data. When the lexer finds a name, it checks the lookup table, and if found, returns the correct token and passes the semantic data to the parser.
Hans Aberg _______________________________________________ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison