Source

semantic / NEWS

Diff from to
-* Changes for Semantic 1.4.4
+Semantic 2.0 is a major new version.
 
-** New `semantic-stickyfunc-mode'.  Displays the function header at top of
-   window in the Emacs 21 header-line.
+* Versioning
 
-** Fixed a bug in the C++-grammar/parser which is related to templates.
+Semantic now uses `inversion' to track version numbers of different
+releases.  Semanticdb table files save the version number they are
+created at, and can identify old tables to regenerate them when an
+incompatible upgrade occurs.
 
-* Changes for Semantic 1.4.3
+* API changes
 
-** Much better C/C++ grammar (almost complete) - now complex C++ can be parsed
+** Naming Conventions
 
-*** Fixed some aspects of 'using' (e.g. now "using namespace XXX" is possible)
+There is a new naming convention for the things Semantic refers too.
+The list of renamed functions is far to long to list here.  All
+functions that used the old conventions have been changed to use the
+new conventions, and are not explicitly listed here unless there is
+an incompatible change.
 
-*** Much better namespace handling
+*** New conventions
 
-**** Unnamed namespaces are correct parsed and "unnamed" is added as type-name
+token - Refers to a lexical analyzer production.
+stream - A list of tokens
+tag - Refers to a datastructure created by a grammar to represent
+      something in a language file
+table - A hierarchical list of tags.
+tag-class - A tag may represent a function, data type, or variable.
+parse - Run a source file through a parser.
 
-**** Namespace-qualified class- and type-names are now allowed whereever it is
-     necessary
+*** Old conventions
 
-*** Much better handling of builtin-types
+token - Could be a lexical token, or a tag
+nonterminal - Could be a grammar nonterminal, or a tag
+stream - Could be a list of lexical tokens, or a tag table.
+token-type - New represented as tag-class
+bovinate - Run a source file through a parser.
 
-**** signed and unsigned is now only allowed for builtin types
+*** Obsoletion stratety
 
-**** Supporting composed builtins like 'long int' and 'long double'
+The new framework function `semantic-alias-obsolete' has been used to
+obsolete old functions and allow old code to continue working.  Byte
+compiler warnings will be produced if old functions are used.  The
+old function will be completely removed in a future release.
 
-**** Parsing builtin-type wchar_t and also literals like L"str" and L'c'
+For variables, the function `semantic-varalias-obsolete' has been
+used.  When available it uses a native alias routine for compatibility
+or displays a warning.
 
-*** Much better template parsing:
+** Lexical analysis.
 
-**** Templates in combination with namespaces
+*** The old `semantic-flex' API is deprecated.
 
-**** Outside method-implementations for template classes are now correct parsed
-     and also correct grouped to the type of the template class-declaration
+The lexical analysis toolkit has been completely rewritten as a new
+`semantic-lex' API.
 
-**** Template-specifier can now contain all flavors of normal args regardless
-     if builtin types or user-defined types and also in combination with
-     adress(&)- und dereferencing(*)-operator.
+*** Lexical token management.
 
-**** All typemodifiers like const, volatile etc.. and pointers and
-     references of a template-parameter are parsed and displayed correct.
+`semantic-lex-token'
+Create a new lexical token.
 
-**** Template types can now contain constant- and literal-arguments like in
-     "foo<ClassX, 10> foo_10_var;"
+`semantic-lex-token-class'
+Fetch the class of a lexical token.
 
-**** Template-specifiers are allowed in class-qualifiers
+`semantic-lex-token-bounds'
+Fetch the start and end locations of a lexical token.
 
-*** Improving macro-parsing, i.e. now also multiline-macros (every line ending
-    with a \) are parsed correctly; same for arbitrary one-liners
+`semantic-lex-token-start' and `semantic-lex-token-end'
+Respectively fetch the start and end position of a lexical token.
+
+`semantic-lex-token-text'
+Fetch the text associated with a lexical token.
+
+*** Macros to easily build custom lexers.
+
+`define-lex'
+Define a new lexer as a set of lexical rules.
+
+`define-lex-analyzer'
+Base macro to create a lexical rule.
+
+A lexical rule associates a PATTERN to an ACTION.
+
+A PATTERN describes how to match data in the input stream, with a
+combination of regular expressions and strings.
+
+An ACTION is a set of arbitrary Emacs Lisp statements executed when
+the input stream matches the corresponding PATTERN, typically to push
+a new token on the lexical stream.
+
+`define-lex-regex-analyzer' and `define-lex-simple-regex-analyzer'
+Create lexical rules that match a regexp.
+
+`define-lex-block-analyzer'
+Create a lexical rule for paired delimiters blocks.
+
+*** A set of useful lexical rules is predefined.
+
+`semantic-lex-beginning-of-line'
+`semantic-lex-newline'
+`semantic-lex-newline-as-whitespace'
+`semantic-lex-ignore-newline'
+`semantic-lex-whitespace'
+`semantic-lex-ignore-whitespace'
+`semantic-lex-number'
+`semantic-lex-symbol-or-keyword'
+`semantic-lex-charquote'
+`semantic-lex-punctuation'
+`semantic-lex-punctuation-type'
+`semantic-lex-paren-or-list'
+`semantic-lex-open-paren'
+`semantic-lex-close-paren'
+`semantic-lex-string'
+`semantic-lex-comments'
+`semantic-lex-comments-as-whitespace'
+`semantic-lex-ignore-comments'
+`semantic-lex-default-action'
+
+*** 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
+table.
+
+*** `semantic-lex' core "overload" function.
+
+Called to lexically analyze text in an area of the current buffer.
+
+*** debugging bad syntax
+
+Using `semantic-lex-debug-analyzers' combined with `debug-on-error'
+allows you to debug analyzers inside usually protected parsing
+routines.
+
+** Parsing
+
+*** API to manage a parse tree state.
+
+`semantic-parse-tree-set-unparseable'
+Indicate that there are lexical issues that prevent parsing.
+
+`semantic-parse-tree-set-unparseable-p'
+Return non-nil if  there are lexical issues that prevent parsing.
+
+`semantic-parse-tree-set-needs-update'
+Indicate that the current parse tree needs to be updated.
+
+`semantic-parse-tree-needs-update-p'
+Return non-nil if the current parse tree needs to be updated.
+
+`semantic-parse-tree-set-needs-rebuild'
+Indicate that the current parse tree needs to be rebuilt.
+
+`semantic-parse-tree-needs-rebuild-p'
+Return non-nil if the current parse tree needs to be rebuilt.
+
+`semantic-parse-tree-set-up-to-date'
+Indicate that the current parse tree is up to date.
+
+`semantic-parse-tree-up-to-date-p'
+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
+core functions:
+
+`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
+buffer.
+
+`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
+tags 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
+tags will continue to be recycled in the simple case, new cases
+where tags are inserted or old tags removed from the original list
+are handled.
+
+*** Lexical Safety feature.
+
+You can protect code from reparsing the buffer if there are lexical
+errors with the `semantic-lex-catch-errors' macro.
+
+*** Deprecated and removed API.
+
+The `semantic-flex' API is deprecated, and replaced by the new
+`semantic-lex' API.  The old API still exists for compatibility with
+Semantic 1.x.
+
+`semantic-parse-region' should be used instead of
+`semantic-bovinate-region-until-error' and
+`semantic-bovinate-from-nonterminal-full' which still exist for
+compatibility with the Semantic 1.x API.
+
+The old incremental parser `semantic-rebovinate-token' and associated
+`semantic-show-dirty-mode' have been removed and replaced respectively
+by new `semantic-edits-incremental-parser' and
+`semantic-highlight-edits-mode'.
+
+`semantic-bovinate-toplevel-override' is replaced by the new core
+parsing "overloads".
+
+`semantic-bovine-toplevel-full-reparse-needed-p' and
+`semantic-bovine-toplevel-partial-reparse-needed-p' are replaced by
+the new parse tree state management API.
+
+`semanticdb-project-predicates' hook is renamed
+`semanticdb-project-predicate-functions'.
+
+* Grammar framework.
+
+Semantic 2.0 introduced a new common grammar framework to simplify
+development of grammars suitable to parser needs.
+
+** New "abstract" major mode: `semantic-grammar-mode'.
+That defines a useful environment to develop grammars (indentation,
+syntax highlighting, parsing, etc.).
+
+By deriving new "concrete" major modes one can provide customized
+generators that convert a grammar parse tree into Elisp forms needed
+by a particular parser.
+
+** New "overloads" are provided to customize Elisp generation.
+
+`grammar-setupcode-builder'
+That returns the setup code form.
+
+`grammar-parsetable-builder'
+That returns the parser table value.
+
+`grammar-keywordtable-builder'
+That returns the keyword table table value.
+
+`grammar-tokentable-builder'
+That returns the token table value.
+
+** New grammar modes derived from `semantic-grammar-mode'.
+
+*** `bovine-grammar-mode'.
+That converts grammar input form into Elisp code to be used by the
+"bovinator".  Such grammars are associated to the .by file extension.
+Old grammars in .bnf files are no longer supported.
+
+*** `wisent-grammar-mode'.
+That converts grammar input form into Elisp code to be used by the
+Wisent LALR parser.  Such grammars are associated to the .wy
+file extension.
+
+** Grammar build process
+
+A new grammar construction process separates generated code from hand
+written code.  An semantic specific EDE extension will generate
+Makefile rules to build these files.
+
+Language specific human written code must call the automatically
+generated setup function.
+
+*** Auto-generation of lexical rules
+
+The new %type statement combined with the use of %token and %keyword
+statements permits the declaration of a lexical type and associates it
+with patterns that define how to match lexical tokens of that type.
+
+The grammar construction process can benefit from the %type, %keyword
+and %token declarations to automatically generate the definition of a
+lexical rule for each explicitly declared lexical type.
+
+Default values are provided for well known types like <keyword>,
+<symbol>, <string>, <number>, <punctuation>, and <block>.  Those types
+assume that the correct patterns are provided by %keyword and %token
+statements, a simple "%type <type>" declaration should generally
+suffice to auto-generate a suitable lexical rule.
+
+It is then easy to put predefined and auto-generated lexical rules
+together to build ad-hoc lexical analyzers.  Examples are available
+among the grammars included in the distribution.
+
+*** Bovine grammar
+
+A file FOO.by will create the file FOO-by.el, and FOO-by.elc
+automatically.
+
+*** Wisent grammar
+
+A file FOO.wy will create the file FOO-wy.el, and FOO-wy.elc
+automatically.
+
+* Decorations.
+
+** secondary overlays
+An API for adding secondary overlays onto a tag has been added.
+This allows you to add/remove arbitrary visual effects onto a tag.
+Uses tag link hooks to make sure the overlays are added/removed
+safely.
+
+** folded tags
+New functions `semantic-set-tag-folded' and `semantic-tag-folded-p'
+allow you to put a tag into a 'folded' state where only the 1st line
+is showing. 
+
+* Database.
+
+** semanticdb.el
+
+*** `semanticdb-abstract-table'
+New base class for all tables of tokens lists.
+
+*** `semantidb-table'
+Inherits from the abstract table.
+
+*** `semanticdb-project-database'
+No longer saves itself to a file.
+
+** semanticdb-file.el
+New routines for databases saved to disk in plain EIEIO save files.
+Depends on `inversion' for save file compatibility tests.
+
+*** `semanticdb-project-database-file'
+File based project database type.
+
+** semanticdb-search.el
+All old search routines have been moved into this file.
+All old search routines are now methods on database projects.
+All old search routines have been obsoleted.  Use semanticdb-find.el
+based routines instead.  These functions are still maintained because
+the semanticdb-find based routines do not yet handle all the same
+search paramters as the old routines.
+
+*** `semanticdb-search-results-table'
+Class for any search in a database with no tables of its own.
+
+*** Different search classes
+Searches in databases have been broken into three classes.
+- Basic search - on values as stored directly in a semantic token.
+- Advanced search - complex searches of relationships.  Needed for
+  system databases which cannot support a generic search.
+- Generic search - Takes a predicate.  System databases cannot usually
+  support this style of search.
+
+** semanticdb-find.el
+New prefered search routines which start with `semanticdb-find...'.
+These routines take fewer parameters.  There are more types of search
+routines than before to make up for the missing parameters.
+
+*** Basic search
+Scans the current buffer, and all files included into this buffer.
+Only scans top level tags.
+
+*** Deep search
+A Deep search will "flatten" the tags in a file so they are all
+visible, including parts of structures or classes.
+
+*** Brute searches
+As a basic search, but scans all files in the current project.
+
+*** semanticdb-find-translate-path
+This new routines determines the "path" to scan.  There are two basic
+types of paths.  The default is to examine the specified buffers
+include list, and only scan those files.  Optional "brute" path will
+scan all files in the current project, including system level databases.
+
+*** database Find Results
+Find Results are somewhat more formalized, and have routines to
+deal with them.
+
+semanticdb-find-results-p
+semanticdb-strip-find-results
+semanticdb-find-result-with-nil-p
+semanticdb-find-result-length
+semanticdb-find-result-nth
+
+Find results can be passed into any semanticdb-find routine as the
+path and only those results will be scanned.
+
+*** New types of searches not originally in semanticdb-search.el
+
+**** semanticdb-find-*-by-name-for-completion
+Searches "for completion" use different matching constraints
+equivalent to the regular expression "^chars", which provide a speed
+improvement.
+
+** semanticdb-system.el
+Representation of a database belonging to system libraries.
+These databases may not come from source code, and can represent
+object files, header file libraries and the like.
+
+*** `semanticdb-project-database-system'
+Baseclass for any system database.
+
+*** `semanticdb-project-database-system-c'
+Class for C libraries of header files.
+
+** semanticdb-el.el
+Special system database representing Emacs' internal state.
+Implements all search routines optimized as much as possible.
+
+*** `semanticdb-table-emacs-lisp'
+Table representing search results for Emacs Lisp symbols.
+
+*** `semanticdb-project-database-emacs-lisp'
+Database representing Emacs' internal symbol obarray.
+
+** semanticdb-mk
+Routines for building semantic.cache files from a command line script.
+
+* Utilities.
+
+** `semantic-find-tag-parent-by-overlay'
+Find the parent of a tag by overlays.
     
-*** C++ keyword 'typename' is recognized and parsed
+* Minor modes.
 
-*** operator()() and operator[]() are parsed correctly
+** `semantic-show-parser-state-mode'
+Display the parser state in the modeline.
 
-*** Better parsing of const and volatile (now also allowed to be after the type)
+** `semantic-highlight-edits-mode'
+Highlight areas that a user edits.
 
-*** Correct parsing pointer-arguments of functions/methods, even if there is no
-    argument-name
+** `semantic-stickyfunc-mode'
+Make the current functions header `sticky' to the top of the current
+window.  (Emacs 21 required)
 
-*** Correct parsing of string sequences like "string1" "string2" string3" which
-    are concatenated by the cpp-precomiler to one string
+** `semantic-auto-parse-mode' obsolete
+** `semantic-summary-mode' obsolete
 
-*** Improved typedef parsing with const/volatile types and template-types
-    
-*** Some minor fixes
+** `semantic-idle-scheduler-mode'
+Replaces seman`tic-auto-parse-mode'.  Reparses all buffers.
+Also schedules additional functionality.
 
+** `semantic-idle-summary-mode'
+Replaces seman`tic-summary-mode'.  Uses the new idle scheduler
+to execute itself.
 
-* Changes for Semantic 1.4.2
+** `semantic-idle-completions-mode'
+New minor mode for automatically going into inline completion
+for symbol prefixes.
 
-** Added namespaces support to the C/C++ grammar.
-** Minor bug and doc fixes.
+** `semantic-decoration-mode'
+New minor mode that manages any form of decoration to be added to
+tags.  It absorbs the duties of:
 
-* Changes for Semantic 1.4.1
+** `semantic-show-tag-boundaries-mode': obsolete
+** `semantic-highlight-by-attribute-mode': obsolete
 
-** This is a bug fix release only, without new features added.
+* Hooks.
 
-* Changes for Semantic 1.4
+** `semantic-before-auto-parse-hooks'
+Run before option `semantic-auto-parse-mode' begins parsing.
 
-** New Non-recursive parser by David Ponce <david@dponce.com>
+** `semantic-after-auto-parse-hooks'
+Run after option `semantic-auto-parse-mode' has parsed.
 
-** Changed contents of some nonterminals to make them language agnostic
+* Smart Completion
 
-*** Variables no longer contain an explicit constant flag.
+** `semantic-analyze-current-context'
+This is now an overridable function.
+The objects contain more details on scoping for more accurate
+symbol lookup.
 
-*** Modifiers field for variable, function, and types is now an association
-    list.
+** `semantic-analyze-possible-completions'
+This is now an overridable function.
 
-** Semantic Context Analysis library
+* Setup.
 
-*** Analyzizes via type information the local context
+A lot of things are now auto-loaded on demand.  Setup should now be
+done through the cedet.el initialization file.
 
-*** Provides smart completion information
+* Languages.
 
-*** Speedbar mode for using analysis information.
+** Python parser added.
+The LALR grammar is based on the official grammar with slight
+modifications.  The tokens generated are formatted similar to
+those produced by the Java parser.
 
-** Semantic Class Browser structure generator
+** Erlang parser added.
+The grammar was written for semantic 1.4 in BNF format, and converted
+to .by format.
 
-*** Generates objects representing a browsable class structure
-    which links parents and subclasses and externally defined
-    methods into an easilly navigated (programatically) structure.
+** HTML external parser added.
+The regexp based parser was copied from the texinfo example
+and modified for semantic 2.0.
 
-*** Speedbar interface to browser structure (simple)
+** Makefile parser improved.
+There is now excellent smart completion support.
 
-** User Visible Features
+** Emacs lisp parser improved.
+The Emacs Lisp parser is now more flexible.  Using the new macros
+`semantic-elisp-setup-form-parser' and
+`semantic-elisp-reuse-form-parser', it is easy to parse all kind of
+Lisp forms to produce semantic tags.
 
-*** semantic-load.el simplifies installation.
+** Texinfo parser improved
+The texinfo parser was updated, and supports the new
+analysis engine.
 
-*** Added partial reparseing of buffers where only token contents have changed.
-
-*** Added `semantic-show-dirty-mode'.
-
-*** Added `semantic-show-unmatched-syntax-mode'
-
-*** Added `semantic-auto-reparse-mode'
-
-*** Added new tool, `semanticdb'.
-    Semanticdb caches token lists between sessions with a specific file.
-
-*** Added semantic-texi for parsing texinfo files.
-
-**** Commands for creating @deffn sections from source
-
-**** Commands for updating an entire document with the source.
-
-*** Added semantic-scm for parsing Scheme (guile) scripts
-
-*** semantic-el now has a much faster Emacs Lisp parser.
-    It uses the built in Emacs read command.
-
-*** semantic-c updates
-
-**** Handles most of C++, including templates
-
-**** Faster type parsing
-
-**** Faster function/variable parsing
-
-**** Summary text for keywords for eldoc
-
-*** Added Senator (Semantic Navigator) by David Ponce <david@dponce.com>
-
-**** Provides a minor mode keymap and menu.
-
-**** Search and Isearch in token names.
-
-**** Jump to functions by name
-
-**** Token Completion, and completion menu.
-
-**** eldoc support for languages supported by semantic.
-
-**** hippie expand try function for token names.
-
-*** Added Java.bnf by David Ponce <david@dponce.com>
-
-**** java.bnf from JDE by Paul Kinnucan and David Ponce
-
-**** semantic-java.el derived from JDE.
-
-**** eldoc support in bnf modes.
-
-*** semantic-imenu can now tags for all files that had been loaded in
-    emacs in a directory if semanticdb is active
-
-*** Imenu and speedbar group externally defined methods together.
-
-** bnf-mode: Language Author Features
-
-*** Parsing with `semantic-toplevel-bovinate-override' is better supported.
-
-*** Fixed BNF indentation engine to handle Optional Lambda Expressions
-   in a much cleaner way.
-
-*** Keyword table for a language can be generated using %token specifiers
-    and queried using `semantic-flex-map-keywords'.
-
-*** Source level debugging in the .bnf file
-
-*** skeleton.bnf as a good starting point for new languages.
 
 Local variables:
 mode: outline