[CEDET-devel] New check-ins
Brought to you by:
zappo
From: David P. <dav...@wa...> - 2003-07-07 21:46:39
|
Hi Eric, I finally checked-in my experimental wisent C code, plus some minor enhancements to the grammar framework. Here is the change log: 2003-07-07 David Ponce <da...@dp...> * semantic/doc/C99-gram.texi * semantic/wisent/wisent-c.el: * semantic/wisent/wisent-c.wy New file. * semantic/semantic-ast.el New library. * semantic/semantic-grammar.el (semantic-grammar-builtin-names) (semantic-grammar-builtin-names-regexp): New variables. (semantic-grammar-builtin-names-matcher): New function. (semantic-grammar-mode-keywords-1): Use it. * semantic/wisent/wisent-grammar.el (wisent-grammar-AST-ADD, wisent-grammar-AST-PUT) (wisent-grammar-AST-GET, wisent-grammar-AST-GET1) (wisent-grammar-AST-GET-STRING) (wisent-grammar-AST-MERGE): New functions. (wisent-grammar-builtins): Add above new AST built-ins. (wisent-grammar-builtin-names): New function. (wisent-grammar-expand-builtins): Expand car of expression too. (semantic-grammar-mode): Set built-in names. The wisent-c.wy grammar now uses AST built-in functions in place of previous wisent-ast function calls. wisent-ast is now a more general semantic-ast library. I improved the way built-in function names are highlighted in grammar files. Mainly to facilitate addition of new built-ins. I introduced a new variable `semantic-grammar-builtin-names' whose value is the list of built-in function names to highlight. The new font-lock "matcher": `semantic-grammar-builtin-names-matcher' uses that variable to search for the built-in names to highlight. Another advantage is that `semantic-grammar-builtin-names' can be set based on grammar mode. So it is possible now to have a different set of built-ins in `bovine-grammar-mode' and `wisent-grammar-mode'. For example, only the latter implements (and highlights) the new AST built-ins. Finally, I followed your recommendation and wrote a C99-gram.texi file that documents the ISO C99 context free grammar wisent-c.wy is based on. I put that file in the doc subdirectory. Enjoy! David |