File: antlr-mode.el.html
The Emacs package ANTLR-Mode provides: syntax highlighting for ANTLR grammar files, automatic indentation, menus containing rule/token definitions and supported options and various other things like running ANTLR from within Emacs.
For details, check <http://antlr-mode.sourceforge.net/> or, if you prefer
the manual style, follow all commands mentioned in the documentation of
antlr-mode. ANTLR is a LL(k)-based recognition tool which generates
lexers, parsers and tree transformers in Java, C++ or Sather and can be
found at <https://www.antlr.org/>.
Bug fixes, bug reports, improvements, and suggestions for the newest version are strongly appreciated.
To-do/Wish-list:
* Next Version [C-c C-w]. Produce HTML document with syntax highlighted
and hyper-links (using htmlize).
* Next Version [C-c C-u]. Insert/update special comments: each rule lists
all rules which use the current rule. With font-lock update.
* Next Version. Make hiding much more customizable.
* Planned [C-c C-j]. Jump to generated coding.
* Planned. Further support for imenu, i.e., include entries for method
definitions at beginning of grammar class.
* Planned [C-c C-p]. Pack/unpack rule/subrule & options (one/multi-line).
* Probably. Show rules/dependencies for ANT like for Makefile (does ANT
support vocabularies and grammar inheritance?), I have to look at
jde-ant.el: https://jakarta.apache.org/ant/manual/OptionalTasks/antlr.html
* Probably. Make indent-region faster, especially in actions. ELP
profiling in a class init action shows half the time is spent in
antlr-next-rule, the other half in c-guess-basic-syntax.
* Unlikely. Sather as generated language with syntax highlighting etc/.
Questions/problems: is sather-mode.el the standard mode for sather, is it
still supported, what is its relationship to eiffel3.el? Requirement:
this mode must not depend on a Sather mode.
* Unlikely. Faster syntax highlighting: sectionize the buffer into Antlr
and action code and run special highlighting functions on these regions.
Problems: code size, this mode would depend on font-lock internals.
Defined variables (43)
antlr-action-syntax-table | Syntax table used for ANTLR action parsing. |
antlr-action-visibility | Visibility of actions when command ‘antlr-hide-actions’ is used. |
antlr-ask-about-save | If not nil, M-x antlr-run-tool asks which buffers to save. |
antlr-class-header-regexp | Regexp matching class headers. |
antlr-file-formats-alist | Language dependent formats which specify generated files. |
antlr-font-lock-additional-keywords | Font-lock keywords for ANTLR’s normal grammar code. |
antlr-font-lock-defaults | Font-lock defaults used for ANTLR syntax highlighting. |
antlr-font-lock-keywords-alist | List of font-lock keywords for actions in the grammar. |
antlr-font-lock-literal-regexp | Regexp matching literals with special syntax highlighting, or nil. |
antlr-font-lock-maximum-decoration | The maximum decoration level for fontifying actions. |
antlr-help-rules-intro | Introduction to use with M-x antlr-show-makefile-rules. |
antlr-help-unknown-file-text | String indicating the existence of unknown files in the Makefile. |
antlr-imenu-name | Non-nil, if a "Index" menu should be added to the menubar. |
antlr-indent-at-bol-alist | Alist of regexps matching lines are indented at column 0. |
antlr-indent-comment | Non-nil, if the indentation should touch lines in block comments. |
antlr-indent-item-regexp | Regexp matching lines which should be indented by one TAB less. |
antlr-indent-style | If non-nil, cc-mode indentation style used for ‘antlr-mode’. |
antlr-language | Major mode corresponding to ANTLR’s "language" option. |
antlr-language-alist | List of ANTLR’s supported languages. |
antlr-language-limit-n-regexp | Used to set a reasonable value for ‘antlr-language’. |
antlr-makefile-specification | Variable to specify the appearance of the generated makefile rules. |
antlr-mode-abbrev-table | Abbreviation table used in ‘antlr-mode’ buffers. |
antlr-mode-hook | Hook called by ‘antlr-mode’. |
antlr-mode-map | Keymap used in ‘antlr-mode’ buffers. |
antlr-mode-menu | Major mode menu. |
antlr-mode-syntax-table | Syntax table used in ‘antlr-mode’ buffers. |
antlr-no-action-keywords | Empty font-lock keywords for actions. |
antlr-options-alists | Definitions for Antlr’s options of all four different kinds. |
antlr-options-assign-string | String containing ‘=’ to use between option name and value. |
antlr-options-auto-colon | Non-nil, if ‘:’ is inserted with a rule or subrule options section. |
antlr-options-headings | Headings for the four different option kinds. |
antlr-options-push-mark | Non-nil, if inserting an option should set & push mark. |
antlr-options-style | List of symbols which determine the style of option values. |
antlr-options-use-submenus | Non-nil, if the major mode menu should include option submenus. |
antlr-slow-cache-diff-threshold | Maximum distance between ‘point’ and cache position for cache use. |
antlr-slow-cache-enabling-symbol | If value is a bound symbol, cache will be used even with text changes. |
antlr-slow-context-cache | Internal. |
antlr-special-file-formats | Language independent formats which specify generated files. |
antlr-tab-offset-alist | Alist to determine whether to use ANTLR’s convention for TABs. |
antlr-tool-command | Command used in M-x antlr-run-tool to run the Antlr tool. |
antlr-tool-version | The version number of the Antlr tool. |
antlr-unknown-file-formats | Formats which specify the names of unknown files. |
antlr-version | ANTLR major mode version number. |
Defined functions (55)
Defined faces (8)
antlr-default | Face to prevent strings from language dependent highlighting. Do not change. |
antlr-keyword | ANTLR keywords. |
antlr-literal | ANTLR special literal tokens. It is used to highlight strings matched by the first regexp group of `antlr-font-lock-literal-regexp'. |
antlr-ruledef | ANTLR rule references (definition). |
antlr-ruleref | ANTLR rule references (usage). |
antlr-syntax | ANTLR syntax symbols like :, |, (, ), .... |
antlr-tokendef | ANTLR token references (definition). |
antlr-tokenref | ANTLR token references (usage). |