%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/cedet/ |
Current File : //usr/local/share/emacs/27.2/lisp/cedet/semantic.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\207" [require cedet semantic/tag semantic/lex cl-lib] 2) #@30 Current version of Semantic. (defvar semantic-version "2.2" (#$ . 526)) #@395 Non-nil if this version of Semantic does not satisfy a specific version. Arguments can be: (MAJOR MINOR &optional BETA) Values MAJOR and MINOR must be integers. BETA can be an integer, or excluded if a released version is required. It is assumed that if the current version is newer than that specified, everything passes. Exceptions occur when known incompatibilities are introduced. (defalias 'semantic-require-version #[(major minor &optional beta) "\303\304!\210\305\306\307 \n\205 \310\nPR\"\207" [major minor beta require inversion inversion-test semantic "." "beta"] 7 (#$ . 605)]) (byte-code "\300\301\302\303\304\305%\210\300\306\302\307\304\301%\210\310\311!\207" [custom-declare-group semantic nil "Parser Generator and parser framework." :group tools semantic-faces "Faces used for Semantic enabled tools." require semantic/fw] 6) #@158 Variable that defines how to parse top level items in a buffer. This variable is for internal use only, and its content depends on the external parser used. (defvar semantic--parse-table nil (#$ . 1466)) (byte-code "\300\301!\210\302\303\301\304#\207" [make-variable-buffer-local semantic--parse-table semantic-varalias-obsolete semantic-toplevel-bovine-table "23.2"] 4) #@351 Association between symbols returned, and a string. The string is used to represent a group of objects of the given type. It is sometimes useful for a language to use a different string in place of the default, even though that language will still return a symbol. For example, Java return's includes, but the string can be replaced with `Imports'. (defvar semantic-symbol->name-assoc-list '((type . "Types") (variable . "Variables") (function . "Functions") (include . "Dependencies") (package . "Provides")) (#$ . 1844)) (make-variable-buffer-local 'semantic-symbol->name-assoc-list) #@371 Like `semantic-symbol->name-assoc-list' for type parts. Some tags that have children (see `semantic-tag-children-compatibility') will want to define the names of classes of tags differently than at the top level. For example, in C++, a Function may be called a Method. In addition, there may be new types of tags that exist only in classes, such as protection labels. (defvar semantic-symbol->name-assoc-list-for-type-parts nil (#$ . 2438)) (make-variable-buffer-local 'semantic-symbol->name-assoc-list-for-type-parts) #@44 Value for `case-fold-search' when parsing. (defvar semantic-case-fold nil (#$ . 2965)) (make-variable-buffer-local 'semantic-case-fold) #@449 Function to call for each nonterminal production. Return a list of non-terminals derived from the first argument, or nil if it does not need to be expanded. Languages with compound definitions should use this function to expand from one compound symbol into several. For example, in C the definition int a, b; is easily parsed into one tag. This function should take this compound tag and turn it into two tags, one for A, and the other for B. (defvar semantic-expand-nonterminal nil (#$ . 3108)) (make-variable-buffer-local 'semantic-expand-nonterminal) #@375 A cache of the fully parsed buffer. If no significant changes have been made (based on the state) then this is returned instead of re-parsing the buffer. DO NOT USE THIS VARIABLE IN PROGRAMS. If you need a tag list, use `semantic-fetch-tags'. If you need the cached values for some reason, chances are you can add a hook to `semantic-after-toplevel-cache-change-hook'. (defvar semantic--buffer-cache nil (#$ . 3674)) (byte-code "\300\301!\210\302\303\301\304#\207" [make-variable-buffer-local semantic--buffer-cache semantic-varalias-obsolete semantic-toplevel-bovine-cache "23.2"] 4) #@43 A cached copy of unmatched syntax tokens. (defvar semantic-unmatched-syntax-cache nil (#$ . 4270)) (make-variable-buffer-local 'semantic-unmatched-syntax-cache) #@104 Non-nil if the unmatched syntax cache is out of date. This is tracked with `semantic-change-function'. (defvar semantic-unmatched-syntax-cache-check nil (#$ . 4438)) (make-variable-buffer-local 'semantic-unmatched-syntax-cache-check) #@311 When non-nil, modifications do not require a reparse. This prevents tags from being marked dirty, and it prevents top level edits from causing a cache check. Use this when writing programs that could cause a full reparse, but will not change the tag structure, such as adding or updating `top-level' comments. (defvar semantic-edits-are-safe nil (#$ . 4679)) #@579 Hooks run when Semantic detects syntax not matched in a grammar. Each individual piece of syntax (such as a symbol or punctuation character) is called with this hook when it doesn't match in the grammar, and multiple unmatched syntax elements are not grouped together. Each hook is called with one argument, which is a list of syntax tokens created by the semantic lexer. Use the functions `semantic-lex-token-start', `semantic-lex-token-end' and `semantic-lex-token-text' to get information about these tokens. The current buffer is the buffer these tokens are derived from. (defvar semantic-unmatched-syntax-hook nil (#$ . 5045)) #@250 Hooks run before a buffer is parsed for tags. It is called before any request for tags is made via the function `semantic-fetch-tags' by an application. If any hook returns a nil value, the cached value is returned immediately, even if it is empty. (defvar semantic--before-fetch-tags-hook nil (#$ . 5686)) (semantic-varalias-obsolete 'semantic-before-toplevel-bovination-hook 'semantic--before-fetch-tags-hook "23.2") #@306 Hooks run after a toplevel parse. It is not run if the toplevel parse command is called, and buffer does not need to be fully reparsed. For language specific hooks, make sure you define this as a local hook. This hook should not be used any more. Use `semantic-after-toplevel-cache-change-hook' instead. (defvar semantic-after-toplevel-bovinate-hook nil (#$ . 6112)) (make-obsolete-variable 'semantic-after-toplevel-bovinate-hook nil "23.2") #@383 Hooks run after the buffer tag list has changed. This list will change when a buffer is reparsed, or when the tag list in a buffer is cleared. It is *NOT* called if the current tag list is partially reparsed. Hook functions must take one argument, which is the new list of tags associated with this buffer. For language specific hooks, make sure you define this as a local hook. (defvar semantic-after-toplevel-cache-change-hook nil (#$ . 6562)) #@293 Hooks run before the toplevel tag cache is flushed. For language specific hooks, make sure you define this as a local hook. This hook is called before a corresponding `semantic-after-toplevel-cache-change-hook' which is also called during a flush when the cache is given a new value of nil. (defvar semantic-before-toplevel-cache-flush-hook nil (#$ . 7018)) #@41 When non-nil, dump parsing information. (custom-declare-variable 'semantic-dump-parse nil '(#$ . 7383) :group 'semantic :type 'boolean) #@57 Optional name of the parser used to parse input stream. (defvar semantic-parser-name "LL" (#$ . 7525)) (make-variable-buffer-local 'semantic-parser-name) #@55 Internal variable used by `semantic-complete-symbol'. (defvar semantic--completion-cache nil (#$ . 7685)) (make-variable-buffer-local 'semantic--completion-cache) #@34 State of the current parse tree. (defvar semantic-parse-tree-state 'needs-rebuild (#$ . 7854)) (make-variable-buffer-local 'semantic-parse-tree-state) #@186 Indicate that the current buffer is unparseable. It is also true that the parse tree will need either updating or a rebuild. This state will be changed when the user edits the buffer. (defalias 'semantic-parse-tree-unparseable '(macro . #[nil "\300\207" [(setq semantic-parse-tree-state 'unparseable)] 1 (#$ . 8012)])) #@67 Return non-nil if the current buffer has been marked unparseable. (defalias 'semantic-parse-tree-unparseable-p '(macro . #[nil "\300\207" [(eq semantic-parse-tree-state 'unparseable)] 1 (#$ . 8338)])) #@118 Indicate that the current parse tree needs to be updated. The parse tree can be updated by `semantic-parse-changes'. (defalias 'semantic-parse-tree-set-needs-update '(macro . #[nil "\300\207" [(setq semantic-parse-tree-state 'needs-update)] 1 (#$ . 8546)])) #@63 Return non-nil if the current parse tree needs to be updated. (defalias 'semantic-parse-tree-needs-update-p '(macro . #[nil "\300\207" [(eq semantic-parse-tree-state 'needs-update)] 1 (#$ . 8810)])) #@118 Indicate that the current parse tree needs to be rebuilt. The parse tree must be rebuilt by `semantic-parse-region'. (defalias 'semantic-parse-tree-set-needs-rebuild '(macro . #[nil "\300\207" [(setq semantic-parse-tree-state 'needs-rebuild)] 1 (#$ . 9016)])) #@63 Return non-nil if the current parse tree needs to be rebuilt. (defalias 'semantic-parse-tree-needs-rebuild-p '(macro . #[nil "\300\207" [(eq semantic-parse-tree-state 'needs-rebuild)] 1 (#$ . 9282)])) #@53 Indicate that the current parse tree is up to date. (defalias 'semantic-parse-tree-set-up-to-date '(macro . #[nil "\300\207" [(setq semantic-parse-tree-state nil)] 1 (#$ . 9489)])) #@57 Return non-nil if the current parse tree is up to date. (defalias 'semantic-parse-tree-up-to-date-p '(macro . #[nil "\300\207" [(null semantic-parse-tree-state)] 1 (#$ . 9676)])) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\305\306\313&\207" [custom-declare-variable semantic-inhibit-functions nil "List of functions to call with no arguments before Semantic is setup.\nIf any of these functions returns non-nil, the current buffer is not\nsetup to use Semantic." :group semantic :type hook semantic-new-buffer-setup-functions '((c-mode . semantic-default-c-setup) (c++-mode . semantic-default-c-setup) (html-mode . semantic-default-html-setup) (java-mode . wisent-java-default-setup) (js-mode . wisent-javascript-setup-parser) (python-mode . wisent-python-default-setup) (scheme-mode . semantic-default-scheme-setup) (srecode-template-mode . srecode-template-setup-parser) (texinfo-mode . semantic-default-texi-setup) (makefile-automake-mode . semantic-default-make-setup) (makefile-gmake-mode . semantic-default-make-setup) (makefile-makepp-mode . semantic-default-make-setup) (makefile-bsdmake-mode . semantic-default-make-setup) (makefile-imake-mode . semantic-default-make-setup) (makefile-mode . semantic-default-make-setup)) "Alist of functions to call to set up Semantic parsing in the buffer.\nEach element has the form (MODE . FN), where MODE is a value of\n`major-mode' for the buffer and FN is the corresponding function\nto call, with no arguments, to set up the parser.\n\nThese functions are called by `semantic-new-buffer-fcn', before\n`semantic-inhibit-functions'." (alist :key-type symbol :value-type function)] 8) #@61 Hook run when a buffer is initialized with a parsing table. (defvar semantic-init-hook nil (#$ . 11342)) #@61 Hook run when a buffer of a particular mode is initialized. (defvar semantic-init-mode-hook nil (#$ . 11453)) (make-variable-buffer-local 'semantic-init-mode-hook) #@233 Hook run when a buffer is initialized with a parsing table for DBs. This hook is for database functions which intend to swap in a tag table. This guarantees that the DB will go before other modes that require a parse of the buffer. (defvar semantic-init-db-hook nil (#$ . 11624)) (byte-code "\300\301\302\303#\210\300\304\305\303#\210\300\306\307\303#\207" [semantic-varalias-obsolete semantic-init-hooks semantic-init-hook "23.2" semantic-init-mode-hooks semantic-init-mode-hook semantic-init-db-hooks semantic-init-db-hook] 4) #@62 Raise an error if current buffer was not parsed by Semantic. (defalias 'semantic-error-if-unparsed #[nil "?\205 \301\302!\207" [semantic-new-buffer-fcn-was-run error "Buffer was not parsed by Semantic."] 2 (#$ . 12159)]) (put 'semantic-error-if-unparsed 'byte-optimizer 'byte-compile-inline-expand) #@134 Return non-nil if the unmatched syntax cache needs a refresh. That is, if it is dirty or if the current parse tree isn't up to date. (defalias 'semantic--umatched-syntax-needs-refresh-p #[nil "\206 ??\207" [semantic-unmatched-syntax-cache-check semantic-parse-tree-state] 1 (#$ . 12467)]) (put 'semantic--umatched-syntax-needs-refresh-p 'byte-optimizer 'byte-compile-inline-expand) #@211 Setup the current buffer to use Semantic. If the major mode is ready for Semantic, and no `semantic-inhibit-functions' disabled it, the current buffer is setup to use Semantic, and `semantic-init-hook' is run. (defalias 'semantic-new-buffer-fcn #[nil "\304\305\"\211\203 A \210)\n\2058 ?\2058 \306\307!?\2058 \310\311\312\313\314$\210\314\315 \210\312 \210\316\317!\210\316\320!\210\316\321!\207" [semantic-new-buffer-setup-functions entry semantic--parse-table semantic-new-buffer-fcn-was-run cl-assoc-if derived-mode-p run-hook-with-args-until-success semantic-inhibit-functions add-hook clone-indirect-buffer-hook semantic-clear-toplevel-cache nil t semantic-lex-init run-hooks semantic-init-db-hook semantic-init-hook semantic-init-mode-hook] 6 (#$ . 12859)]) #@69 For use in a hook. When only a partial reparse is needed, reparse. (defalias 'semantic-fetch-tags-fast #[nil "\3021 \303=\205\f \304 0\202 \210\202 \210 \207" [semantic-parse-tree-state semantic--buffer-cache (error) needs-update semantic-fetch-tags] 2 (#$ . 13635)]) (require 'pp) #@108 When non-nil, activate the interactive parsing debugger. Do not set this yourself. Call `semantic-debug'. (defvar semantic-edebug nil (#$ . 13929)) #@103 Copied from elp.el. Was `elp-elapsed-time'. Arguments START and END bound the time being calculated. (defalias 'semantic-elapsed-time #[(start end) "\302\303 \"!\207" [end start float-time time-subtract] 4 (#$ . 14085)]) (put 'semantic-elapsed-time 'byte-optimizer 'byte-compile-inline-expand) #@204 Parse the current buffer. Show output in a temp buffer. Optional argument CLEAR will clear the cache before parsing. If CLEAR is negative, it will do a full reparse, and also display the output buffer. (defalias 'bovinate #[(&optional clear) "\203 \304 \210\305=\203 \306\307 \310 \311\312 \313\314\315 \"!*\"\210\2038 <\2038 \247\205J \316W\205J \317\320!\210\321\322!\210\323 \210\324\n!c\210eb*\207" [clear start out end semantic-clear-toplevel-cache - -1 current-time semantic-fetch-tags message "Retrieving tags took %.2f seconds." nil float-time time-subtract 0 pop-to-buffer "*Parser Output*" require pp erase-buffer pp-to-string] 6 (#$ . 14388) "P"]) #@510 Parse STREAM, starting at the first NONTERMINAL rule. For bovine and wisent based parsers, STREAM is from the output of `semantic-lex', and NONTERMINAL is a rule in the appropriate language specific rules file. The default parser table used for bovine or wisent based parsers is `semantic--parse-table'. Must return a list: (STREAM TAGS) where STREAM is the unused elements from STREAM, and TAGS is the list of semantic tags found; usually only one tag is returned with the exception of compound statements. (defalias 'semantic-parse-stream #[(stream nonterminal) "\306\211\307\310\311!\307\204\"