Difference between revisions of "Semantic"

From WikEmacs
Jump to navigation Jump to search
(added a basic Semantic page)
 
 
(12 intermediate revisions by 10 users not shown)
Line 23: Line 23:
 
Emacs Lisp, Java, C/C++, C#, Python, Erlang, awk, Makefile, Scheme, HTML, Texinfo, Javascript, dot.
 
Emacs Lisp, Java, C/C++, C#, Python, Erlang, awk, Makefile, Scheme, HTML, Texinfo, Javascript, dot.
 
Also: Semantic's own grammar format (.by or .wy)
 
Also: Semantic's own grammar format (.by or .wy)
=== Database ===
+
 
Persistent storage of parsed information. Speeds load time and provides standard way of cross referencing files. The database backend supports alternate parsers and file formats.
 
 
=== Incremental parser ===
 
=== Incremental parser ===
 
Reparses minimal parts of a buffer as you edit.
 
Reparses minimal parts of a buffer as you edit.
Line 33: Line 32:
  
 
Semantic supports a wide range of user interface tools.
 
Semantic supports a wide range of user interface tools.
== Smart Completion ==
+
=== Smart Completion ===
 
Completes symbols actually available in a given context. Some tools call this intellisense.
 
Completes symbols actually available in a given context. Some tools call this intellisense.
== Idle Summary and Completion ==
+
 
Show function help, or offer up smart completions in idle time.
+
=== Speedbar Browser ===
== Speedbar Browser ==
 
 
Code for browsing tag lists with Speedbar.
 
Code for browsing tag lists with Speedbar.
== Documentation Generator ==
+
=== Documentation Generator ===
 
Identifies inline documentation in source code, and can convert it to texinfo. It can also create inline documenation.
 
Identifies inline documentation in source code, and can convert it to texinfo. It can also create inline documenation.
== Stickyfunc mode ==
+
=== Stickyfunc mode ===
 
Locks the function declaration you are editing in the header line. (Emacs only).
 
Locks the function declaration you are editing in the header line. (Emacs only).
== Imenu ==
+
=== Imenu ===
Create hierarchical imenu menus from parsed files.
+
Create hierarchical [[imenu]] menus from parsed files.
== Navigator ==  
+
 
 +
=== Navigator ===
 
Senator is a navigator that permits simple navigation through the parsed language. It also includes token highlighting, and magic cut & paste.
 
Senator is a navigator that permits simple navigation through the parsed language. It also includes token highlighting, and magic cut & paste.
== Decoration Modes ==  
+
=== Decoration Modes ===
 
Decorate buffers using more than regular expressions, such as overlines for functions, highlight header files Emacs can't find.
 
Decorate buffers using more than regular expressions, such as overlines for functions, highlight header files Emacs can't find.
== Smart Bookmarking ==
+
=== Smart Bookmarking ===
 
Emacs tracks what you edit, and allows quick navigation by name.
 
Emacs tracks what you edit, and allows quick navigation by name.
== Highlight bad code ==
+
=== Highlight bad code ===
 
text which does not fit the language is underlined.
 
text which does not fit the language is underlined.
== Charting ==
+
=== Charting ===
 
Draw a chart of some things semantic can quantify.
 
Draw a chart of some things semantic can quantify.
== Analyzer ==
+
=== Analyzer ===
 
Examines code, and references those names against a database of pre-parsed files to provide detailed information.
 
Examines code, and references those names against a database of pre-parsed files to provide detailed information.
 
= Basic setup =
 
 
<source lang="lisp">
 
</source>
 
  
 
= Helpful keybindings =
 
= Helpful keybindings =
Line 79: Line 73:
 
= Project Pages =
 
= Project Pages =
 
* [http://cedet.sourceforge.net/semantic.shtml Project Site]
 
* [http://cedet.sourceforge.net/semantic.shtml Project Site]
* [http://www.randomsample.de/cedetdocs/semantic/semantic/ Official Manual]
+
* [http://www.gnu.org/software/emacs/manual/html_node/semantic/index.html#Top Official Manual]
 
 
= Tutorial Pages =
 
 
 
* [http://alexott.net/en/writings/emacs-devenv/EmacsCedet.html A Gentle Introduction to CEDET]
 
 
 
[[Category:Programming]][[Category:Convenience]][[Category:Built-in Package]][[Category:CEDET]]
 

Latest revision as of 07:57, 6 November 2015

Semantic
Description infrastructure for parser based text analysis
Author David Ponce
Maintainer David Ponce
Source http://cedet.sourceforge.net/semantic.shtml

Semantic is an infrastructure for parser based text analysis in Emacs. It is a lexer, parser-generator, and parser. It is written in Emacs Lisp and is customized to the way Emacs thinks about language files, and is optimized to use Emacs' parsing capabilities.

Semantic's goal is to provide an intermediate API for authors of language agnostic tools who want to deal with languages in a generic way. It also provides a simple way for Mode Authors who are experts in their language, to provide a parser for those tool authors, without knowing anything about those tools.

Parser Infrastructure

Lexical Analyzer & Preprocessor

Converts a language into a token stream. Preprocessor support with lexical macro replacement (C/C++).

Parser

Converts a lexical token stream into a table of tags defined by the language.

Parser Generator with Bison

David Ponce has ported Bison to Emacs Lisp. New languages can be supported via the wisent parser.

Language Parsers

Parsers that have already been implemented: Emacs Lisp, Java, C/C++, C#, Python, Erlang, awk, Makefile, Scheme, HTML, Texinfo, Javascript, dot. Also: Semantic's own grammar format (.by or .wy)

Incremental parser

Reparses minimal parts of a buffer as you edit.

Idle service manager

Reparses buffers in idle time, and also call other services.

Coding Tools

Semantic supports a wide range of user interface tools.

Smart Completion

Completes symbols actually available in a given context. Some tools call this intellisense.

Speedbar Browser

Code for browsing tag lists with Speedbar.

Documentation Generator

Identifies inline documentation in source code, and can convert it to texinfo. It can also create inline documenation.

Stickyfunc mode

Locks the function declaration you are editing in the header line. (Emacs only).

Imenu

Create hierarchical imenu menus from parsed files.

Navigator

Senator is a navigator that permits simple navigation through the parsed language. It also includes token highlighting, and magic cut & paste.

Decoration Modes

Decorate buffers using more than regular expressions, such as overlines for functions, highlight header files Emacs can't find.

Smart Bookmarking

Emacs tracks what you edit, and allows quick navigation by name.

Highlight bad code

text which does not fit the language is underlined.

Charting

Draw a chart of some things semantic can quantify.

Analyzer

Examines code, and references those names against a database of pre-parsed files to provide detailed information.

Helpful keybindings

[C-n]
Move to next helm suggestion.
[C-p]
Move to previous helm suggestion.

Common Customization

See Also

Speedbar

Project Pages