Hi all happy Semantic hackers!
Maybe it's time to think to a first beta release of Semantic
2.0. Isn't it ;-)
I started to work on preparing it, and I am currently trying to write
a NEWS file. And I realized that a lot of things have changed since
Semantic 1.4. So it is not a trivial work to do!
Perhaps in the future it would be better to update the NEWS file in
parallel with code changes=3F
However you will find my first attempt at end. It is far from
being finished but I would like to know your opinion. Also, I would
appreciate if you could write some words about particular things you
worked on ;-)
Please feel free to fix, complete, change, etc., what I already wrote.
Thank you very much for any help!
Semantic 2.0 is a major new version.
* API changes
** Lexical analysis.
*** The old `semantic-flex' API is deprecated.
The lexical analysis toolkit has been completely rewritten as a new
*** Lexical token management.
Create a new lexical token.
Fetch the class of a lexical token.
Fetch the start and end locations of a lexical token.
`semantic-lex-token-start' and `semantic-lex-token-end'
Respectively fetch the start and end position of a lexical token.
Fetch the text associated with a lexical token.
*** Macros to easily build custom lexers.
Define a new lexer as a set of single lexical analyzers.
Base macro to create a single lexical analyzer.
`define-lex-regex-analyzer' and `define-lex-simple-regex-analyzer'
Create single lexical analyzers that match a regexp.
Create a single lexical analyzer for paired delimiters blocks.
*** A set of useful single analyzers is predefined.
*** Some lexers are predefined too.
A comment lexer: `semantic-comment-lexer' that handles comments.
A `semantic-simple-lexer' that ignores comments and whitespace, and
returns tokens corresponding to syntax as specified by the syntax
*** `semantic-lex' core "overload" function.
Called to lexically analyze text in an area of the current buffer.
*** API to manage a parse tree state
Indicate that the current parse tree needs to be updated.
Return non-nil if the current parse tree needs to be updated.
Indicate that the current parse tree needs to be rebuilt.
Return non-nil if the current parse tree needs to be rebuilt.
Indicate that the current parse tree is up to date.
Return non-nil if the current parse tree is up to date.
*** Core "overload" functions to abstract call to parsers.
New parsers can be plugged-in easily by overriding the following
`semantic-parse-stream' called to parse a given stream, starting at a
given nonterminal rule.
`semantic-parse-changes' called to reparse changes in the current
`semantic-parse-region' called to parse a buffer's area.
*** Four core parsers are available.
- Two general parsers
- The Semantic "bovinator".
- A new LALR(1) parser: Wisent, port of Bison 1.3 in Elisp.
- Two specific parsers
- The Elisp parser based on the Emacs built-in function `read'.
- A regexp parser used in `texinfo-mode'.
*** Iterative parser.
Iterative parsers are better than rule-based iterative functions
in that they can handle obscure errors more cleanly.
The new `semantic-repeat-parse-whole-stream' helper function abstracts
this action for other parser centric routines.
*** Incremental parser.
In Semantic 1.x, changes were handled in a simplistic manner, where
tokens that changed were reparsed one at a time. Any other form of
edit were managed through a full re-parse.
The new `semantic-edits-incremental-parser' attempts to minimize the
number of times a full re-parse needs to occur. While overlays and
tokens will continue to be recycled in the simple case, new cases
where tokens are inserted or old tokens removed from the original list
The old `semantic-rebovinate-token' function and associated
`semantic-dirty-...' have been removed.
*** Deprecated and removed API.
`semantic-parse-region' should be used instead of
`semantic-bovinate-from-nonterminal-full' which still exist for
compatibility with the Semantic 1.x API.
`semantic-bovinate-toplevel-override' is replaced by the new core
`semantic-bovine-toplevel-partial-reparse-needed-p' are replaced by
the new parse tree state management API.
* Grammar framework.
Find the parent of a nonterminal token by overlays.
* Minor modes.
Display the parser state in the modeline.
Has been replaced by...
Highlight areas that a user edits.
Run before option `semantic-auto-parse-mode' begins parsing.
Run after option `semantic-auto-parse-mode' has parsed.
A lot of things are now auto-loaded on demand.
paragraph-separate: "[ =09]*$"