%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/progmodes/ |
Current File : //usr/local/share/emacs/27.2/lisp/progmodes/antlr-mode.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\303\304\305\306#\210\307\310\311\"\210\312\313\314\315\316\317\320\321\320\322\323\324&\207" [require easymenu cc-mode put save-buffer-state-x lisp-indent-function 0 defalias antlr-c-forward-sws c-forward-sws custom-declare-group antlr nil "Major mode for ANTLR grammar files." :group languages :link (emacs-commentary-link "antlr-mode.el") (url-link "http://antlr-mode.sourceforge.net/") :prefix "antlr-"] 12) #@93 ANTLR major mode version number. Check <http://antlr-mode.sourceforge.net/> for the newest. (defconst antlr-version "2.2c" (#$ . 859)) #@269 Major mode corresponding to ANTLR's "language" option. Set via `antlr-language-alist'. The only useful place to change this buffer-local variable yourself is in `antlr-mode-hook' or in the "local variable list" near the end of the file, see `enable-local-variables'. (defvar antlr-language nil (#$ . 1001)) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\305\306\313&\210\300\314\315\316\304\305\306\317&\210\300\320\321\322\304\305\306\323&\210\300\324\325\326\304\305\306\327&\210\300\330\331\332\304\305\306\333&\210\300\334\335\336\304\305\306\337&\210\300\340\341\342\304\305\306\343&\207" [custom-declare-variable antlr-language-alist '((java-mode "Java" nil "\"Java\"" "Java") (c++-mode "C++" "\"Cpp\"" "Cpp")) "List of ANTLR's supported languages.\nEach element in this list looks like\n (MAJOR-MODE MODELINE-STRING OPTION-VALUE...)\n\nMAJOR-MODE, the major mode of the code in the grammar's actions, is the\nvalue of `antlr-language' if the first group in the string matched by\nREGEXP in `antlr-language-limit-n-regexp' is one of the OPTION-VALUEs.\nAn OPTION-VALUE of nil denotes the fallback element. MODELINE-STRING is\nalso displayed in the mode line next to \"Antlr\"." :group antlr :type (repeat (group :value (java-mode "") (function :tag "Major mode") (string :tag "Mode line string") (repeat :tag "ANTLR language option" :inline t (choice (const :tag "Default" nil) string)))) antlr-language-limit-n-regexp '(8192 . "language[ ]*=[ ]*\\(\"?[A-Z][A-Za-z_]*\"?\\)") "Used to set a reasonable value for `antlr-language'.\nLooks like (LIMIT . REGEXP). Search for REGEXP from the beginning of\nthe buffer to LIMIT and use the first group in the matched string to set\nthe language according to `antlr-language-alist'." (cons (choice :tag "Limit" (const :tag "No" nil) (integer :value 0)) regexp) antlr-action-visibility 3 "Visibility of actions when command `antlr-hide-actions' is used.\nIf nil, the actions with their surrounding braces are hidden. If a\nnumber, do not hide the braces, only hide the contents if its length is\ngreater than this number." (choice (const :tag "Completely hidden" nil) (integer :tag "Hidden if longer than" :value 3)) antlr-indent-comment 'tab "Non-nil, if the indentation should touch lines in block comments.\nIf nil, no continuation line of a block comment is changed. If t, they\nare changed according to `c-indentation-line'. When not nil and not t,\nthey are only changed by \\[antlr-indent-command]." (radio (const :tag "No" nil) (const :tag "Always" t) (sexp :tag "With TAB" :format "%t" :value tab)) antlr-tab-offset-alist '((antlr-mode nil 4 nil) (java-mode "antlr" 4 nil)) "Alist to determine whether to use ANTLR's convention for TABs.\nEach element looks like (MAJOR-MODE REGEXP TAB-WIDTH INDENT-TABS-MODE).\nThe first element whose MAJOR-MODE is nil or equal to `major-mode' and\nwhose REGEXP is nil or matches variable `buffer-file-name' is used to\nset `tab-width' and `indent-tabs-mode'. This is useful to support both\nANTLR's and Java's indentation styles. Used by `antlr-set-tabs'." (repeat (group :value (antlr-mode nil 8 nil) (choice (const :tag "All" nil) (function :tag "Major mode")) (choice (const :tag "All" nil) regexp) (integer :tag "Tab width") (boolean :tag "Indent-tabs-mode"))) antlr-indent-style "java" "If non-nil, cc-mode indentation style used for `antlr-mode'.\nSee `c-set-style' and for details, where the most interesting part in\n`c-style-alist' is the value of `c-basic-offset'." (choice (const nil) regexp) antlr-indent-item-regexp "[]}):;|&]" "Regexp matching lines which should be indented by one TAB less.\nSee `antlr-indent-line' and command \\[antlr-indent-command]." regexp antlr-indent-at-bol-alist '((java-mode . "\\(package\\|import\\)\\>") (c++-mode . "#\\(assert\\|cpu\\|define\\|endif\\|el\\(if\\|se\\)\\|i\\(dent\\|f\\(def\\|ndef\\)?\\|mport\\|nclude\\(_next\\)?\\)\\|line\\|machine\\|pragma\\|system\\|un\\(assert\\|def\\)\\|warning\\)\\>")) "Alist of regexps matching lines are indented at column 0.\nEach element in this list looks like (MODE . REGEXP) where MODE is a\nfunction and REGEXP is a regular expression.\n\nIf `antlr-language' equals to a MODE, the line starting at the first\nnon-whitespace is matched by the corresponding REGEXP, and the line is\npart of a header action, indent the line at column 0 instead according\nto the normal rules of `antlr-indent-line'." (repeat (cons (function :tag "Major mode") regexp))] 8) (defvar antlr-disabling-cc-syntactic-symbols '(statement-block-intro defun-block-intro topmost-intro statement-case-intro member-init-intro arglist-intro brace-list-intro knr-argdecl-intro inher-intro objc-method-intro block-close defun-close class-close brace-list-close arglist-close inline-close extern-lang-close namespace-close)) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\305\306\313&\210\300\314\302\315\304\305\306\307&\210\300\316\317\320\304\305\306\321&\210\300\322\302\323\304\305\306\324&\210\300\325\326\327\304\305\306\330&\207" [custom-declare-variable antlr-options-use-submenus t "Non-nil, if the major mode menu should include option submenus.\nIf nil, the menu just includes a command to insert options. Otherwise,\nit includes four submenus to insert file/grammar/rule/subrule options." :group antlr :type boolean antlr-tool-version 20701 "The version number of the Antlr tool.\nThe value is an integer of the form XYYZZ which stands for vX.YY.ZZ.\nThis variable is used to warn about non-supported options and to supply\nversion correct option values when using \\[antlr-insert-option].\n\nDon't use a number smaller than 20600 since the stored history of\nAntlr's options starts with v2.06.00, see `antlr-options-alists'. You\ncan make this variable buffer-local." integer antlr-options-auto-colon "Non-nil, if `:' is inserted with a rule or subrule options section.\nA `:' is only inserted if this value is non-nil, if a rule or subrule\noption is inserted with \\[antlr-insert-option], if there was no rule or\nsubrule options section before, and if a `:' is not already present\nafter the section, ignoring whitespace, comments and the init action." antlr-options-style nil "List of symbols which determine the style of option values.\nIf a style symbol is present, the corresponding option value is put into\nquotes, i.e., represented as a string, otherwise it is represented as an\nidentifier.\n\nThe only style symbol used in the default value of `antlr-options-alist'\nis `language-as-string'. See also `antlr-read-value'." (repeat (symbol :tag "Style symbol")) antlr-options-push-mark "Non-nil, if inserting an option should set & push mark.\nIf nil, never set mark when inserting an option with command\n\\[antlr-insert-option]. If t, always set mark via `push-mark'. If a\nnumber, only set mark if point was outside the options area before and\nthe number of lines between point and the insert position is greater\nthan this value. Otherwise, only set mark if point was outside the\noptions area before." (radio (const :tag "No" nil) (const :tag "Always" t) (integer :tag "Lines between" :value 10) (sexp :tag "If outside options" :format "%t" :value outside)) antlr-options-assign-string " = " "String containing `=' to use between option name and value.\nThis string is only used if the option to insert did not exist before\nor if there was no `=' after it. In other words, the spacing around an\nexisting `=' won't be changed when changing an option value." string] 8) #@134 Headings for the four different option kinds. The standard value is ("file" "grammar" "rule" "subrule"). See `antlr-options-alists' (defvar antlr-options-headings '("file" "grammar" "rule" "subrule") (#$ . 8534)) #@2095 Definitions for Antlr's options of all four different kinds. The value looks like (FILE GRAMMAR RULE SUBRULE) where each FILE, GRAMMAR, RULE, and SUBRULE is a list of option definitions of the corresponding kind, i.e., looks like (OPTION-DEF...). Each OPTION-DEF looks like (OPTION-NAME EXTRA-FN VALUE-SPEC...) which defines a file/grammar/rule/subrule option with name OPTION-NAME. The OPTION-NAMEs are used for the creation of the "Insert XXX Option" submenus, see `antlr-options-use-submenus', and to allow the insertion of the option name with completion when using \[antlr-insert-option]. If EXTRA-FN is a function, it is called at different phases of the insertion with arguments (PHASE OPTION-NAME). PHASE can have the values `before-input' or `after-insertion', additional phases might be defined in future versions of this mode. The phase `before-input' occurs before the user is asked to insert a value. The phase `after-insertion' occurs after the option value has been inserted. EXTRA-FN might be called with additional arguments in future versions of this mode. Each specification VALUE-SPEC looks like (VERSION READ-FN ARG...). The last VALUE-SPEC in an OPTION-DEF whose VERSION is smaller or equal to `antlr-tool-version' specifies how the user is asked for the value of the option. If READ-FN is nil, the only ARG is a string which is printed at the echo area to guide the user what to insert at point. Otherwise, READ-FN is called with arguments (INIT-VALUE ARG...) to get the new value of the option. INIT-VALUE is the old value of the option or nil. The standard value contains the following functions as READ-FN: `antlr-read-value' with ARGs = (PROMPT AS-STRING TABLE) which reads a general value, or `antlr-read-boolean' with ARGs = (PROMPT TABLE) which reads a boolean value or a member of TABLE. PROMPT is the prompt when asking for a new value. If non-nil, TABLE is a table for completion or a function evaluating to such a table. The return value is quoted if AS-STRING is non-nil and is either t or a symbol which is a member of `antlr-options-style'. (defvar antlr-options-alists '((("language" antlr-language-option-extra (20600 antlr-read-value "Generated language: " language-as-string (("Java") ("Cpp") ("HTML") ("Diagnostic"))) (20700 antlr-read-value "Generated language: " language-as-string (("Java") ("Cpp") ("HTML") ("Diagnostic") ("Sather")))) ("mangleLiteralPrefix" nil (20600 antlr-read-value "Prefix for literals (default LITERAL_): " t)) ("namespace" antlr-c++-mode-extra (20700 antlr-read-value "Wrap generated C++ code in namespace: " t)) ("namespaceStd" antlr-c++-mode-extra (20701 antlr-read-value "Replace ANTLR_USE_NAMESPACE(std) by: " t)) ("namespaceAntlr" antlr-c++-mode-extra (20701 antlr-read-value "Replace ANTLR_USE_NAMESPACE(antlr) by: " t)) ("genHashLines" antlr-c++-mode-extra (20701 antlr-read-boolean "Include #line in generated C++ code? "))) (("k" nil (20600 antlr-read-value "Lookahead depth: ")) ("importVocab" nil (20600 antlr-read-value "Import vocabulary: ")) ("exportVocab" nil (20600 antlr-read-value "Export vocabulary: ")) ("testLiterals" nil (20600 antlr-read-boolean "Test each token against literals table? ")) ("defaultErrorHandler" nil (20600 antlr-read-boolean "Generate default exception handler for each rule? ")) ("codeGenMakeSwitchThreshold" nil (20600 antlr-read-value "Min number of alternatives for `switch': ")) ("codeGenBitsetTestThreshold" nil (20600 antlr-read-value "Min size of lookahead set for bitset test: ")) ("analyzerDebug" nil (20600 antlr-read-boolean "Display debugging info during grammar analysis? ")) ("codeGenDebug" nil (20600 antlr-read-boolean "Display debugging info during code generation? ")) ("buildAST" nil (20600 antlr-read-boolean "Use automatic AST construction/transformation? ")) ("ASTLabelType" nil (20600 antlr-read-value "Class of user-defined AST node: " t)) ("charVocabulary" nil (20600 nil "Insert character vocabulary")) ("interactive" nil (20600 antlr-read-boolean "Generate interactive lexer/parser? ")) ("caseSensitive" nil (20600 antlr-read-boolean "Case significant when matching characters? ")) ("caseSensitiveLiterals" nil (20600 antlr-read-boolean "Case significant when testing literals table? ")) ("classHeaderSuffix" nil (20600 nil "Additional string for grammar class definition")) ("filter" nil (20600 antlr-read-boolean "Skip rule (the name, true or false): " antlr-grammar-tokens)) ("namespace" antlr-c++-mode-extra (20700 antlr-read-value "Wrap generated C++ code for grammar in namespace: " t)) ("namespaceStd" antlr-c++-mode-extra (20701 antlr-read-value "Replace ANTLR_USE_NAMESPACE(std) by: " t)) ("namespaceAntlr" antlr-c++-mode-extra (20701 antlr-read-value "Replace ANTLR_USE_NAMESPACE(antlr) by: " t)) ("genHashLines" antlr-c++-mode-extra (20701 antlr-read-boolean "Include #line in generated C++ code? "))) (("testLiterals" nil (20600 antlr-read-boolean "Test this token against literals table? ")) ("defaultErrorHandler" nil (20600 antlr-read-boolean "Generate default exception handler for this rule? ")) ("ignore" nil (20600 antlr-read-value "In this rule, ignore tokens of type: " nil antlr-grammar-tokens)) ("paraphrase" nil (20600 antlr-read-value "In messages, replace name of this token by: " t))) (("warnWhenFollowAmbig" nil (20600 antlr-read-boolean "Display warnings for ambiguities with FOLLOW? ")) ("generateAmbigWarnings" nil (20600 antlr-read-boolean "Display warnings for ambiguities? ")) ("greedy" nil (20700 antlr-read-boolean "Make this optional/loop subrule greedy? ")))) (#$ . 8756)) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\305\306\313&\210\300\314\315\316\304\305\306\317&\207" [custom-declare-variable antlr-tool-command "java antlr.Tool" "Command used in \\[antlr-run-tool] to run the Antlr tool.\nThis variable should include all options passed to Antlr except the\noption \"-glib\" which is automatically suggested if necessary." :group antlr :type string antlr-ask-about-save t "If not nil, \\[antlr-run-tool] asks which buffers to save.\nOtherwise, it saves all modified buffers before running without asking." boolean antlr-makefile-specification '("\n" ("GENS" "GENS%d" " \\\n ") "$(ANTLR)") "Variable to specify the appearance of the generated makefile rules.\nThis variable influences the output of \\[antlr-show-makefile-rules].\nIt looks like (RULE-SEP GEN-VAR-SPEC COMMAND).\n\nRULE-SEP is the string to separate different makefile rules. COMMAND is\na string with the command which runs the Antlr tool, it should include\nall options except the option \"-glib\" which is automatically added\nif necessary.\n\nIf GEN-VAR-SPEC is nil, each target directly consists of a list of\nfiles. If GEN-VAR-SPEC looks like (GEN-VAR GEN-VAR-FORMAT GEN-SEP), a\nMakefile variable is created for each rule target.\n\nThen, GEN-VAR is a string with the name of the variable which contains\nthe file names of all makefile rules. GEN-VAR-FORMAT is a format string\nproducing the variable of each target with substitution COUNT/%d where\nCOUNT starts with 1. GEN-SEP is used to separate long variable values." (list (string :tag "Rule separator") (choice (const :tag "Direct targets" nil) (list :tag "Variables for targets" (string :tag "Variable for all targets") (string :tag "Format for each target variable") (string :tag "Variable separator"))) (string :tag "ANTLR command"))] 8) #@620 Language dependent formats which specify generated files. Each element in this list looks like (MAJOR-MODE (VOCAB-FILE-FORMAT...) (CLASS-FILE-FORMAT...)). The element whose MAJOR-MODE is equal to `antlr-language' is used to specify the generated files which are language dependent. See variable `antlr-special-file-formats' for language independent files. VOCAB-FILE-FORMAT is a format string, it specifies with substitution VOCAB/%s the generated file for each export vocabulary VOCAB. CLASS-FILE-FORMAT is a format string, it specifies with substitution CLASS/%s the generated file for each grammar class CLASS. (defvar antlr-file-formats-alist '((java-mode ("%sTokenTypes.java") ("%s.java")) (c++-mode ("%sTokenTypes.hpp") ("%s.cpp" "%s.hpp"))) (#$ . 16164)) #@596 Language independent formats which specify generated files. The value looks like (VOCAB-FILE-FORMAT EXPANDED-GRAMMAR-FORMAT). VOCAB-FILE-FORMAT is a format string, it specifies with substitution VOCAB/%s the generated or input file for each export or import vocabulary VOCAB, respectively. EXPANDED-GRAMMAR-FORMAT is a format string, it specifies with substitution GRAMMAR/%s the constructed grammar file if the file GRAMMAR.g contains a grammar class which extends a class other than "Lexer", "Parser" or "TreeParser". See variable `antlr-file-formats-alist' for language dependent formats. (defvar antlr-special-file-formats '("%sTokenTypes.txt" "expanded%s.g") (#$ . 16938)) #@509 Formats which specify the names of unknown files. The value looks like (SUPER-GRAMMAR-FILE-FORMAT SUPER-EVOCAB-FORMAT). SUPER-GRAMMAR-FORMAT is a format string, it specifies with substitution SUPER/%s the name of a grammar file for Antlr's option "-glib" if no grammar file in the current directory defines the class SUPER or if it is defined more than once. SUPER-EVOCAB-FORMAT is a format string, it specifies with substitution SUPER/%s the name for the export vocabulary of above mentioned class SUPER. (defvar antlr-unknown-file-formats '("?%s?.g" "?%s?") (#$ . 17626)) #@134 String indicating the existence of unknown files in the Makefile. See \[antlr-show-makefile-rules] and `antlr-unknown-file-formats'. (defvar antlr-help-unknown-file-text "## The following rules contain filenames of the form\n## \"?SUPERCLASS?.g\" (and \"?SUPERCLASS?TokenTypes.txt\")\n## where SUPERCLASS is not found to be defined in any grammar file of\n## the current directory or is defined more than once. Please replace\n## these filenames by the grammar files (and their exportVocab).\n\n" (#$ . 18209)) #@172 Introduction to use with \[antlr-show-makefile-rules]. It is a format string and used with substitution DIRECTORY/%s where DIRECTORY is the name of the current directory. (defvar antlr-help-rules-intro "The following Makefile rules define the dependencies for all (non-\nexpanded) grammars in directory \"%s\".\n\nThey are stored in the kill-ring, i.e., you can insert them with C-y\ninto your Makefile. You can also invoke M-x antlr-show-makefile-rules\nfrom within a Makefile to insert them directly.\n\n\n" (#$ . 18729)) #@132 Non-nil, if a "Index" menu should be added to the menubar. If it is a string, it is used instead "Index". Requires package imenu. (custom-declare-variable 'antlr-imenu-name t '(#$ . 19261) :group 'antlr :type '(choice (const :tag "No menu" nil) (const :tag "Index menu" t) (string :tag "Other menu name"))) #@38 Keymap used in `antlr-mode' buffers. (defvar antlr-mode-map (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\312#\210\302\313\314#\210\302\315\316#\210\302\317\320#\210\302\321\322#\210\302\323\324#\210\302\325\326#\210\302\327\330#\210\302\331\332#\210\302\333\334#\210\302\335\336#\210\302\337\336#\210\302\340\336#\210\302\341\336#\210\302\342\336#\210\302\343\336#\210\302\344\336#\210\302\345\336#\210)\207" [map make-sparse-keymap define-key " " antlr-indent-command "" antlr-beginning-of-rule "" antlr-end-of-rule "" antlr-beginning-of-body "" antlr-end-of-body "" c-forward-into-nomenclature "" c-backward-into-nomenclature "" comment-region "" antlr-hide-actions "" antlr-run-tool "" antlr-insert-option "a" c-beginning-of-statement "e" c-end-of-statement ":" antlr-electric-character ";" "|" "&" "(" ")" "{" "}"] 4) (#$ . 19575)) #@18 Major mode menu. (defvar antlr-mode-menu nil (#$ . 20494)) (byte-code "\303\304\305\306\307 \203( \n\310Y\203( \311\312\313E\314\312\315E\316\312\317E\320\312\321E\322BBBB\202) \323\324\"B$\210\325\326\327\330\331\332\333\334&\207" [antlr-mode-map antlr-options-use-submenus emacs-major-version easy-menu-do-define antlr-mode-menu "Major mode menu." "Antlr" append 21 "Insert File Option" :filter #[(x) "\301\302\"\207" [x antlr-options-menu-filter 1] 3] "Insert Grammar Option" #[(x) "\301\302\"\207" [x antlr-options-menu-filter 2] 3] "Insert Rule Option" #[(x) "\301\302\"\207" [x antlr-options-menu-filter 3] 3] "Insert Subrule Option" #[(x) "\301\302\"\207" [x antlr-options-menu-filter 4] 3] ("---") (["Insert Option" antlr-insert-option :active (not buffer-read-only)]) (("Forward/Backward" ["Backward Rule" antlr-beginning-of-rule t] ["Forward Rule" antlr-end-of-rule t] ["Start of Rule Body" antlr-beginning-of-body :active (antlr-inside-rule-p)] ["End of Rule Body" antlr-end-of-body :active (antlr-inside-rule-p)] "---" ["Backward Statement" c-beginning-of-statement t] ["Forward Statement" c-end-of-statement t] ["Backward Into Nomencl." c-backward-into-nomenclature t] ["Forward Into Nomencl." c-forward-into-nomenclature t]) ["Indent Region" indent-region :active (and (not buffer-read-only) (c-region-is-active-p))] ["Comment Out Region" comment-region :active (and (not buffer-read-only) (c-region-is-active-p))] ["Uncomment Region" (comment-region (region-beginning) (region-end) '(4)) :active (and (not buffer-read-only) (c-region-is-active-p))] "---" ["Hide Actions (incl. Args)" antlr-hide-actions t] ["Hide Actions (excl. Args)" (antlr-hide-actions 2) t] ["Unhide All Actions" (antlr-hide-actions 0) t] "---" ["Run Tool on Grammar" antlr-run-tool t] ["Show Makefile Rules" antlr-show-makefile-rules t] "---" ["Customize Antlr" (customize-group 'antlr) t]) custom-declare-variable antlr-font-lock-maximum-decoration 'inherit "The maximum decoration level for fontifying actions.\nValue `none' means, do not fontify actions, just normal grammar code\naccording to `antlr-font-lock-additional-keywords'. Value `inherit'\nmeans, use value of `font-lock-maximum-decoration'. Any other value is\ninterpreted as in `font-lock-maximum-decoration' with no level-0\nfontification, see `antlr-font-lock-keywords-alist'.\n\nWhile calculating the decoration level for actions, `major-mode' is\nbound to `antlr-language'. For example, with value\n ((java-mode . 2) (c++-mode . 0))\nJava actions are fontified with level 2 and C++ actions are not\nfontified at all." :group antlr :type (choice (const :tag "None" none) (const :tag "Inherit" inherit) (const :tag "Default" nil) (const :tag "Maximum" t) (integer :tag "Level" 1) (repeat :menu-tag "Mode specific" :tag "Mode specific" :value ((t . t)) (cons :tag "Instance" (radio :tag "Mode" (const :tag "All" t) (symbol :tag "Name")) (radio :tag "Decoration" (const :tag "Default" nil) (const :tag "Maximum" t) (integer :tag "Level" 1)))))] 12) #@81 Empty font-lock keywords for actions. Do not change the value of this constant. (defconst antlr-no-action-keywords nil (#$ . 23510)) #@348 List of font-lock keywords for actions in the grammar. Each element in this list looks like (MAJOR-MODE KEYWORD...) If `antlr-language' is equal to MAJOR-MODE, the KEYWORDs are the font-lock keywords according to `font-lock-defaults' used for the code in the grammar's actions and semantic predicates, see `antlr-font-lock-maximum-decoration'. (defvar antlr-font-lock-keywords-alist '((java-mode antlr-no-action-keywords java-font-lock-keywords-1 java-font-lock-keywords-2 java-font-lock-keywords-3) (c++-mode antlr-no-action-keywords c++-font-lock-keywords-1 c++-font-lock-keywords-2 c++-font-lock-keywords-3)) (#$ . 23650)) (byte-code "\300\301\302\303\304\305%\210\300\306\307\310\304\305%\210\300\311\312\313\304\305%\210\300\314\315\316\304\305%\210\300\317\320\321\304\305%\210\300\322\323\324\304\305%\210\300\325\326\327\304\305%\210\300\330\331\332\304\305%\210\333\334\335\336\304\305\337\340&\207" [custom-declare-face antlr-default ((t nil)) "Face to prevent strings from language dependent highlighting.\nDo not change." :group antlr antlr-keyword ((((class color) (background light)) (:foreground "black" :weight bold)) (t :inherit font-lock-keyword-face)) "ANTLR keywords." antlr-syntax ((((class color) (background light)) (:foreground "black" :weight bold)) (t :inherit font-lock-constant-face)) "ANTLR syntax symbols like :, |, (, ), ...." antlr-ruledef ((((class color) (background light)) (:foreground "blue" :weight bold)) (t :inherit font-lock-function-name-face)) "ANTLR rule references (definition)." antlr-tokendef ((((class color) (background light)) (:foreground "blue" :weight bold)) (t :inherit font-lock-function-name-face)) "ANTLR token references (definition)." antlr-ruleref ((((class color) (background light)) (:foreground "blue4")) (t :inherit font-lock-type-face)) "ANTLR rule references (usage)." antlr-tokenref ((((class color) (background light)) (:foreground "orange4")) (t :inherit font-lock-type-face)) "ANTLR token references (usage)." antlr-literal ((((class color) (background light)) (:foreground "brown4" :weight bold)) (t :inherit font-lock-string-face)) "ANTLR special literal tokens.\nIt is used to highlight strings matched by the first regexp group of\n`antlr-font-lock-literal-regexp'." custom-declare-variable antlr-font-lock-literal-regexp "\"\\(\\sw\\(\\sw\\|-\\)*\\)\"" "Regexp matching literals with special syntax highlighting, or nil.\nIf nil, there is no special syntax highlighting for some literals.\nOtherwise, it should be a regular expression which must contain a regexp\ngroup. The string matched by the first group is highlighted with\n`antlr-font-lock-literal-face'." :type (choice (const :tag "None" nil) regexp)] 8) #@32 Regexp matching class headers. (defvar antlr-class-header-regexp "\\(class\\)[ ]+\\([A-Za-z\300-\326\330-\337]\\sw*\\)[ ]+\\(extends\\)[ ]+\\([A-Za-z\300-\326\330-\337]\\sw*\\)[ ]*;" (#$ . 26349)) #@119 Font-lock keywords for ANTLR's normal grammar code. See `antlr-font-lock-keywords-alist' for the keywords of actions. (defvar antlr-font-lock-additional-keywords (byte-code "\300\301\302\303\304B\305\306B\307\310B\311\312B\313\314B\315\316B\317\320B\257\n\207" [(antlr-invalidate-context-cache) ("\\$setType[ ]*(\\([A-Za-z\300-\326\330-\337]\\sw*\\))" (1 'antlr-tokendef)) ("\\$\\sw+" (0 'antlr-keyword)) #[(limit) "\205 \302 \"\207" [antlr-font-lock-literal-regexp limit antlr-re-search-forward] 3] ((1 'antlr-literal t)) #[(limit) "\302 \"\207" [antlr-class-header-regexp limit antlr-re-search-forward] 3] ((1 'antlr-keyword) (2 'antlr-ruledef) (3 'antlr-keyword) (4 (if (member (match-string 4) '("Lexer" "Parser" "TreeParser")) 'antlr-keyword 'font-lock-type-face))) #[(limit) "\301\302\"\207" [limit antlr-re-search-forward "\\<\\(header\\|options\\|tokens\\|exception\\|catch\\|returns\\)\\>"] 3] ((1 'antlr-keyword)) #[(limit) "\301\302\"\207" [limit antlr-re-search-forward "^\\(private\\|public\\|protected\\)\\>[ ]*\\(\\(\\sw+[ ]*\\(:\\)?\\)\\)?"] 3] ((1 'font-lock-type-face) (3 (if (antlr-upcase-p (char-after (match-beginning 3))) 'antlr-tokendef 'antlr-ruledef) nil t) (4 'antlr-syntax nil t)) #[(limit) "\301\302\"\207" [limit antlr-re-search-forward "^\\(\\sw+\\)[ ]*\\(:\\)?"] 3] ((1 (if (antlr-upcase-p (char-after (match-beginning 0))) 'antlr-tokendef 'antlr-ruledef) nil t) (2 'antlr-syntax nil t)) #[(limit) "\301\302\"\207" [limit antlr-re-search-forward "\\(\\sw+\\)[ ]*\\([=:]\\)?"] 3] ((1 (if (match-beginning 2) (if (eq (char-after (match-beginning 2)) 61) 'antlr-default 'font-lock-variable-name-face) (if (antlr-upcase-p (char-after (match-beginning 1))) 'antlr-tokenref 'antlr-ruleref))) (2 'antlr-default nil t)) #[(limit) "\301\302\"\207" [limit antlr-re-search-forward "[|&:;(~]\\|)\\([*+?]\\|=>\\)?"] 3] ((0 'antlr-syntax))] 11) (#$ . 26557)) #@137 Font-lock defaults used for ANTLR syntax highlighting. The SYNTAX-ALIST element is also used to initialize `antlr-action-syntax-table'. (defvar antlr-font-lock-defaults '(antlr-font-lock-keywords nil nil ((95 . "w") (40 . ".") (41 . ".")) beginning-of-defun) (#$ . 28454)) #@30 Hook called by `antlr-mode'. (defvar antlr-mode-hook nil (#$ . 28733)) #@96 Syntax table used in `antlr-mode' buffers. If non-nil, it will be initialized in `antlr-mode'. (defvar antlr-mode-syntax-table (byte-code "\301 \302!\210)\207" [st make-syntax-table c-populate-syntax-table] 2) (#$ . 28810)) #@293 Syntax table used for ANTLR action parsing. Initialized by `antlr-mode-syntax-table', changed by SYNTAX-ALIST in `antlr-font-lock-defaults'. This table should be selected if you use `buffer-syntactic-context' and `buffer-syntactic-context-depth' in order not to confuse their context_cache. (defvar antlr-action-syntax-table (byte-code "\304!\305 8\n\203 \306\n@@\n@A#\210\nA\211\204\f *\207" [antlr-mode-syntax-table antlr-font-lock-defaults slist st copy-syntax-table 3 modify-syntax-entry] 5) (#$ . 29044)) #@50 Abbreviation table used in `antlr-mode' buffers. (defvar antlr-mode-abbrev-table nil (#$ . 29568)) (define-abbrev-table 'antlr-mode-abbrev-table nil) #@138 If value is a bound symbol, cache will be used even with text changes. This is no user option. Used for `antlr-slow-syntactic-context'. (defvar antlr-slow-cache-enabling-symbol 'loudly (#$ . 29725)) #@109 Maximum distance between `point' and cache position for cache use. Used for `antlr-slow-syntactic-context'. (defvar antlr-slow-cache-diff-threshold 5000 (#$ . 29932)) #@45 Evaluate BODY with the syntax table SYNTAB. (defalias 'antlr-with-syntax-table '(macro . #[(syntab &rest body) "\302\303\304\305\306D BB\307BBE\207" [syntab body let ((stab (syntax-table))) unwind-protect progn set-syntax-table ((set-syntax-table stab))] 6 (#$ . 30105)])) (byte-code "\300\301\302\303#\210\300\301\304\305#\210\306\307\310\311!\203 \311\202 \312\"\210\306\313\310\314!\203' \314\202( \315\"\210\306\316\310\317!\2036 \317\2027 \320\"\207" [put antlr-with-syntax-table lisp-indent-function 1 edebug-form-spec (form body) defalias antlr-default-directory fboundp default-directory #[nil "\207" [default-directory] 1 "Return `default-directory'."] antlr-read-shell-command read-shell-command #[(prompt &optional initial-input history) "\303 \304\211\n\206\n \305%\207" [prompt initial-input history read-from-minibuffer nil shell-command-history] 6 "Read a string from the minibuffer, using `shell-command-history'."] antlr-with-displaying-help-buffer with-displaying-help-buffer #[(thunk &optional _name) "r\306\307!q\210p\310 \210 \311\211\312\211\312\313 \210\314\315!\210+\211\212 )\316!\210+\207" [default-directory #:old-dir buffer-read-only buffer-file-name buffer-undo-list inhibit-modification-hooks get-buffer-create "*Help*" kill-all-local-variables nil t erase-buffer run-hooks temp-buffer-setup-hook internal-temp-output-buffer-show inhibit-read-only #:buf standard-output thunk] 4 "Make a help buffer and call `thunk' there."]] 4) #@11 Internal. (defvar antlr-slow-context-cache nil (#$ . 31592)) #@63 Invalidate context cache for syntactical context information. (defalias 'antlr-invalidate-context-cache #[(&rest _dummies) "\301\211\207" [antlr-slow-context-cache nil] 2 (#$ . 31659)]) #@259 Return some syntactic context information. Return `string' if point is within a string, `block-comment' or `comment' is point is within a comment or the depth within all parenthesis-syntax delimiters at point otherwise. WARNING: this may alter `match-data'. (defalias 'antlr-syntactic-context #[nil "`\306\211\307!\206 \310 A\203F \f A@Z\211\311Y\203F W\203F p @@=\203F @A=\203F \312 A@\f\306\211 AA%\202[ \fY\203S \313 \210\202V eb\210\312`\f\"\fb\210 \203k \f\nB\241\210\202s p B\f\nBB\314\n8\203} \315\202\211 \316\n8\203\207 \317\202\211 \n@,\207" [antlr-slow-cache-enabling-symbol tick state diff orig antlr-slow-context-cache nil boundp buffer-modified-tick 0 parse-partial-sexp beginning-of-defun 3 string 4 comment antlr-slow-cache-diff-threshold] 6 (#$ . 31853)]) #@66 Non-nil, if CHAR is an uppercase character (if CHAR was a char). (defalias 'antlr-upcase-p #[(char) "\301X\203\f \302X\206 \303X\205 \304X\207" [char 65 90 192 223] 2 (#$ . 32651)]) #@362 Search forward from point for regular expression REGEXP. Set point to the end of the occurrence found, and return point. Return nil if no occurrence was found. Do not search within comments, strings and actions/semantic predicates. BOUND bounds the search; it is a buffer position. See also the functions `match-beginning', `match-end' and `replace-match'. (defalias 'antlr-re-search-forward #[(regexp bound) "\304\305 \n\306#\203! \307 \310\216\311 \312=\203 \313\211\202 \304*\204 ?\205' `)\207" [continue regexp bound save-match-data-internal t re-search-forward limit match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] antlr-syntactic-context 0 nil] 4 (#$ . 32846)]) #@216 Search forward from point for STRING. Set point to the end of the occurrence found, and return point. Return nil if no occurrence was found. Do not search within comments, strings and actions/semantic predicates. (defalias 'antlr-search-forward #[(string) "\302\303 \304\305#\203 \306 \307=\203 \304\211\202 \302\204 ?\205! `)\207" [continue string t search-forward nil limit antlr-syntactic-context 0] 4 (#$ . 33574)]) #@222 Search backward from point for STRING. Set point to the beginning of the occurrence found, and return point. Return nil if no occurrence was found. Do not search within comments, strings and actions/semantic predicates. (defalias 'antlr-search-backward #[(string) "\302\303 \304\305#\203 \306 \307=\203 \304\211\202 \302\204 ?\205! `)\207" [continue string t search-backward nil limit antlr-syntactic-context 0] 4 (#$ . 34010)]) #@132 Skip the next COUNT balanced expressions and the comments after it. Return position before the comments after the last expression. (defalias 'antlr-skip-sexps #[(count) "\3011\f \302`\"0\202 \210\202 \206 db\210`\303 \210\207" [count (error) scan-sexps antlr-c-forward-sws] 3 (#$ . 34454)]) (put 'antlr-skip-sexps 'byte-optimizer 'byte-compile-inline-expand) #@149 Return font-lock keywords for current buffer. See `antlr-font-lock-additional-keywords', `antlr-language' and `antlr-font-lock-maximum-decoration'. (defalias 'antlr-font-lock-keywords #[nil "\306=\203 \207\307 \310\n\311\n\f\236A\312=\203 \202 \")!\"\207" [antlr-font-lock-maximum-decoration antlr-font-lock-additional-keywords antlr-language major-mode antlr-font-lock-keywords-alist font-lock-maximum-decoration none append eval font-lock-choose-keywords inherit] 7 (#$ . 34824)]) #@52 Return alist for tokens defined in current buffer. (defalias 'antlr-grammar-tokens #[nil "\212\300\301!)\207" [antlr-imenu-create-index-function t] 2 (#$ . 35322)]) #@120 Return imenu index-alist for ANTLR grammar files. IF TOKENREFS-ONLY is non-nil, just return alist with tokenref names. (defalias 'antlr-imenu-create-index-function #[(&optional tokenrefs-only) "\306\211\307\310 \311\216\312\f!\210\313 \210eb\210\314\307!\210\203\311 \315\316!\203A \317\32011 \321` \"0\2025 \210\2028 \2069 db\210`\322 \210)\210\315!\203e \204\272 \323\324! \203\\ \325\324\224!\202^ \324\224B B\202\272 \315\326!\203\211 \317\3201y \321` \"0\202} \210\202\200 \206\201 db\210`\322 \210)\210\315\327!\203\272 \203\245 \330`f!\203\272 \323\331!C\nB\202\272 \323\331! \203\264 \325\331\224!\202\266 \331\224B\nB\332\333!\211\203 \334\307!\210\202 * \203\330 \335 \237B\n\237B\202\332 \n\237+\207" [continue classes items stab antlr-action-syntax-table count nil t syntax-table #[nil "\301!\207" [stab set-syntax-table] 2] set-syntax-table antlr-invalidate-context-cache antlr-skip-file-prelude looking-at "{" 1 (error) scan-sexps antlr-c-forward-sws match-string 2 copy-marker "p\\(ublic\\|rotected\\|rivate\\)" "\\sw+" antlr-upcase-p 0 antlr-search-forward ";" antlr-skip-exception-part "Classes" antlr-class-header-regexp tokenrefs-only imenu-use-markers] 3 (#$ . 35494)]) #@208 Skip exception part of current rule, i.e., everything after `;'. This also includes the options and tokens part of a grammar class header. If SKIP-COMMENT is non-nil, also skip the comment after that part. (defalias 'antlr-skip-exception-part #[(skip-comment) "`\304\305 \210\306\307!\2030 \310\311\3121 \313`\n\"0\202! \210\202$ \206% db\210`\305 \210)\202 \203[ \306\314!\203\312 \315\3121H \313`\n\"0\202L \210\202O \206P db\210`\305 \210)\202\312 \306\316!\203\312 \315\3121o \313`\n\"0\202s \210\202v \206w db\210`\305 \210)\306\317!\203\243 \315\3121\223 \313`\n\"0\202\227 \210\202\232 \206\233 db\210`\305 \210)\306\320!\203[ \321\3121\267 \313`\n\"0\202\273 \210\202\276 \206\277 db\210`\305 \210)\202\243 \206\320 b*\207" [class pos count skip-comment nil antlr-c-forward-sws looking-at "options\\>\\|tokens\\>" t 2 (error) scan-sexps "{" 1 "exception\\>" "\\[" "catch\\>" 3] 3 (#$ . 36713)]) #@281 Skip the file prelude: the header and file options. If SKIP-COMMENT is non-nil, also skip the comment after that part. Return the start position of the file prelude. Hack: if SKIP-COMMENT is `header-only' only skip header and return position before the comment after the header. (defalias 'antlr-skip-file-prelude #[(skip-comment) "`\211\304 \210\n\203 `\305\306!\203= \307\224\203 \310\202 \311\3121* \313`\"0\202. \210\2021 \2062 db\210`\304 \210)\202 \n\314=\203G \202s \305\315!\203k \311\3121[ \313`\"0\202_ \210\202b \206c db\210`\304 \210)\n\204r b\210 *\207" [pos pos0 skip-comment count antlr-c-forward-sws looking-at "header\\>[ ]*\\(\"\\)?" 1 3 2 (error) scan-sexps header-only "options\\>"] 4 (#$ . 37642)]) #@311 Move forward to next end of rule. Do it ARG many times. A grammar class header and the file prelude are also considered as a rule. Negative argument ARG means move back to ARGth preceding end of rule. The behavior is not defined when ARG is zero. If SKIP-COMMENT is non-nil, move to beginning of the rule. (defalias 'antlr-next-rule #[(arg skip-comment) "``\304\305!\203 `\306u\210\307\n!\210\202 \310\n!\210\311W\203\227 ` W\205, T\211\311U?\205\300 b\210\203\212 T\211\311X\203\212 \304\305!\203K `\2023 \312Y\203\204 \310\n!\311U\203q `Y\203\204 Y\203k e\202l b\210\202\204 `Y\204} ` U\203\201 e\202\202 b\210\306\211\2047 \205\300 \306u\210\307\n!\202\300 ` X\203\243 b\210\202\246 S\311U?\205\300 S\211\311Y\203\275 \313\305!\210\202\255 \307\n!*\207" [beg pos skip-comment arg antlr-search-backward ";" nil antlr-skip-exception-part antlr-skip-file-prelude 0 -1 antlr-search-forward] 3 (#$ . 38386)]) #@114 Non-nil if point is outside a grammar rule. Move to the beginning of the current rule if point is inside a rule. (defalias 'antlr-outside-rule-p #[nil "`\302\303\304\"\210o\206 `W\305 \210 \205 `V\205 b*\207" [pos between antlr-next-rule -1 nil antlr-c-forward-sws] 3 (#$ . 39334)]) #@119 Non-nil if point is inside a grammar rule. A grammar class header and the file prelude are also considered as a rule. (defalias 'antlr-inside-rule-p #[nil "\212\302 \303\216\304 !\210\305 +?\207" [stab antlr-action-syntax-table syntax-table #[nil "\301!\207" [stab set-syntax-table] 2] set-syntax-table antlr-outside-rule-p] 2 (#$ . 39632)]) #@259 Move forward to next end of rule. Do it ARG [default: 1] many times. A grammar class header and the file prelude are also considered as a rule. Negative argument ARG means move back to ARGth preceding end of rule. If ARG is zero, run `antlr-end-of-body'. (defalias 'antlr-end-of-rule #[(&optional arg) "\303U\203 \304 \207\305 \306\216\307\n!\210\310\311\"*\207" [arg stab antlr-action-syntax-table 0 antlr-end-of-body syntax-table #[nil "\301!\207" [stab set-syntax-table] 2] set-syntax-table antlr-next-rule nil] 3 (#$ . 39983) "p"]) #@268 Move backward to preceding beginning of rule. Do it ARG many times. A grammar class header and the file prelude are also considered as a rule. Negative argument ARG means move forward to ARGth next beginning of rule. If ARG is zero, run `antlr-beginning-of-body'. (defalias 'antlr-beginning-of-rule #[(&optional arg) "\303U\203 \304 \207\305 \306\216\307\n!\210\310[\311\"*\207" [arg stab antlr-action-syntax-table 0 antlr-beginning-of-body syntax-table #[nil "\301!\207" [stab set-syntax-table] 2] set-syntax-table antlr-next-rule t] 3 (#$ . 40534) "p"]) #@150 Move to position after the `;' of the current rule. A grammar class header is also considered as a rule. With optional prefix arg MSG, move to `:'. (defalias 'antlr-end-of-body #[(&optional msg) "\305 \306\216\307 !\210`\310 \203 \311\312!\210`\313\314!`W\203) \nb\210\311\f\206' \315!\210\316\317!\210\f\205I `b\210\316\320!\206<