Remove non-free old and crusty clearcase pkg
[packages] / xemacs-packages / semantic / NEWS
1 Semantic 2.0 is a major new version.
2
3 * Versioning
4
5 Semantic now uses `inversion' to track version numbers of different
6 releases.  Semanticdb table files save the version number they are
7 created at, and can identify old tables to regenerate them when an
8 incompatible upgrade occurs.
9
10 * API changes
11
12 ** Naming Conventions
13
14 There is a new naming convention for the things Semantic refers too.
15 The list of renamed functions is far to long to list here.  All
16 functions that used the old conventions have been changed to use the
17 new conventions, and are not explicitly listed here unless there is
18 an incompatible change.
19
20 *** New conventions
21
22 token - Refers to a lexical analyzer production.
23 stream - A list of tokens
24 tag - Refers to a datastructure created by a grammar to represent
25       something in a language file
26 table - A hierarchical list of tags.
27 tag-class - A tag may represent a function, data type, or variable.
28 parse - Run a source file through a parser.
29
30 *** Old conventions
31
32 token - Could be a lexical token, or a tag
33 nonterminal - Could be a grammar nonterminal, or a tag
34 stream - Could be a list of lexical tokens, or a tag table.
35 token-type - New represented as tag-class
36 bovinate - Run a source file through a parser.
37
38 *** Obsoletion stratety
39
40 The new framework function `semantic-alias-obsolete' has been used to
41 obsolete old functions and allow old code to continue working.  Byte
42 compiler warnings will be produced if old functions are used.  The
43 old function will be completely removed in a future release.
44
45 For variables, the function `semantic-varalias-obsolete' has been
46 used.  When available it uses a native alias routine for compatibility
47 or displays a warning.
48
49 ** Lexical analysis.
50
51 *** The old `semantic-flex' API is deprecated.
52
53 The lexical analysis toolkit has been completely rewritten as a new
54 `semantic-lex' API.
55
56 *** Lexical token management.
57
58 `semantic-lex-token'
59 Create a new lexical token.
60
61 `semantic-lex-token-class'
62 Fetch the class of a lexical token.
63
64 `semantic-lex-token-bounds'
65 Fetch the start and end locations of a lexical token.
66
67 `semantic-lex-token-start' and `semantic-lex-token-end'
68 Respectively fetch the start and end position of a lexical token.
69
70 `semantic-lex-token-text'
71 Fetch the text associated with a lexical token.
72
73 *** Macros to easily build custom lexers.
74
75 `define-lex'
76 Define a new lexer as a set of lexical rules.
77
78 `define-lex-analyzer'
79 Base macro to create a lexical rule.
80
81 A lexical rule associates a PATTERN to an ACTION.
82
83 A PATTERN describes how to match data in the input stream, with a
84 combination of regular expressions and strings.
85
86 An ACTION is a set of arbitrary Emacs Lisp statements executed when
87 the input stream matches the corresponding PATTERN, typically to push
88 a new token on the lexical stream.
89
90 `define-lex-regex-analyzer' and `define-lex-simple-regex-analyzer'
91 Create lexical rules that match a regexp.
92
93 `define-lex-block-analyzer'
94 Create a lexical rule for paired delimiters blocks.
95
96 *** A set of useful lexical rules is predefined.
97
98 `semantic-lex-beginning-of-line'
99 `semantic-lex-newline'
100 `semantic-lex-newline-as-whitespace'
101 `semantic-lex-ignore-newline'
102 `semantic-lex-whitespace'
103 `semantic-lex-ignore-whitespace'
104 `semantic-lex-number'
105 `semantic-lex-symbol-or-keyword'
106 `semantic-lex-charquote'
107 `semantic-lex-punctuation'
108 `semantic-lex-punctuation-type'
109 `semantic-lex-paren-or-list'
110 `semantic-lex-open-paren'
111 `semantic-lex-close-paren'
112 `semantic-lex-string'
113 `semantic-lex-comments'
114 `semantic-lex-comments-as-whitespace'
115 `semantic-lex-ignore-comments'
116 `semantic-lex-default-action'
117
118 *** Some lexers are predefined too.
119
120 A comment lexer: `semantic-comment-lexer' that handles comments.
121 A `semantic-simple-lexer' that ignores comments and whitespace, and
122 returns tokens corresponding to syntax as specified by the syntax
123 table.
124
125 *** `semantic-lex' core "overload" function.
126
127 Called to lexically analyze text in an area of the current buffer.
128
129 *** debugging bad syntax
130
131 Using `semantic-lex-debug-analyzers' combined with `debug-on-error'
132 allows you to debug analyzers inside usually protected parsing
133 routines.
134
135 ** Parsing
136
137 *** API to manage a parse tree state.
138
139 `semantic-parse-tree-set-unparseable'
140 Indicate that there are lexical issues that prevent parsing.
141
142 `semantic-parse-tree-set-unparseable-p'
143 Return non-nil if  there are lexical issues that prevent parsing.
144
145 `semantic-parse-tree-set-needs-update'
146 Indicate that the current parse tree needs to be updated.
147
148 `semantic-parse-tree-needs-update-p'
149 Return non-nil if the current parse tree needs to be updated.
150
151 `semantic-parse-tree-set-needs-rebuild'
152 Indicate that the current parse tree needs to be rebuilt.
153
154 `semantic-parse-tree-needs-rebuild-p'
155 Return non-nil if the current parse tree needs to be rebuilt.
156
157 `semantic-parse-tree-set-up-to-date'
158 Indicate that the current parse tree is up to date.
159
160 `semantic-parse-tree-up-to-date-p'
161 Return non-nil if the current parse tree is up to date.
162
163 *** Core "overload" functions to abstract call to parsers.
164
165 New parsers can be plugged-in easily by overriding the following
166 core functions:
167
168 `semantic-parse-stream' called to parse a given stream, starting at a
169 given nonterminal rule.
170
171 `semantic-parse-changes' called to reparse changes in the current
172 buffer.
173
174 `semantic-parse-region' called to parse a buffer's area.
175
176 *** Four core parsers are available.
177
178 - Two general parsers
179
180   - The Semantic "bovinator".
181   - A new LALR(1) parser: Wisent, port of Bison 1.3 in Elisp.
182
183 - Two specific parsers
184
185   - The Elisp parser based on the Emacs built-in function `read'.
186   - A regexp parser used in `texinfo-mode'.
187
188 *** Iterative parser.
189
190 Iterative parsers are better than rule-based iterative functions
191 in that they can handle obscure errors more cleanly.
192
193 The new `semantic-repeat-parse-whole-stream' helper function abstracts
194 this action for other parser centric routines.
195
196 *** Incremental parser.
197
198 In Semantic 1.x, changes were handled in a simplistic manner, where
199 tags that changed were reparsed one at a time.  Any other form of
200 edit were managed through a full re-parse.
201
202 The new `semantic-edits-incremental-parser' attempts to minimize the
203 number of times a full re-parse needs to occur.  While overlays and
204 tags will continue to be recycled in the simple case, new cases
205 where tags are inserted or old tags removed from the original list
206 are handled.
207
208 *** Lexical Safety feature.
209
210 You can protect code from reparsing the buffer if there are lexical
211 errors with the `semantic-lex-catch-errors' macro.
212
213 *** Deprecated and removed API.
214
215 The `semantic-flex' API is deprecated, and replaced by the new
216 `semantic-lex' API.  The old API still exists for compatibility with
217 Semantic 1.x.
218
219 `semantic-parse-region' should be used instead of
220 `semantic-bovinate-region-until-error' and
221 `semantic-bovinate-from-nonterminal-full' which still exist for
222 compatibility with the Semantic 1.x API.
223
224 The old incremental parser `semantic-rebovinate-token' and associated
225 `semantic-show-dirty-mode' have been removed and replaced respectively
226 by new `semantic-edits-incremental-parser' and
227 `semantic-highlight-edits-mode'.
228
229 `semantic-bovinate-toplevel-override' is replaced by the new core
230 parsing "overloads".
231
232 `semantic-bovine-toplevel-full-reparse-needed-p' and
233 `semantic-bovine-toplevel-partial-reparse-needed-p' are replaced by
234 the new parse tree state management API.
235
236 `semanticdb-project-predicates' hook is renamed
237 `semanticdb-project-predicate-functions'.
238
239 * Grammar framework.
240
241 Semantic 2.0 introduced a new common grammar framework to simplify
242 development of grammars suitable to parser needs.
243
244 ** New "abstract" major mode: `semantic-grammar-mode'.
245 That defines a useful environment to develop grammars (indentation,
246 syntax highlighting, parsing, etc.).
247
248 By deriving new "concrete" major modes one can provide customized
249 generators that convert a grammar parse tree into Elisp forms needed
250 by a particular parser.
251
252 ** New "overloads" are provided to customize Elisp generation.
253
254 `grammar-setupcode-builder'
255 That returns the setup code form.
256
257 `grammar-parsetable-builder'
258 That returns the parser table value.
259
260 `grammar-keywordtable-builder'
261 That returns the keyword table table value.
262
263 `grammar-tokentable-builder'
264 That returns the token table value.
265
266 ** New grammar modes derived from `semantic-grammar-mode'.
267
268 *** `bovine-grammar-mode'.
269 That converts grammar input form into Elisp code to be used by the
270 "bovinator".  Such grammars are associated to the .by file extension.
271 Old grammars in .bnf files are no longer supported.
272
273 *** `wisent-grammar-mode'.
274 That converts grammar input form into Elisp code to be used by the
275 Wisent LALR parser.  Such grammars are associated to the .wy
276 file extension.
277
278 ** Grammar build process
279
280 A new grammar construction process separates generated code from hand
281 written code.  An semantic specific EDE extension will generate
282 Makefile rules to build these files.
283
284 Language specific human written code must call the automatically
285 generated setup function.
286
287 *** Auto-generation of lexical rules
288
289 The new %type statement combined with the use of %token and %keyword
290 statements permits the declaration of a lexical type and associates it
291 with patterns that define how to match lexical tokens of that type.
292
293 The grammar construction process can benefit from the %type, %keyword
294 and %token declarations to automatically generate the definition of a
295 lexical rule for each explicitly declared lexical type.
296
297 Default values are provided for well known types like <keyword>,
298 <symbol>, <string>, <number>, <punctuation>, and <block>.  Those types
299 assume that the correct patterns are provided by %keyword and %token
300 statements, a simple "%type <type>" declaration should generally
301 suffice to auto-generate a suitable lexical rule.
302
303 It is then easy to put predefined and auto-generated lexical rules
304 together to build ad-hoc lexical analyzers.  Examples are available
305 among the grammars included in the distribution.
306
307 *** Bovine grammar
308
309 A file FOO.by will create the file FOO-by.el, and FOO-by.elc
310 automatically.
311
312 *** Wisent grammar
313
314 A file FOO.wy will create the file FOO-wy.el, and FOO-wy.elc
315 automatically.
316
317 * Decorations.
318
319 ** secondary overlays
320 An API for adding secondary overlays onto a tag has been added.
321 This allows you to add/remove arbitrary visual effects onto a tag.
322 Uses tag link hooks to make sure the overlays are added/removed
323 safely.
324
325 ** folded tags
326 New functions `semantic-set-tag-folded' and `semantic-tag-folded-p'
327 allow you to put a tag into a 'folded' state where only the 1st line
328 is showing. 
329
330 * Database.
331
332 ** semanticdb.el
333
334 *** `semanticdb-abstract-table'
335 New base class for all tables of tokens lists.
336
337 *** `semantidb-table'
338 Inherits from the abstract table.
339
340 *** `semanticdb-project-database'
341 No longer saves itself to a file.
342
343 ** semanticdb-file.el
344 New routines for databases saved to disk in plain EIEIO save files.
345 Depends on `inversion' for save file compatibility tests.
346
347 *** `semanticdb-project-database-file'
348 File based project database type.
349
350 ** semanticdb-search.el
351 All old search routines have been moved into this file.
352 All old search routines are now methods on database projects.
353 All old search routines have been obsoleted.  Use semanticdb-find.el
354 based routines instead.  These functions are still maintained because
355 the semanticdb-find based routines do not yet handle all the same
356 search paramters as the old routines.
357
358 *** `semanticdb-search-results-table'
359 Class for any search in a database with no tables of its own.
360
361 *** Different search classes
362 Searches in databases have been broken into three classes.
363 - Basic search - on values as stored directly in a semantic token.
364 - Advanced search - complex searches of relationships.  Needed for
365   system databases which cannot support a generic search.
366 - Generic search - Takes a predicate.  System databases cannot usually
367   support this style of search.
368
369 ** semanticdb-find.el
370 New prefered search routines which start with `semanticdb-find...'.
371 These routines take fewer parameters.  There are more types of search
372 routines than before to make up for the missing parameters.
373
374 *** Basic search
375 Scans the current buffer, and all files included into this buffer.
376 Only scans top level tags.
377
378 *** Deep search
379 A Deep search will "flatten" the tags in a file so they are all
380 visible, including parts of structures or classes.
381
382 *** Brute searches
383 As a basic search, but scans all files in the current project.
384
385 *** semanticdb-find-translate-path
386 This new routines determines the "path" to scan.  There are two basic
387 types of paths.  The default is to examine the specified buffers
388 include list, and only scan those files.  Optional "brute" path will
389 scan all files in the current project, including system level databases.
390
391 *** database Find Results
392 Find Results are somewhat more formalized, and have routines to
393 deal with them.
394
395 semanticdb-find-results-p
396 semanticdb-strip-find-results
397 semanticdb-find-result-with-nil-p
398 semanticdb-find-result-length
399 semanticdb-find-result-nth
400
401 Find results can be passed into any semanticdb-find routine as the
402 path and only those results will be scanned.
403
404 *** New types of searches not originally in semanticdb-search.el
405
406 **** semanticdb-find-*-by-name-for-completion
407 Searches "for completion" use different matching constraints
408 equivalent to the regular expression "^chars", which provide a speed
409 improvement.
410
411 ** semanticdb-system.el
412 Representation of a database belonging to system libraries.
413 These databases may not come from source code, and can represent
414 object files, header file libraries and the like.
415
416 *** `semanticdb-project-database-system'
417 Baseclass for any system database.
418
419 *** `semanticdb-project-database-system-c'
420 Class for C libraries of header files.
421
422 ** semanticdb-el.el
423 Special system database representing Emacs' internal state.
424 Implements all search routines optimized as much as possible.
425
426 *** `semanticdb-table-emacs-lisp'
427 Table representing search results for Emacs Lisp symbols.
428
429 *** `semanticdb-project-database-emacs-lisp'
430 Database representing Emacs' internal symbol obarray.
431
432 ** semanticdb-mk
433 Routines for building semantic.cache files from a command line script.
434
435 * Utilities.
436
437 ** `semantic-find-tag-parent-by-overlay'
438 Find the parent of a tag by overlays.
439     
440 * Minor modes.
441
442 ** `semantic-show-parser-state-mode'
443 Display the parser state in the modeline.
444
445 ** `semantic-highlight-edits-mode'
446 Highlight areas that a user edits.
447
448 ** `semantic-stickyfunc-mode'
449 Make the current functions header `sticky' to the top of the current
450 window.  (Emacs 21 required)
451
452 ** `semantic-auto-parse-mode' obsolete
453 ** `semantic-summary-mode' obsolete
454
455 ** `semantic-idle-scheduler-mode'
456 Replaces seman`tic-auto-parse-mode'.  Reparses all buffers.
457 Also schedules additional functionality.
458
459 ** `semantic-idle-summary-mode'
460 Replaces seman`tic-summary-mode'.  Uses the new idle scheduler
461 to execute itself.
462
463 ** `semantic-idle-completions-mode'
464 New minor mode for automatically going into inline completion
465 for symbol prefixes.
466
467 ** `semantic-decoration-mode'
468 New minor mode that manages any form of decoration to be added to
469 tags.  It absorbs the duties of:
470
471 ** `semantic-show-tag-boundaries-mode': obsolete
472 ** `semantic-highlight-by-attribute-mode': obsolete
473
474 * Hooks.
475
476 ** `semantic-before-auto-parse-hooks'
477 Run before option `semantic-auto-parse-mode' begins parsing.
478
479 ** `semantic-after-auto-parse-hooks'
480 Run after option `semantic-auto-parse-mode' has parsed.
481
482 * Smart Completion
483
484 ** `semantic-analyze-current-context'
485 This is now an overridable function.
486 The objects contain more details on scoping for more accurate
487 symbol lookup.
488
489 ** `semantic-analyze-possible-completions'
490 This is now an overridable function.
491
492 * Setup.
493
494 A lot of things are now auto-loaded on demand.  Setup should now be
495 done through the cedet.el initialization file.
496
497 * Languages.
498
499 ** Python parser added.
500 The LALR grammar is based on the official grammar with slight
501 modifications.  The tokens generated are formatted similar to
502 those produced by the Java parser.
503
504 ** Erlang parser added.
505 The grammar was written for semantic 1.4 in BNF format, and converted
506 to .by format.
507
508 ** HTML external parser added.
509 The regexp based parser was copied from the texinfo example
510 and modified for semantic 2.0.
511
512 ** Makefile parser improved.
513 There is now excellent smart completion support.
514
515 ** Emacs lisp parser improved.
516 The Emacs Lisp parser is now more flexible.  Using the new macros
517 `semantic-elisp-setup-form-parser' and
518 `semantic-elisp-reuse-form-parser', it is easy to parse all kind of
519 Lisp forms to produce semantic tags.
520
521 ** Texinfo parser improved
522 The texinfo parser was updated, and supports the new
523 analysis engine.
524
525 \f
526 Local variables:
527 mode: outline
528 paragraph-separate: "[  \f]*$"
529 end: