[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ada-mode 0215ceee18: Update to 8.0.2 devel release; sp
From: |
Stephen Leake |
Subject: |
[elpa] externals/ada-mode 0215ceee18: Update to 8.0.2 devel release; split out gnat-compiler, gpr-mode, gpr-query |
Date: |
Tue, 1 Nov 2022 17:24:22 -0400 (EDT) |
branch: externals/ada-mode
commit 0215ceee18d7c6554b8dcbc0269c4892e0b83c83
Author: Stephen Leake <stephen_leake@stephe-leake.org>
Commit: Stephen Leake <stephen_leake@stephe-leake.org>
Update to 8.0.2 devel release; split out gnat-compiler, gpr-mode, gpr-query
---
Alire.make | 9 +
Makefile => ELPA.make | 15 +-
NEWS | 39 +
README | 30 +-
ada-build.el | 61 +-
ada-compiler-gnat.el | 837 ---
ada-core.el | 362 +-
ada-eglot.el | 243 +
ada-gnat-xref.el | 332 --
ada-mode.casing | 7 +
ada-mode.el | 551 +-
ada-mode.texi | 382 +-
ada-skel.el | 6 +-
ada_annex_p.wy | 41 +-
ada_annex_p_process_actions.adb | 1 +
ada_annex_p_process_actions.ads | 1 -
ada_annex_p_process_lalr_main.adb | 27 +-
ada_annex_p_process_lalr_main.ads | 15 +-
ada_annex_p_process_lr1_main.adb | 28 +-
ada_annex_p_process_lr1_main.ads | 17 +-
ada_annex_p_re2c.c | 492 +-
ada_mode.prj | 1 +
ada_mode_wisi_lalr_parse.ads | 8 +-
ada_mode_wisi_lr1_parse.ads | 8 +-
ada_mode_wisi_parse.gpr.gp | 150 -
build.sh | 70 +-
create_makefile_conf.sh | 19 -
gpr-indent-user-options.el | 48 -
gpr-mode.el | 429 --
gpr-mode.texi | 256 -
gpr-process.el | 148 -
gpr-query.el | 1090 ----
gpr-skel.el | 137 -
gpr.wy | 384 --
gpr_mode_wisi_parse.ads | 37 -
gpr_process_actions.adb | 418 --
gpr_process_actions.ads | 305 --
gpr_process_main.adb | 2625 ---------
gpr_process_main.ads | 31 -
gpr_query.adb | 1379 -----
gpr_re2c.c | 7693 ---------------------------
gpr_re2c_c.ads | 74 -
install.sh | 32 +-
prj.el | 37 +-
run_ada_lalr_parse.ads | 8 +-
run_ada_lr1_parse.ads | 8 +-
run_gpr_parse.ads | 35 -
wisi-ada.adb | 42 +-
wisi-ada.ads | 4 -
wisi-gpr.adb | 79 -
wisi-gpr.ads | 60 -
wisitoken-parse-lr-mckenzie_recover-ada.adb | 13 +-
52 files changed, 1382 insertions(+), 17742 deletions(-)
diff --git a/Alire.make b/Alire.make
new file mode 100644
index 0000000000..d4403436ba
--- /dev/null
+++ b/Alire.make
@@ -0,0 +1,9 @@
+# For compiling ada-mode Ada with Alire
+
+STEPHES_ADA_LIBRARY_ALIRE_PREFIX ?= $(CURDIR)/../org.stephe_leake.sal
+
+include $(STEPHES_ADA_LIBRARY_ALIRE_PREFIX)/build/alire_rules.make
+
+# Local Variables:
+# eval: (load-file "prj-eglot.el")
+# End:
diff --git a/Makefile b/ELPA.make
similarity index 68%
rename from Makefile
rename to ELPA.make
index 5e6de64bc9..ccf76b7f89 100644
--- a/Makefile
+++ b/ELPA.make
@@ -6,20 +6,12 @@
all : build_executables byte-compile
-Makefile.conf : create_makefile_conf.sh
- $(SHELL) -c ./create_makefile_conf.sh
-
-include Makefile.conf
-
-build_executables : ada_mode_wisi_parse.gpr gpr_re2c.c ada_annex_p_re2c.c force
+build_executables : ada_annex_p_re2c.c force
gprbuild -p -j8 ada_mode_wisi_parse.gpr
../wisi/wisi.gpr : ../wisi/wisi.gpr.gp
gnatprep -DELPA="yes" ../wisi/wisi.gpr.gp ../wisi/wisi.gpr
-ada_mode_wisi_parse.gpr : ada_mode_wisi_parse.gpr.gp ../wisi/wisi.gpr
- gnatprep -DELPA="yes" -DHAVE_GNAT_UTIL=$(HAVE_GNAT_UTIL)
-DHAVE_LIBADALANG=$(HAVE_LIBADALANG) $< $@
-
%.re2c : %.wy ../wisi/wisitoken-bnf-generate
../wisi/wisitoken-bnf-generate $(<F)
dos2unix -q $(*F)-process.el $(*F)_process* $(*F).re2c $(*F)_re2c_c.ads
@@ -31,10 +23,11 @@ ada_mode_wisi_parse.gpr : ada_mode_wisi_parse.gpr.gp
../wisi/wisi.gpr
../wisi/wisitoken-bnf-generate : ../wisi/wisi.gpr force
cd ../wisi; gprbuild -p -j8 -P wisi.gpr wisitoken-bnf-generate
-BYTE_COMPILE := "(progn (setq package-load-list '((wisi) (ada-mode) all))
(package-initialize)(setq byte-compile-error-on-warn t)(batch-byte-compile))"
+BYTE_COMPILE := "(progn (setq package-load-list '((wisi) (ada-mode)
(gnat-compiler) all)) (package-initialize)(setq byte-compile-error-on-warn
t)(batch-byte-compile))"
byte-compile : byte-compile-clean
cd ../wisi; emacs -Q -batch -L . --eval $(BYTE_COMPILE) *.el
- emacs -Q -batch -L . -L ../wisi --eval $(BYTE_COMPILE) *.el
+ cd ../gnat-compiler; emacs -Q -batch -L . -L ../wisi --eval
$(BYTE_COMPILE) *.el
+ emacs -Q -batch -L . -L ../wisi -L ../gnat-compiler --eval
$(BYTE_COMPILE) *.el
byte-compile-clean :
cd ..; rm -f *.elc
diff --git a/NEWS b/NEWS
index d0a598d4e3..77d1d444f3 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,45 @@ Please send ada-mode bug reports to bug-gnu-emacs@gnu.org, with
'ada-mode' in the subject. If possible, use M-x report-emacs-bug.
+* Ada Mode 8.0.2
+
+** Support building ada-mode parser with Alire.
+
+** Support using Emacs ada-mode with Emacs eglot; uses an LSP parser
+ instead of the wisi parser. Many features of ada-mode are not
+ supported by eglot; See the info manual.
+
+** gpr-query, gnat-compiler, gpr-mode each split out to a separate
+ Emacs package and Alire crate.
+
+** ada-xref-tool renamed to ada-xref-backend; now supports choice eglot.
+
+** New user configuration variables; ada-indent-backend, ada-face-backend.
+
+** Declared user configuration variable ada-language-version obsolete;
+ it is no longer used (Ada 2022 is assumed).
+
+** The default header comment is no longer inserted in new files by
+ default; you must enable auto-insert-mode to enable that. This
+ makes it easier to turn off.
+
+** ada-mode no longer sets comment-padding; to restore previous
+ behavior, add this to your ada-mode init:
+ (setq-local comment-padding " ")
+
+** ada-mode no longer sets require-final-newline; to restore previous
+ behavior, add this to your ada-mode init:
+ (setq-local require-final-newline t)
+
+** ada-build-prompt-select-prj-file now takes a filename argument; it
+ can be used to specify a project file on the Emacs command line:
+ emacs --eval "(ada-build-prompt-select-prj-file \"hello.gpr\")" hello.adb
+
+** In wisi project files, import_env_var=<name> can be used to inherit
+ an environment variable from the Emacs process.
+
+** Minor bug fixes.
+
* Ada Mode 7.3.beta
9 Jul 2022 beta testing
diff --git a/README b/README
index 9035ccef7a..4663f6294e 100644
--- a/README
+++ b/README
@@ -1,21 +1,24 @@
-Emacs Ada mode version 7.1.3
+Emacs Ada mode version 8.0.1
Ada mode provides auto-casing, fontification, navigation, and
indentation for Ada source code files.
-Cross-reference information output by the compiler is used to provide
-powerful code navigation (jump to definition, find all uses, show
-overriding, etc). By default, only the AdaCore GNAT compiler is
-supported; other compilers can be supported. Ada mode uses gpr_query
-to query compiler-generated cross reference information.
-
-Ada mode uses a parser to provide fontification, navigation, and
-indentation. The parser is implemented in Ada, is fast enough even for very
-large files (via partial parsing), and recovers from almost all syntax
+Cross-reference via Emacs xref can use an xref backend provided by the
+gpr-query package, or a language server via the eglot package; they
+must be installed separately. Ada mode uses whichever of these is
+found on PATH, defaulting to gpr-query.
+
+Ada mode uses a parser to provide fontification, single-file
+navigation, and indentation. Ada mode allows using eglot as the
+backend for these, but the current version of AdaCore
+ada_language_server only supports single and multi-file navigation.
+The wisi parser backend supports all Ada mode functions, is
+implemented in Ada, is fast enough even for very large files (via
+partial or incremental parsing), and recovers from almost all syntax
errors.
-gpr_query and the parser are provided as Ada source code that must be
-compiled and installed:
+The wisi parser is provided as Ada source code that must be compiled and
+installed, either directly or via Alire (https://alire.ada.dev/):
cd ~/.emacs.d/elpa/ada-mode-i.j.k
./build.sh
@@ -24,8 +27,7 @@ cd ~/.emacs.d/elpa/ada-mode-i.j.k
install.sh can take an option "--prefix=<dir>" to set the installation
directory.
-See ada-mode.info section Installation for more information on
-installing; you may need additional packages.
+Both shell scripts use Alire if the 'alr' executable is found in PATH.
Ada mode will be automatically loaded when you open a file
with a matching extension (default *.ads, *.adb).
diff --git a/ada-build.el b/ada-build.el
index dfc93d4703..757c7e22d4 100644
--- a/ada-build.el
+++ b/ada-build.el
@@ -27,6 +27,8 @@
;; this (they use 'make' or similar tool), so it would just get in the
;; way, particularly for fixing bugs in the core capabilities of
;; ada-mode.
+;;
+;; IMPROVME: move to wisi or gnat-compiler so gpr-mode can share *-build.
;;; History:
;;
@@ -35,7 +37,7 @@
;; Stephen Leake <stephen_leake@stephe-leake.org>.
(require 'ada-core)
-(require 'gnat-core)
+(require 'gnat-compiler)
(require 'cl-lib)
;;;; User customization
@@ -110,7 +112,7 @@ buffer file name including the directory and extension."
((string= name "gpr_file")
(when (gnat-compiler-gpr-file (ada-prj-compiler project))
- (setq value (file-name-nondirectory (gnat-compiler-gpr-file
(ada-prj-compiler project))))))
+ (setq value (gnat-compiler-gpr-file (ada-prj-compiler project)))))
)
@@ -171,48 +173,31 @@ selected, nil otherwise."
))
;;;###autoload
-(defun ada-build-prompt-select-prj-file ()
+(defun ada-build-prompt-select-prj-file (filename)
"Prompt for a project file, parse and select it.
The file must have an extension from `wisi-prj-file-extensions'.
Returns the project if a file is selected, nil otherwise."
- (interactive)
- (let (filename)
- (condition-case-unless-debug nil
- (setq filename
- (read-file-name
- "Project file: " ; prompt
- nil ; dir
- "" ; default-filename
- t ; mustmatch
- nil; initial
- (lambda (name)
- ;; this allows directories, which enables navigating
- ;; to the desired file. We just assume the user won't
- ;; return a directory.
- (or (file-accessible-directory-p name)
- (member (file-name-extension name)
wisi-prj-file-extensions)))))
- (error
- (setq filename nil))
- )
-
- (when (and filename
- (not (equal "" filename)))
-
- (unless (wisi-prj-find-function-set-p)
- ;; See comment in ada-build-require-project-file. We also do
- ;; this here because it may be the first project-related
- ;; function the user runs.
- (add-hook 'project-find-functions #'wisi-prj-find-dominating-cached)
- (add-hook 'xref-backend-functions #'wisi-prj-xref-backend))
+ (interactive (list (wisi-prompt-prj-file)))
- (let ((default-prj (ada-prj-default (file-name-nondirectory
(file-name-sans-extension filename)))))
- (wisi-prj-dtrt-parse-file filename default-prj filename
(file-name-directory filename)))
- )))
+ (when (and filename
+ (not (equal "" filename)))
+
+ (unless (wisi-prj-find-function-set-p)
+ ;; See comment in ada-build-require-project-file. We also do
+ ;; this here because it may be the first project-related
+ ;; function the user runs.
+ (add-hook 'project-find-functions #'wisi-prj-find-dominating-cached)
+ (add-hook 'xref-backend-functions #'wisi-prj-xref-backend))
+
+ (let ((default-prj (ada-prj-default (file-name-nondirectory
(file-name-sans-extension filename)))))
+ (wisi-prj-dtrt-parse-file filename default-prj filename
(file-name-directory filename)))))
(defun ada-build-create-select-default-prj ()
"Create a default project with source-path set current directory, select it."
(let* ((prj-file (expand-file-name "default_.adp" default-directory)) ;; we
assume this does not exist
- (ada-xref-tool 'gnat) ;; since we are not specifying a gpr file.
+ (ada-xref-backend
+ (if (eq ada-xref-backend 'gpr_query) 'gnat ;; since we are not
specifying a gpr file.
+ ada-xref-backend))
(project (ada-prj-default default-directory)))
;; We use buffer-file-name as the dominating file (nominally the
@@ -264,10 +249,10 @@ An error result does not change the current project."
(search-prompt
(or (setq prj (ada-build-find-select-prj-file prj))
- (setq prj (ada-build-prompt-select-prj-file))))
+ (setq prj (call-interactively
#'ada-build-prompt-select-prj-file))))
(prompt
- (setq prj (ada-build-prompt-select-prj-file)))
+ (setq prj (call-interactively #'ada-build-prompt-select-prj-file)))
(error
(user-error "no project file selected"))
diff --git a/ada-compiler-gnat.el b/ada-compiler-gnat.el
deleted file mode 100644
index 2dc3baa875..0000000000
--- a/ada-compiler-gnat.el
+++ /dev/null
@@ -1,837 +0,0 @@
-;;; ada-compiler-gnat.el --- Ada mode compiling functionality provided by GNAT
-*- lexical-binding:t -*-
-;;;
-;; GNAT is provided by AdaCore; see http://libre.adacore.com/
-;;
-;;; Copyright (C) 2012 - 2022 Free Software Foundation, Inc.
-;;
-;; Author: Stephen Leake <stephen_leake@member.fsf.org>
-;; Maintainer: Stephen Leake <stephen_leake@member.fsf.org>
-;;
-;; This file is part of GNU Emacs.
-;;
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-;;
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-;;
-;;; Usage:
-;;
-;; Emacs should enter Ada mode automatically when you load an Ada
-;; file, based on the file extension.
-;;
-;; By default, ada-mode is configured to load this file, so nothing
-;; special needs to be done to use it.
-
-(require 'ada-core)
-(require 'cl-lib)
-(require 'compile)
-(require 'gnat-core)
-(require 'wisi)
-
-;;;; compiler message handling
-
-(defconst ada-gnat-predefined-package-alist
- '(
- ("a-calend" . "Ada.Calendar")
- ("a-chahan" . "Ada.Characters.Handling")
- ("a-comlin" . "Ada.Command_Line")
- ("a-contai" . "Ada.Containers")
- ("a-direct" . "Ada.Directories")
- ("a-except" . "Ada.Exceptions")
- ("a-ioexce" . "Ada.IO_Exceptions")
- ("a-finali" . "Ada.Finalization")
- ("a-numeri" . "Ada.Numerics")
- ("a-nuflra" . "Ada.Numerics.Float_Random")
- ("a-stream" . "Ada.Streams")
- ("a-ststio" . "Ada.Streams.Stream_IO")
- ("a-string" . "Ada.Strings")
- ("a-strfix" . "Ada.Strings.Fixed")
- ("a-strmap" . "Ada.Strings.Maps")
- ("a-strunb" . "Ada.Strings.Unbounded")
- ("a-stwiun" . "Ada.Strings.Wide_Unbounded")
- ("a-textio" . "Ada.Text_IO")
- ("g-comlin" . "GNAT.Command_Line")
- ("g-dirope" . "GNAT.Directory_Operations")
- ("g-socket" . "GNAT.Sockets")
- ("i-c" . "Interfaces.C")
- ("i-cstrin" . "Interfaces.C.Strings")
- ("interfac" . "Interfaces")
- ("s-stoele" . "System.Storage_Elements")
- )
- "Alist (filename . package name) of GNAT file names for predefined Ada
packages.")
-
-(defun ada-gnat-compilation-filter ()
- "Filter to add text properties to secondary file references.
-For `compilation-filter-hook'."
- (save-excursion
- (goto-char compilation-filter-start)
-
- ;; primary references are handled by font-lock functions; see
- ;; `compilation-mode-font-lock-keywords'.
- ;;
- ;; compilation-filter might insert partial lines, or it might insert
multiple lines
- (goto-char (line-beginning-position))
- (while (not (eobp))
- ;; We don't want 'next-error' to always go to secondary
- ;; references, so we _don't_ set 'compilation-message text
- ;; property. Instead, we set 'ada-secondary-error, so
- ;; `ada-show-secondary-error' will handle it. We also set
- ;; fonts, so the user can see the reference.
-
- ;; typical secondary references look like:
- ;;
- ;; trivial_productions_test.adb:57:77: ==> in call to "Get" at \
- ;; opentoken-token-enumerated-analyzer.ads:88, instance at line 41
- ;;
- ;; c:/foo/bar/lookahead_test.adb:379:14: found type access to
"Standard.String" defined at line 379
- ;;
- ;; lookahead_test.ads:23:09: "Name" has been inherited from subprogram
at aunit-simple_test_cases.ads:47
- ;;
- ;; lalr.adb:668:37: non-visible declaration at analyzer.ads:60, instance
at parser.ads:38
- ;;
- ;; save the file from the primary reference, look for "*.ad?:nn", "at
line nnn"
-
- (let (file)
- (when (looking-at "^\\(\\(.:\\)?[^ :\n]+\\):")
- (setq file (match-string-no-properties 1)))
-
- (skip-syntax-forward "^-"); space following primary reference
-
- (while (search-forward-regexp
"\\s-\\(\\([^[:blank:]]+\\.[[:alpha:]]+\\):\\([0-9]+\\):?\\([0-9]+\\)?\\)"
- (line-end-position) t)
-
- (goto-char (match-end 0))
- (with-silent-modifications
- (compilation--put-prop 2 'font-lock-face compilation-info-face);
file
- (compilation--put-prop 3 'font-lock-face compilation-line-face);
line
- (compilation--put-prop 4 'font-lock-face compilation-line-face); col
- (put-text-property
- (match-beginning 0) (match-end 0)
- 'ada-secondary-error
- (list
- (match-string-no-properties 2); file
- (string-to-number (match-string-no-properties 3)); line
- (if (match-string 4)
- (1- (string-to-number (match-string-no-properties 4)))
- 0); column
- ))
- ))
-
- (when (search-forward-regexp "\\(at line \\)\\([0-9]+\\)"
(line-end-position) t)
- (with-silent-modifications
- (compilation--put-prop 1 'font-lock-face compilation-info-face);
"at line" instead of file
- (compilation--put-prop 2 'font-lock-face compilation-line-face);
line
- (put-text-property
- (match-beginning 1) (match-end 1)
- 'ada-secondary-error
- (list
- file
- (string-to-number (match-string-no-properties 2)); line
- 1)); column
- ))
- (forward-line 1))
- )
- ))
-
-(defun ada-gnat-debug-filter ()
- ;; call ada-gnat-compilation-filter with `compilation-filter-start' bound
- (interactive)
- (beginning-of-line)
- (let ((compilation-filter-start (point)))
- (ada-gnat-compilation-filter)))
-
-;;;;; auto fix compilation errors
-
-(defconst ada-gnat-file-name-regexp
- "\\([a-z-_.]+\\)"
- "regexp to extract a file name")
-
-(defconst ada-gnat-quoted-name-regexp
- "\"\\([[:alnum:]_.']+\\)\""
- "regexp to extract the quoted names in error messages")
-
-(defconst ada-gnat-quoted-punctuation-regexp
- "\"\\([,:;=()|]+\\)\""
- "regexp to extract quoted punctuation in error messages")
-
-(defun ada-gnat-misspelling ()
- "Return correct spelling from current compiler error.
-Prompt user if more than one."
- ;; wisi-output.adb:115:41: no selector "Productions" for type "RHS_Type"
defined at wisi.ads:77
- ;; wisi-output.adb:115:41: invalid expression in loop iterator
- ;; wisi-output.adb:115:42: possible misspelling of "Production"
- ;; wisi-output.adb:115:42: possible misspelling of "Production"
- ;;
- ;; GNAT Community 2021 adds "error: " to the above (a misspelling is never a
warning):
- ;; wisi-output.adb:115:41: error: invalid expression in loop iterator
- ;; wisi-output.adb:115:42: error: possible misspelling of "Production"
- ;; wisi-output.adb:115:42: error: possible misspelling of "Production"
- ;;
- ;; column number can vary, so only check the line number
- (save-excursion
- (let* ((start-msg (get-text-property (line-beginning-position)
'compilation-message))
- (start-line (nth 1 (compilation--message->loc start-msg)))
- done choices)
- (while (not done)
- (forward-line 1)
- (let ((msg (get-text-property (line-beginning-position)
'compilation-message)))
- (setq done (or (not msg)
- (not (equal start-line (nth 1
(compilation--message->loc msg)))))))
- (when (and (not done)
- (progn
- (skip-syntax-forward "^-")
- (forward-char 1)
- (when (looking-at "error: ")
- (goto-char (match-end 0)))
- (looking-at (concat "possible misspelling of "
ada-gnat-quoted-name-regexp))))
- (push (match-string 1) choices)))
-
- ;; return correct spelling
- (cond
- ((= 0 (length choices))
- nil)
-
- ((= 1 (length choices))
- (car choices))
-
- (t ;; multiple choices
- (completing-read "correct spelling: " choices))
- ))))
-
-(defun ada-gnat-qualified ()
- "Return qualified name from current compiler error, if there is one offered."
- (save-excursion
- (forward-line 1)
- (skip-syntax-forward "^ ")
- (when (looking-at " use fully qualified name starting with
\\([[:alnum:]_]+\\) to make")
- (match-string 1))
- ))
-
-(cl-defmethod wisi-compiler-fix-error ((_compiler gnat-compiler) source-buffer)
- (let ((start-pos (point))
- message-column
- result)
- ;; Move to start of error message text. GNAT Community 2021 puts
- ;; warning: | error: after the file:line:column; earlier compilers
- ;; only put "warning: ".
- ;;
- ;; test_incremental.adb:657:20: error: "Checks" not declared in "WisiToken"
- (skip-syntax-forward "^-") ;; file:line:column
- (forward-char 1)
- (when (looking-at "warning: \\|error: ")
- (goto-char (match-end 0)))
- (setq message-column (current-column))
-
- ;; recognize it, handle it
- (setq
- result
- (unwind-protect
- (cond
- ;; It is tempting to define an alist of (MATCH . ACTION), but
- ;; that is too hard to debug
- ;;
- ;; This list will get long, so let's impose some order.
- ;;
- ;; First expressions that start with a named regexp,
- ;; alphabetical by variable name and following string.
- ;;
- ;; Then expressions that start with a string, alphabetical by string.
- ;;
- ;; Then style errors.
-
- ((looking-at (concat ada-gnat-quoted-name-regexp " is not a component
of "))
- (save-excursion
- (let ((child-name (match-string 1))
- (correct-spelling (ada-gnat-misspelling)))
- (setq correct-spelling (match-string 1))
- (pop-to-buffer source-buffer)
- (search-forward child-name)
- (replace-match correct-spelling))
- t))
-
- ((looking-at (concat ada-gnat-quoted-name-regexp " is not visible"))
- (let* ((done nil)
- (err-msg (get-text-property (line-beginning-position)
'compilation-message))
- (file-line-struct err-msg)
- pos choices unit-name)
- ;; next line may contain a reference to where ident is
- ;; defined; if present, it will have been marked by
- ;; ada-gnat-compilation-filter:
- ;;
- ;; gnatquery.adb:255:13: error: "Has_Element" is not visible
- ;; gnatquery.adb:255:13: error: non-visible declaration at
a-convec.ads:68, instance at gnatcoll-arg_lists.ads:157
- ;; gnatquery.adb:255:13: error: non-visible declaration at
a-coorse.ads:62, instance at gnatcoll-xref.ads:912
- ;; gnatquery.adb:255:13: error: non-visible declaration at
a-coorse.ads:62, instance at gnatcoll-xref.ads:799
- ;; gnatquery.adb:255:13: error: non-visible declaration at
gnatcoll-xref.ads:314
- ;;
- ;; or the next line may contain "multiple use clauses cause hiding"
- ;;
- ;; the lines after that may contain alternate matches;
- ;; collect all, let user choose.
- ;;
- ;; However, a line that contains 'ada-secondary-error may be from
the next error message:
- ;; parser_no_recover.adb:297:60: no selector "Tree" for type
"Parser_State" defined at lists.ads:96
- (forward-line 1)
- (when (looking-at ".* multiple use clauses cause hiding")
- (forward-line 1))
- (while (not done)
- (let ((limit (1- (line-end-position))))
- ;; 1- because next compilation error is at next line beginning
- (setq done (not
- (and
- (equal file-line-struct err-msg) ;; same error
message?
- (setq pos (next-single-property-change (point)
'ada-secondary-error nil limit))
- (<= pos limit))))
- (when (not done)
- (let* ((item (get-text-property pos 'ada-secondary-error))
- (unit-file (nth 0 item))
- (prj (project-current))
- (choice (ada-compiler-ada-name-from-file-name
(wisi-prj-compiler prj) prj unit-file)))
- (unless (member choice choices) (push choice choices))
- (goto-char (1+ pos))
- (goto-char (1+ (next-single-property-change (point)
'ada-secondary-error nil limit)))
- (when (eolp)
- (forward-line 1)
- (setq file-line-struct (get-text-property (point)
'compilation-message)))
- ))
- ))
-
- (setq unit-name
- (cond
- ((= 0 (length choices)) nil)
- ((= 1 (length choices)) (car choices))
- (t ;; multiple choices
- (completing-read "package name: " choices))))
-
- (when unit-name
- (pop-to-buffer source-buffer)
- ;; We either need to add a with_clause for a package, or
- ;; prepend the package name here (or add a use clause, but I
- ;; don't want to do that automatically).
- ;;
- ;; If we need to add a with_clause, unit-name may be only
- ;; the prefix of the real package name, but in that case
- ;; we'll be back after the next compile; no way to get the
- ;; full package name (without the function/type name) now.
- ;; Note that we can't use gnat find, because the code
- ;; doesn't compile.
- (cond
- ((looking-at (concat unit-name "\\."))
- (ada-fix-add-with-clause unit-name))
- (t
- (ada-fix-insert-unit-name unit-name)
- (insert ".")))
- t) ;; success, else nil => fail
- ))
-
- ((or (looking-at (concat ada-gnat-quoted-name-regexp " is undefined"))
- (looking-at (concat ada-gnat-quoted-name-regexp " is not a
predefined library unit")))
- ;; We either need to add a with_clause for a package, or
- ;; something is spelled wrong.
- (save-excursion
- (let ((unit-name (match-string 1))
- (correct-spelling (ada-gnat-misspelling)))
- (if correct-spelling
- (progn
- (pop-to-buffer source-buffer)
- (search-forward unit-name)
- (replace-match correct-spelling))
-
- ;; else assume missing with
- (pop-to-buffer source-buffer)
- (ada-fix-add-with-clause unit-name))))
- t)
-
- ((looking-at (concat ada-gnat-quoted-name-regexp " not declared in "
ada-gnat-quoted-name-regexp))
- (save-excursion
- (let ((child-name (match-string 1))
- (partial-parent-name (match-string 2))
- (correct-spelling (ada-gnat-misspelling))
- (qualified (ada-gnat-qualified)))
- (cond
- (correct-spelling
- (pop-to-buffer source-buffer)
- (search-forward child-name)
- (replace-match correct-spelling))
-
- (qualified
- (pop-to-buffer source-buffer)
- (search-forward child-name)
- (skip-syntax-backward "w_.")
- (insert qualified "."))
-
- (t
- ;; else guess that "child" is a child package, and extend the
with_clause
- (pop-to-buffer source-buffer)
- (ada-fix-extend-with-clause partial-parent-name child-name))))
- t))
-
- ((looking-at (concat ada-gnat-quoted-punctuation-regexp
- " should be "
- ada-gnat-quoted-punctuation-regexp))
- (let ((bad (match-string-no-properties 1))
- (good (match-string-no-properties 2)))
- (pop-to-buffer source-buffer)
- (looking-at bad)
- (delete-region (match-beginning 0) (match-end 0))
- (insert good))
- t)
-
-;;;; strings
- ((looking-at (concat "aspect \"" ada-name-regexp "\" requires
'Class"))
- (pop-to-buffer source-buffer)
- (forward-word 1)
- (insert "'Class")
- t)
-
- ((looking-at (concat "\"end " ada-name-regexp ";\" expected"))
- (let ((expected-name (match-string 1)))
- (pop-to-buffer source-buffer)
- (if (looking-at (concat "end " ada-name-regexp ";"))
- (progn
- (goto-char (match-end 1)) ; just before ';'
- (delete-region (match-beginning 1) (match-end 1)))
- ;; else we have just 'end;'
- (forward-word 1)
- (insert " "))
- (insert expected-name))
- t)
-
- ((looking-at (concat "\"end loop " ada-name-regexp ";\" expected"))
- (let ((expected-name (match-string 1)))
- (pop-to-buffer source-buffer)
- (if (looking-at (concat "end loop " ada-name-regexp ";"))
- (progn
- (goto-char (match-end 1)) ; just before ';'
- (delete-region (match-beginning 1) (match-end 1)))
- ;; else we have just 'end loop;'
- (forward-word 2)
- (insert " "))
- (insert expected-name))
- t)
-
- ((looking-at "expected an access type")
- (progn
- (set-buffer source-buffer)
- (backward-char 1)
- (when (looking-at "\\.all")
- (delete-char 4)
- t)))
-
- ((looking-at (concat "expected \\(private \\)?type "
ada-gnat-quoted-name-regexp))
- (forward-line 1)
- (move-to-column message-column)
- (cond
- ((looking-at "found procedure name")
- (pop-to-buffer source-buffer)
- (forward-word 1)
- (insert "'Access")
- t)
- ((looking-at "found type access")
- (pop-to-buffer source-buffer)
- (if (looking-at "'Access")
- (kill-word 1)
- (forward-symbol 1)
- (insert ".all"))
- t)
- ((looking-at "found type .*_Access_Type")
- ;; assume just need '.all'
- (pop-to-buffer source-buffer)
- (forward-word 1)
- (insert ".all")
- t)
- ))
-
- ((looking-at "extra \".\" ignored")
- (set-buffer source-buffer)
- (delete-char 1)
- t)
-
- ((looking-at (concat "keyword " ada-gnat-quoted-name-regexp "
expected here"))
- (let ((expected-keyword (match-string 1)))
- (pop-to-buffer source-buffer)
- (insert " " expected-keyword))
- t)
-
- ((looking-at "\\(?:possible \\)?missing \"with \\([[:alnum:]_.]+\\);")
- ;; also 'possible missing "with Ada.Text_IO; use Ada.Text_IO"' -
ignoring the 'use'
- (let ((package-name (match-string-no-properties 1)))
- (pop-to-buffer source-buffer)
- ;; Could check if prefix is already with'd, extend
- ;; it. But that's not easy. This message only occurs for
- ;; compiler-provided Ada and GNAT packages.
- (ada-fix-add-with-clause package-name))
- t)
-
- ;; must be after above
- ;;
- ;; missing "end;" for "begin" at line 234
- ((looking-at "missing \"\\([^ ]+\\)\"")
- (let ((stuff (match-string-no-properties 1)))
- (set-buffer source-buffer)
- (insert (concat stuff)));; if missing ")", don't need space;
otherwise do?
- t)
-
- ((looking-at (concat "\\(?:possible \\)?misspelling of "
ada-gnat-quoted-name-regexp))
- (let ((expected-name (match-string 1)))
- (pop-to-buffer source-buffer)
- (looking-at ada-name-regexp)
- (delete-region (match-beginning 1) (match-end 1))
- (insert expected-name))
- t)
-
- ((looking-at "No legal interpretation for operator")
- (forward-line 1)
- (move-to-column message-column)
- (looking-at (concat "use clause on " ada-gnat-quoted-name-regexp))
- (let ((package (match-string 1)))
- (pop-to-buffer source-buffer)
- (ada-fix-add-use package))
- t)
-
- ((looking-at (concat "no selector " ada-gnat-quoted-name-regexp))
- ;; Check next line for spelling error.
- (save-excursion
- (let ((unit-name (match-string 1))
- (correct-spelling (ada-gnat-misspelling)))
- (when correct-spelling
- (pop-to-buffer source-buffer)
- (search-forward unit-name)
- (replace-match correct-spelling)
- t))))
-
- ((looking-at (concat "operator for \\(?:private \\)?type "
ada-gnat-quoted-name-regexp
- "\\(?: defined at " ada-gnat-file-name-regexp
"\\)?"))
- (let ((type (match-string 1))
- (package-file (match-string 2))
- ;; IMPROVEME: we'd like to handle ", instance at
- ;; <file:line:column>", but gnatcoll.xref does not
- ;; support looking up an entity by location alone; it
- ;; requires the name, and this error message does not
- ;; give the name of the instance. When we implement
- ;; adalang xref, or if the error message improves,
- ;; try again.
- (prj (project-current)))
- (when package-file
- (setq type (concat
- (ada-compiler-ada-name-from-file-name
(wisi-prj-compiler prj) prj package-file)
- "." type)))
- (pop-to-buffer source-buffer)
- (ada-fix-add-use-type type)
- t))
-
- ((looking-at "package \"Ada\" is hidden")
- (pop-to-buffer source-buffer)
- (forward-word -1)
- (insert "Standard.")
- t)
-
- ((looking-at "parentheses required for unary minus")
- (set-buffer source-buffer)
- (insert "(")
- (forward-word 1)
- (insert ")")
- t)
-
- ((looking-at "prefix of dereference must be an access type")
- (pop-to-buffer source-buffer)
- ;; point is after '.' in '.all'
- (delete-region (- (point) 1) (+ (point) 3))
- t)
-
-;;;; warnings
- ((looking-at (concat ada-gnat-quoted-name-regexp " is already
use-visible"))
- ;; just delete the 'use'; assume it's on a line by itself.
- (pop-to-buffer source-buffer)
- (beginning-of-line)
- (delete-region (point) (progn (forward-line 1) (point)))
- t)
-
- ((looking-at (concat ada-gnat-quoted-name-regexp " is not modified,
could be declared constant"))
- (pop-to-buffer source-buffer)
- (search-forward ":")
- (forward-comment (- (point-max) (point)))
- ;; "aliased" must be before "constant", so check for it
- (when (looking-at "aliased")
- (forward-word 1)
- (forward-char 1))
- (insert "constant ")
- t)
-
- ((looking-at (concat "constant " ada-gnat-quoted-name-regexp " is not
referenced"))
- (let ((constant (match-string 1)))
- (pop-to-buffer source-buffer)
- (end-of-line)
- (newline-and-indent)
- (insert "pragma Unreferenced (" constant ");"))
- t)
-
- ((looking-at (concat "formal parameter " ada-gnat-quoted-name-regexp
" is not referenced"))
- (let ((param (match-string 1))
- cache)
- (pop-to-buffer source-buffer)
- ;; Point is in a subprogram parameter list;
- ;; ada-goto-declarative-region-start goes to the package,
- ;; not the subprogram declarative_part (this is a change
- ;; from previous wisi versions).
- (setq cache (wisi-goto-statement-start))
- (while (not (eq 'IS (wisi-cache-token cache)))
- (forward-sexp)
- (setq cache (wisi-get-cache (point))))
- (forward-word)
- (newline-and-indent)
- (insert "pragma Unreferenced (" param ");"))
- t)
-
- ((looking-at (concat "formal parameter " ada-gnat-quoted-name-regexp
" is not modified"))
- (let ((mode-regexp "\"\\([in out]+\\)\"")
- new-mode
- old-mode)
- (forward-line 1)
- (search-forward-regexp
- (concat "mode could be " mode-regexp " instead of " mode-regexp))
- (setq new-mode (match-string 1))
- (setq old-mode (match-string 2))
- (pop-to-buffer source-buffer)
- (search-forward old-mode)
- (replace-match new-mode)
- (ada-align)
- )
- t)
-
- ((looking-at (concat "variable " ada-gnat-quoted-name-regexp " is not
referenced"))
- (let ((param (match-string 1)))
- (pop-to-buffer source-buffer)
- (forward-sexp);; end of declaration
- (forward-char);; skip semicolon
- (newline-and-indent)
- (insert "pragma Unreferenced (" param ");"))
- t)
-
- ((or
- (looking-at (concat "no entities of " ada-gnat-quoted-name-regexp "
are referenced"))
- (looking-at (concat "unit " ada-gnat-quoted-name-regexp " is never
instantiated"))
- (looking-at (concat "renamed constant " ada-gnat-quoted-name-regexp
" is not referenced"))
- (looking-at "redundant with clause"))
- ;; just delete the declaration; assume it's on a line by itself.
- (pop-to-buffer source-buffer)
- (beginning-of-line)
- (delete-region (point) (progn (forward-line 1) (point)))
- t)
-
- ((looking-at (concat "variable " ada-gnat-quoted-name-regexp " is
assigned but never read"))
- (let ((param (match-string 1)))
- (pop-to-buffer source-buffer)
- (wisi-goto-statement-end) ;; leaves point before semicolon
- (forward-char 1)
- (newline-and-indent)
- (insert "pragma Unreferenced (" param ");"))
- t)
-
- ((looking-at (concat "unit " ada-gnat-quoted-name-regexp " is not
referenced"))
- ;; just delete the 'with'; assume it's on a line by itself.
- (pop-to-buffer source-buffer)
- (beginning-of-line)
- (delete-region (point) (progn (forward-line 1) (point)))
- t)
-
- ((looking-at (concat "use clause for \\(package\\|type\\|private
type\\) " ada-gnat-quoted-name-regexp " \\(defined at\\|from instance at\\|has
no effect\\)"))
- ;; delete the 'use'; assume it's on a line by itself.
- (pop-to-buffer source-buffer)
- (beginning-of-line)
- (delete-region (point) (progn (forward-line 1) (point)))
- t)
-
-;;;; style errors
- ((or (looking-at "(style) \".*\" in wrong column")
- (looking-at "(style) this token should be in column"))
- (set-buffer source-buffer)
- (funcall indent-line-function)
- t)
-
- ((looking-at "(style) bad capitalization, mixed case required")
- (set-buffer source-buffer)
- (forward-word)
- (wisi-case-adjust-identifier)
- t)
-
- ((looking-at (concat "(style) bad casing of "
ada-gnat-quoted-name-regexp))
- (let ((correct (match-string-no-properties 1))
- end)
- ;; gnat leaves point on first bad character, but we need to
replace the whole word
- (set-buffer source-buffer)
- (skip-syntax-backward "w_")
- (setq end (point))
- (skip-syntax-forward "w_")
- (delete-region (point) end)
- (insert correct))
- t)
-
- ((or
- (looking-at "(style) bad column")
- (looking-at "(style) bad indentation")
- (looking-at "(style) incorrect layout"))
- (set-buffer source-buffer)
- (funcall indent-line-function)
- t)
-
- ((looking-at "(style) \"exit \\(.*\\)\" required")
- (let ((name (match-string-no-properties 1)))
- (set-buffer source-buffer)
- (forward-word 1)
- (insert (concat " " name))
- t))
-
- ((looking-at "(style) misplaced \"then\"")
- (set-buffer source-buffer)
- (delete-indentation)
- t)
-
- ((looking-at "(style) missing \"overriding\" indicator")
- (set-buffer source-buffer)
- (cond
- ((looking-at "\\(procedure\\)\\|\\(function\\)")
- (insert "overriding ")
- t)
- (t
- nil)))
-
- ((looking-at "(style) reserved words must be all lower case")
- (set-buffer source-buffer)
- (downcase-word 1)
- t)
-
- ((looking-at "(style) space not allowed")
- (set-buffer source-buffer)
- ;; Error places point on space. More than one trailing space
- ;; should be fixed by delete-trailing-whitespace in
- ;; before-save-hook, once the file is modified.
- (delete-char 1)
- t)
-
- ((looking-at "(style) space required")
- (set-buffer source-buffer)
- (insert " ")
- t)
- )));; end of setq unwind-protect cond
- (if result
- t
- (goto-char start-pos)
- nil)
- ))
-
-;;;; generic methods
-
-(cl-defmethod ada-prj-select-compiler ((_compiler gnat-compiler) _project)
- ;; These can't be in wisi-compiler-select-prj (gnat-compiler),
- ;; because that is shared with gpr-mode (and maybe others).
- (add-hook 'compilation-filter-hook 'ada-gnat-compilation-filter)
- (add-hook 'ada-syntax-propertize-hook #'ada-gnat-syntax-propertize)
-
- ;; We should call `syntax-ppss-flush-cache' here, to force ppss with
- ;; the new hook function. But that must be done in all ada-mode
- ;; buffers, which is tedious. So we're ignoring it until it becomes
- ;; a problem; normally, the compiler is selected before any Ada
- ;; files are visited, so it's not an issue.
- )
-
-(cl-defmethod ada-prj-deselect-compiler ((_compiler gnat-compiler) _project)
- (remove-hook 'ada-syntax-propertize-hook #'ada-gnat-syntax-propertize)
- (remove-hook 'compilation-filter-hook #'ada-gnat-compilation-filter)
- )
-
-(cl-defmethod ada-compiler-file-name-from-ada-name ((compiler gnat-compiler)
project ada-name)
- (let ((result nil))
-
- (while (string-match "\\." ada-name)
- (setq ada-name (replace-match "-" t t ada-name)))
-
- (setq ada-name (downcase ada-name))
-
- (with-current-buffer (gnat-run-buffer project
(gnat-compiler-run-buffer-name compiler))
- (gnat-run-no-prj
- (list
- "krunch"
- ada-name
- ;; "0" means only krunch GNAT library names
- "0"))
-
- (goto-char (point-min))
- (when ada-gnat-debug-run (forward-line 1)); skip cmd
- (setq result (buffer-substring-no-properties (line-beginning-position)
(line-end-position)))
- )
- result))
-
-(cl-defmethod ada-compiler-ada-name-from-file-name ((_compiler gnat-compiler)
_project file-name)
- (let* ((ada-name (file-name-sans-extension (file-name-nondirectory
file-name)))
- (predefined (cdr (assoc ada-name ada-gnat-predefined-package-alist))))
-
- (if predefined
- predefined
- (while (string-match "-" ada-name)
- (setq ada-name (replace-match "." t t ada-name)))
- ada-name)))
-
-(cl-defmethod ada-compiler-make-package-body ((compiler gnat-compiler) project
body-file-name)
- ;; gnatstub always creates the body in the current directory (in the
- ;; process where gnatstub is running); the -o parameter may not
- ;; contain path info. So we bind default-directory here.
- (let ((start-file (buffer-file-name))
- (opts (when (gnat-compiler-gnat-stub-opts compiler)
- (split-string (gnat-compiler-gnat-stub-opts compiler))))
- (cargs (when (gnat-compiler-gnat-stub-cargs compiler)
- (append (list "-cargs") (split-string
(gnat-compiler-gnat-stub-cargs compiler)))))
- (process-environment
- (append
- (wisi-prj-compile-env project)
- (wisi-prj-file-env project)
- (copy-sequence process-environment)))
- )
-
- ;; Make sure all relevant files are saved to disk.
- (save-some-buffers t)
-
- (with-current-buffer (gnat-run-buffer compiler
(gnat-compiler-run-buffer-name compiler))
- (let ((default-directory (file-name-directory body-file-name)))
- (gnat-run-gnat
- project
- "stub"
- (append opts (list start-file) cargs))
-
- (find-file body-file-name)
- (indent-region (point-min) (point-max))
- (save-buffer)))
- nil))
-
-(defun ada-gnat-syntax-propertize (start end)
- (goto-char start)
- (save-match-data
- (while (re-search-forward
- (concat
- "[^[:alnum:])]\\('\\)\\[[\"a-fA-F0-9]+\"\\]\\('\\)"; 1, 2:
non-ascii character literal, not attributes
- "\\|\\(\\[\"[a-fA-F0-9]+\"\\]\\)"; 3: non-ascii character in
identifier
- )
- end t)
- (cond
- ((match-beginning 1)
- (put-text-property
- (match-beginning 1) (match-end 1) 'syntax-table '(7 . ?'))
- (put-text-property
- (match-beginning 2) (match-end 2) 'syntax-table '(7 . ?')))
-
- ((match-beginning 3)
- (put-text-property
- (match-beginning 3) (match-end 3) 'syntax-table '(2 . nil)))
- )
- )))
-
-(provide 'ada-compiler-gnat)
-;; ada-compiler-gnat.el ends here
diff --git a/ada-core.el b/ada-core.el
index 2f82bc5807..d15c4d01c5 100644
--- a/ada-core.el
+++ b/ada-core.el
@@ -22,6 +22,7 @@
(require 'compile)
(require 'find-file)
+(require 'gnat-compiler)
(require 'uniquify-files)
(require 'wisi)
(require 'wisi-prj)
@@ -37,6 +38,40 @@
:type 'boolean
:group 'ada)
+(defcustom ada-process-parse-exec "ada_mode_wisi_lr1_parse"
+ "Name of executable to use for external process Ada parser.
+There are two standard choices; ada_mode_wisi_lalr_parse and
+ada_mode_wisi_lr1_parse. The LR1 version (the default) is
+slower to load on first use, but gives better error recovery."
+ :type 'string
+ :group 'ada)
+
+(defcustom ada-process-parse-exec-opts nil
+ "List of process start options for `ada-process-parse-exec'."
+ :type 'string
+ :group 'ada)
+
+(defcustom ada-face-backend
+ (cond
+ ((locate-file ada-process-parse-exec exec-path '("" ".exe")) 'wisi)
+ ((gnat-find-als nil t) 'eglot)
+ (t 'none))
+ "Face backend to use for Ada."
+ ;; Could be extended to tree-sitter, lsp-mode ...; use `other' for that.
+ :type 'symbol
+ :options '(none eglot wisi other)
+ :group 'ada)
+
+(defcustom ada-indent-backend
+ (cond
+ ((locate-file ada-process-parse-exec exec-path '("" ".exe")) 'wisi)
+ ((gnat-find-als nil t) 'eglot)
+ (t 'none))
+ "Indent backend to use for Ada."
+ :type 'symbol
+ :options '(none eglot wisi other)
+ :group 'ada)
+
(defconst ada-operator-re
"\\+\\|-\\|/\\|\\*\\*\\|\\*\\|=\\|&\\|\\_<\\(abs\\|mod\\|rem\\|and\\|not\\|or\\|xor\\)\\_>\\|<=\\|<\\|>=\\|>"
"Regexp matching Ada operator_symbol.")
@@ -50,8 +85,7 @@ Values defined by compiler packages.")
(defvar ada-syntax-propertize-hook nil
"Hook run from `ada-syntax-propertize'.
-Called by `syntax-propertize', which is called by font-lock in
-`after-change-functions'.")
+Called by `syntax-propertize'.")
(defun ada-validate-enclosing-declaration (error-on-fail parse-action)
"Call `wisi-validate-cache' on at least the declaration enclosing point."
@@ -75,13 +109,15 @@ Called by `syntax-propertize', which is called by
font-lock in
(t
(wisi-validate-cache (point-min) (point-max) error-on-fail parse-action))))
-
(defun ada-goto-declarative-region-start ()
"Goto start of declarative region containing point.
If in a statement, goto declarative region of the containing
declaration. If already in a declaration at or before a
declarative region start, goto containing region start."
(interactive)
+ (unless wisi-parser-shared
+ (user-error "ada-goto-declarative-region-start requires a syntax-tree"))
+
(ada-validate-enclosing-declaration t 'navigate)
(push-mark)
@@ -195,29 +231,16 @@ declarative region start, goto containing region start."
)))
)))
-;;;; additional ada-compiler generic interfaces
-
-(cl-defgeneric ada-compiler-file-name-from-ada-name (compiler project ada-name)
- "Return the filename that would contain the library level ADA-NAME.")
-
(defun ada-file-name-from-ada-name (ada-name)
"Return the filename in which ADA-NAME is found."
- (let ((project (ada-prj-require-prj)))
- (ada-compiler-file-name-from-ada-name (ada-prj-compiler project) project
ada-name)))
-
-(cl-defgeneric ada-compiler-ada-name-from-file-name (compiler project
file-name)
- "Return the Ada library unit name that should be found in FILE-NAME.")
-
-(cl-defgeneric ada-compiler-make-package-body (compiler project body-file-name)
- "Create a package body skeleton from a package spec.
-BODY-FILE-NAME is the file name of the body file. Current buffer
-is the package spec.")
+ ;; We don't just use gnat-compiler-* directly, because we might add
+ ;; support for some other compiler. This should probably be a wisi
+ ;; generic function.
+ (gnat-file-name-from-ada-name (wisi-prj-compiler (project-current))
ada-name))
(defun ada-make-package-body (body-file-name)
(let ((prj (ada-prj-require-prj)))
- (ada-compiler-make-package-body (ada-prj-compiler prj)
- prj
- (expand-file-name body-file-name))))
+ (gnat-make-package-body prj (expand-file-name body-file-name))))
;;;; refactor
@@ -232,9 +255,11 @@ is the package spec.")
(defun ada-refactor (action)
"Perform refactor action ACTION at point."
- (unless wisi-incremental-parse-enable
- (wisi-validate-cache (line-end-position -7) (line-end-position 7) t
'navigate))
- (wisi-refactor wisi-parser-shared action (point)))
+ ;; No overlap between wisi and als refactoring (as of Aug 2022 als 22)
+ (when wisi-parser-shared
+ (unless wisi-incremental-parse-enable
+ (wisi-validate-cache (line-end-position -7) (line-end-position 7) t
'navigate))
+ (wisi-refactor wisi-parser-shared action (point))))
(defun ada-refactor-1 ()
"Refactor Method (Object) => Object.Method.
@@ -262,18 +287,6 @@ Point must be in Object"
;; refactor-5 in ada-format-paramlist below
-(defcustom ada-language-version 'ada2012
- ;; ada-fix-error.el needs this.
- "Ada language version; one of `ada83', `ada95', `ada2005', `ada2012'.
-Only affects the keywords to highlight, not which version the
-parser accepts; the parser always accepts a superset of ada2012."
- :type '(choice (const ada83)
- (const ada95)
- (const ada2005)
- (const ada2012))
- :safe #'symbolp)
-(make-variable-buffer-local 'ada-language-version)
-
(defun ada-in-case-expression (parse-result)
"Return non-nil if point is in a case expression."
(when (wisi-in-paren-p parse-result)
@@ -313,86 +326,91 @@ PARSE-RESULT must be the result of `syntax-ppss'."
;; (info "(elisp)Parser State" "*syntax-ppss*")
(when (> (nth 0 parse-result) 0)
;; In parens.
- (cond
- (wisi-incremental-parse-enable
- (let ((node (wisi-parse-tree-query wisi-parser-shared 'node (nth 1
parse-result))))
- (eq 'formal_part
- (wisi-tree-node-id
- (wisi-parse-tree-query wisi-parser-shared 'parent
(wisi-tree-node-address node) 1)))))
-
- (t ;; not incremental parse
-
- ;; Request parse of region containing parens; that
- ;; will be expanded to include the subprogram declaration, if
- ;; any,
- (let* ((forward-sexp-function nil) ;; forward-sexp just does parens
- (start (nth 1 parse-result))
- (end (save-excursion (goto-char (nth 1 parse-result))
(forward-sexp) (point))))
- (wisi-validate-cache start end nil 'navigate)
- (let ((cache (wisi-get-cache start)))
- ;; cache is nil if the parse failed
- (when cache
- (eq 'formal_part (wisi-cache-nonterm cache)))
- )))
- )))
+ (when wisi-parser-shared
+ ;; LSP does not support this detailed query
+ (cond
+ (wisi-incremental-parse-enable
+ (let ((node (wisi-parse-tree-query wisi-parser-shared 'node (nth 1
parse-result))))
+ (eq 'formal_part
+ (wisi-tree-node-id
+ (wisi-parse-tree-query wisi-parser-shared 'parent
(wisi-tree-node-address node) 1)))))
+
+ (t ;; not incremental parse
+
+ ;; Request parse of region containing parens; that
+ ;; will be expanded to include the subprogram declaration, if
+ ;; any,
+ (let* ((forward-sexp-function nil) ;; forward-sexp just does parens
+ (start (nth 1 parse-result))
+ (end (save-excursion (goto-char (nth 1 parse-result))
(forward-sexp) (point))))
+ (wisi-validate-cache start end nil 'navigate)
+ (let ((cache (wisi-get-cache start)))
+ ;; cache is nil if the parse failed
+ (when cache
+ (eq 'formal_part (wisi-cache-nonterm cache)))
+ )))
+ ))))
-(defun ada-format-paramlist ()
- "Reformat the parameter list point is in."
- (interactive)
- (condition-case-unless-debug nil
- ;; FIXME: this aborts if missing close paren, but incremental parse can
handle that
- (wisi-goto-open-paren)
- (error
- (user-error "Not in parameter list")))
- (when (not (looking-back "^[ \t]*" (line-beginning-position)))
- ;; Left paren after code; ensure nominal spacing. See
- ;; test/ada_mode-parens.adb If_Statement.
- (delete-horizontal-space)
- (insert " "))
- (funcall indent-line-function); so reformatted list is indented properly
- (when (not wisi-incremental-parse-enable)
- ;; Force parse of current statement after indent
- (let* ((paren (point))
- (cache (wisi-goto-statement-start))
- (parse-begin (point))
- (parse-end (wisi-cache-end cache)))
- (if parse-end
- (setq parse-end (+ parse-end (wisi-cache-last (wisi-get-cache
(wisi-cache-end cache)))))
- ;; else there is a syntax error; missing end of statement
- (setq parse-end (point-max)))
- (wisi-invalidate-cache 'navigate parse-begin)
- (wisi-validate-cache parse-begin parse-end t 'navigate)
- (goto-char paren)))
- (ada-refactor ada-refactor-format-paramlist))
+ (defun ada-format-paramlist ()
+ "Reformat the parameter list point is in."
+ (interactive)
+ (when wisi-parser-shared
+ (condition-case-unless-debug nil
+ ;; IMPROVEME: this aborts if missing close paren, but incremental
parse can handle that
+ (wisi-goto-open-paren)
+ (error
+ (user-error "Not in parameter list")))
+ (when (not (looking-back "^[ \t]*" (line-beginning-position)))
+ ;; Left paren after code; ensure nominal spacing. See
+ ;; test/ada_mode-parens.adb If_Statement.
+ (delete-horizontal-space)
+ (insert " "))
+ (funcall indent-line-function); so reformatted list is indented properly
+ (when (not wisi-incremental-parse-enable)
+ ;; Force parse of current statement after indent
+ (let* ((paren (point))
+ (cache (wisi-goto-statement-start))
+ (parse-begin (point))
+ (parse-end (wisi-cache-end cache)))
+ (if parse-end
+ (setq parse-end (+ parse-end (wisi-cache-last (wisi-get-cache
(wisi-cache-end cache)))))
+ ;; else there is a syntax error; missing end of statement
+ (setq parse-end (point-max)))
+ (wisi-invalidate-cache 'navigate parse-begin)
+ (wisi-validate-cache parse-begin parse-end t 'navigate)
+ (goto-char paren)))
+ (ada-refactor ada-refactor-format-paramlist)))
;;;; fix compiler errors
-(defun ada-fix-context-clause ()
- "Return the region containing the context clause for the current buffer,
+ (defun ada-context-clause-region ()
+ "Return the region containing the context clause for the current buffer,
excluding leading pragmas."
- (wisi-validate-cache (point-min) (point-max) t 'navigate)
- (save-excursion
- (goto-char (point-min))
- (let ((begin nil)
- (end nil)
- cache)
-
- (while (not end)
- (setq cache (wisi-forward-cache))
- (cl-case (wisi-cache-nonterm cache)
- (pragma_g (wisi-goto-end-1 cache))
- (use_package_clause (wisi-goto-end-1 cache))
- ((limited_with_clause | nonlimited_with_clause)
- (when (not begin)
- (setq begin (line-beginning-position)))
- (wisi-goto-end-1 cache))
- (t
- ;; start of compilation unit
- (setq end (line-beginning-position))
- (unless begin
- (setq begin end)))
- ))
- (cons begin end)
- )))
+ ;; FIXME: rename this - no 'fix'
+ (when wisi-parser-shared
+ (wisi-validate-cache (point-min) (point-max) t 'navigate)
+ (save-excursion
+ (goto-char (point-min))
+ (let ((begin nil)
+ (end nil)
+ cache)
+
+ (while (not end)
+ (setq cache (wisi-forward-cache))
+ (cl-case (wisi-cache-nonterm cache)
+ (pragma_g (wisi-goto-end-1 cache))
+ (use_package_clause (wisi-goto-end-1 cache))
+ ((limited_with_clause | nonlimited_with_clause)
+ (when (not begin)
+ (setq begin (line-beginning-position)))
+ (wisi-goto-end-1 cache))
+ (t
+ ;; start of compilation unit
+ (setq end (line-beginning-position))
+ (unless begin
+ (setq begin end)))
+ ))
+ (cons begin end)
+ ))))
(defun ada-fix-sort-context-pred (a b)
"Predicate for `sort-subr'; sorts \"limited with\", \"private with\" last.
@@ -449,13 +467,16 @@ Returns non-nil if a should preceed b in buffer."
"Add a with_clause for PACKAGE_NAME.
If ada-fix-sort-context-clause, sort the context clauses using
sort-lines."
- (let ((context-clause (ada-fix-context-clause)))
+ ;; IMPROVEME: https://github.com/AdaCore/ada_language_server/issues/1039
+ (unless wisi-parser-shared
+ (user-error "ada-fix-add-With-clause not supported by this parser; add use
clause manually"))
+ (let ((context-clause (ada-context-clause-region)))
(when (not context-clause)
(error "no compilation unit found"))
(goto-char (cdr context-clause))
(insert "with ")
- (ada-fix-insert-unit-name package-name)
+ (gnat-insert-unit-name package-name)
(insert ";\n")
(when (and (< (car context-clause) (cdr context-clause))
@@ -463,57 +484,13 @@ sort-lines."
(ada-fix-sort-context-clause (car context-clause) (point)))
))
-(defun ada-fix-extend-with-clause (partial-parent-name child-name)
- "Assuming point is in a selected name, just before CHILD-NAME, add or
-extend a with_clause to include CHILD-NAME."
- ;; In GNAT Community 2020, point is before partial-parent-name; in
- ;; earlier gnat, it is after.
- (search-forward partial-parent-name (line-end-position) t)
- (let ((parent-name-end (point)))
- ;; Find the full parent name; skip back to whitespace, then match
- ;; the name forward.
- (skip-syntax-backward "w_.")
- (search-forward-regexp ada-name-regexp parent-name-end t)
- (let ((parent-name (match-string 0))
- (context-clause (ada-fix-context-clause)))
- (goto-char (car context-clause))
- (if (search-forward-regexp (concat "^with " parent-name ";") (cdr
context-clause) t)
- ;; found exisiting 'with' for parent; extend it
- (progn
- (forward-char -1) ; skip back over semicolon
- (insert "." child-name))
-
- ;; not found; we are in a package body, with_clause for parent is in
spec.
- ;; insert a new one
- (ada-fix-add-with-clause (concat parent-name "." child-name)))
- )))
-
-(defun ada-fix-insert-unit-name (unit-name)
- "Insert UNIT-NAME at point and capitalize it."
- ;; unit-name is normally gotten from a file-name, and is thus all lower-case.
- (let ((start-point (point))
- search-bound)
- (insert unit-name)
- (setq search-bound (point))
- (insert " ") ; separate from following words, if any, for
wisi-case-adjust-identifier
- (goto-char start-point)
- (while (search-forward "." search-bound t)
- (forward-char -1)
- (wisi-case-adjust-identifier)
- (forward-char 1))
- (goto-char search-bound)
- (wisi-case-adjust-identifier)
- (delete-char 1)))
-
(defun ada-fix-add-use-type (type)
- "Insert `use type' clause for TYPE."
+ "Insert `use all type' clause for TYPE."
+ (unless wisi-parser-shared
+ (user-error "ada-fix-add-use-type not supported by this parser; add use
clause manually"))
(ada-goto-declarative-region-start); leaves point after 'is'
(newline-and-indent)
- (cl-ecase ada-language-version
- (ada2012
- (insert "use all type "))
- ((ada83 ada95 ada2005)
- (insert "use type ")))
+ (insert "use all type ")
(let ((begin (point))
end)
(insert type ";")
@@ -526,21 +503,33 @@ extend a with_clause to include CHILD-NAME."
(defun ada-fix-add-use (package)
"Insert `use' clause for PACKAGE."
+ (unless wisi-parser-shared
+ (user-error "ada-fix-add-use not supported by this parser; add use clause
manually"))
(ada-goto-declarative-region-start); leaves point after 'is'
(newline-and-indent)
(insert "use " package ";"))
;;;; xref
-(defvar ada-xref-tool (if (locate-file "gpr_query" exec-path '("" ".exe"))
'gpr_query 'gnat)
- "Default Ada cross reference tool; can be overridden in project files.")
+(defconst ada-xref-known-backends '(gpr_query gnat eglot other)
+ "Supported xref backends.")
-(defconst ada-xref-known-tools '(gpr_query gnat)
- "Supported xref tools")
+(defcustom ada-xref-backend
+ (if (locate-file "gpr_query" exec-path '("" ".exe")) 'gpr_query 'gnat)
+ "Ada cross reference backend; can be overridden in project files."
+ :type 'symbol
+ :options ada-xref-known-backends
+ :group 'ada)
+
+(defalias 'ada-xref-tool 'ada-xref-backend)
+(make-obsolete 'ada-xref-tool 'ada-xref-backend "ada-mode version 8.0")
(defun ada-make-subprogram-body ()
"Convert subprogram specification after point into a subprogram body stub."
(interactive)
+ (unless wisi-parser-shared
+ ;; eglot/lsp does not provide access to syntax tree
+ (user-error "ada-make-subprogram-body not supported by eglot/LSP"))
(wisi-goto-statement-start)
;; point is at start of subprogram specification;
@@ -565,8 +554,7 @@ extend a with_clause to include CHILD-NAME."
;; spec. So go back to the spec, and delete the body buffer so it
;; does not get written to disk.
(let ((body-buffer (current-buffer))
- (body-file-name (buffer-file-name))
- (prj (ada-prj-require-prj)))
+ (body-file-name (buffer-file-name)))
(set-buffer-modified-p nil);; may have a skeleton; allow silent delete
@@ -574,7 +562,7 @@ extend a with_clause to include CHILD-NAME."
(kill-buffer body-buffer)
- (ada-compiler-make-package-body (ada-prj-compiler prj) prj body-file-name)
+ (ada-make-package-body body-file-name)
;; back to the new body file, read in from the disk.
(ff-find-the-other-file)
@@ -593,7 +581,7 @@ extend a with_clause to include CHILD-NAME."
name
compile-env
(compiler-label ada-compiler)
- (xref-label ada-xref-tool)
+ (xref-label ada-xref-backend)
source-path
plist
file-pred
@@ -615,7 +603,7 @@ extend a with_clause to include CHILD-NAME."
name
compile-env
(compiler-label ada-compiler)
- (xref-label ada-xref-tool)
+ (xref-label ada-xref-backend)
source-path
plist
file-pred)
@@ -660,7 +648,7 @@ If SRC-DIR is non-nil, use it as the default for
project.source-path."
(make-ada-prj
:name (or name "_default_")
:compiler-label ada-compiler
- :xref-label ada-xref-tool
+ :xref-label ada-xref-backend
:source-path (cond
((null src-dir) nil)
((listp src-dir) src-dir)
@@ -689,7 +677,6 @@ If SRC-DIR is non-nil, use it as the default for
project.source-path."
;;;###autoload
(defun ada-prj-make-compiler (label)
;; We use the autoloaded constructor here
- (require (intern (format "ada-compiler-%s" (symbol-name label))))
(funcall (intern (format "create-%s-compiler" (symbol-name label)))))
(defun ada-prj-make-xref (label)
@@ -720,19 +707,20 @@ Throw an error if current project is not an ada-prj."
(setf (ada-prj-plist project) (plist-put (ada-prj-plist project)
'obj_dir obj-dir))
))
- ((string= name "xref_tool")
+ ((string= name "xref_backend")
;; This is defined here, rather than in wisi, because the list of
;; xref tools is likely to be language-specific (but not always;
;; for example Gnu global supports many languages).
(let ((xref-label (intern value)))
- (if (memq xref-label ada-xref-known-tools)
- (progn
- (setf (ada-prj-xref-label project) xref-label)
- (setf (ada-prj-xref project) (ada-prj-make-xref xref-label)))
+ (cond
+ ((memq xref-label ada-xref-known-backends)
+ (setf (ada-prj-xref-label project) xref-label)
+ (setf (ada-prj-xref project) (ada-prj-make-xref xref-label)))
- (user-error "'%s' is not a recognized xref tool (must be one of %s)"
- xref-label ada-xref-known-tools))
- ))
+ (t
+ (user-error "'%s' is not a recognized xref backend (must be one of %s)"
+ xref-label ada-xref-known-backends))
+ )))
))
(defun ada-prj-parse-undefined (project name value)
@@ -769,18 +757,6 @@ Deselects the current project first."
(wisi-prj-select-cache prj-file (ada-prj-default "")))
(make-obsolete 'ada-select-prj-file 'wisi-prj-select-cache "ada-mode 7.0")
-(cl-defgeneric ada-prj-select-compiler (compiler project)
- "Set PROJECT options that are Ada and compiler specific.")
-
-(cl-defgeneric ada-prj-deselect-compiler (compiler project)
- "Unset any PROJECT options that are both Ada and compiler specific.")
-
-(cl-defmethod wisi-prj-select :after ((project ada-prj))
- (ada-prj-select-compiler (ada-prj-compiler project) project))
-
-(cl-defmethod wisi-prj-deselect :before ((project ada-prj))
- (ada-prj-deselect-compiler (ada-prj-compiler project) project))
-
(cl-defmethod wisi-prj-identifier-at-point ((_project ada-prj))
;; Handle adjacent operator/identifer like:
;; test/ada_mode-slices.adb
diff --git a/ada-eglot.el b/ada-eglot.el
new file mode 100644
index 0000000000..1d531940f1
--- /dev/null
+++ b/ada-eglot.el
@@ -0,0 +1,243 @@
+;;; ada-eglot.el --- Ada definitions for eglot -*- lexical-binding: t; -*-
+;;
+;; Copyright (C) 2022 Free Software Foundation, Inc.
+;;
+;; This file is part of GNU Emacs.
+;;
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+
+(require 'ada-core)
+(require 'eieio)
+(require 'eglot)
+(require 'gnat-compiler)
+(require 'wisi)
+
+(defclass eglot-ada (eglot-lsp-server)
+ ((indexing-done
+ :accessor eglot-ada-indexing-done
+ :initform nil))
+ :documentation "AdaCore's ada_language_server.")
+
+(cl-defmethod eglot-handle-notification ((server eglot-ada) (_method (eql
$/progress))
+ &key _token value &allow-other-keys)
+ "Handle notification $/progress."
+ (when (string= (plist-get value :kind) "end")
+ (setf (eglot-ada-indexing-done server) t)))
+
+(defun ada-eglot-wait-indexing-done ()
+ (let ((server (eglot-current-server)))
+ (message "waiting for ada_language_server indexing ...")
+ (while (not (eglot-ada-indexing-done server))
+ (accept-process-output))
+ (message "waiting for ada_language_server indexing ... done")
+ ))
+
+(defun ada-eglot-indent-line ()
+ "For `indent-line-function'."
+ (let ((savep (copy-marker (point)))
+ (to-indent nil))
+ (back-to-indentation)
+ (when (>= (point) savep)
+ (setq to-indent t))
+
+ ;; (1+ line-end-pos) is needed to compute indent for a line. It
+ ;; can exceed (point-max); the parser must be able to handle that.
+ ;;
+ (eglot-format (line-beginning-position) (1+ (line-end-position)))
+
+ (goto-char savep)
+ (when to-indent (back-to-indentation))
+ ))
+
+;;; startup
+(defvar ada-eglot-require-gpr nil
+ ;; Default nil to allow newbies and small projects to run without a
+ ;; gpr file; als uses a default. unit tests can set t if the gpr
+ ;; file is set after the file under test is opened.
+)
+
+(defun ada-eglot-require-eglot ()
+ "Ensure eglot is started for the current project."
+ (unless (eglot-current-server)
+ (let* ((prj (eglot--current-project)) ;; provides a default if
(current-project) is nil.
+ (process-environment (copy-sequence process-environment))
+ (gpr-file
+ (when (and (wisi-prj-p prj)
+ (gnat-compiler-p (wisi-prj-compiler prj)))
+ (gnat-compiler-gpr-file (wisi-prj-compiler prj))))
+ ;; IMPROVEME: we should be able to specify the gpr file via
+ ;; initializationOptions in the initialize method at server
+ ;; startup. But that caused a CONSTRAINT_ERROR in GNAT GPL
+ ;; 2021 and GNAT 22 als.
+ (eglot-workspace-configuration nil))
+
+ (when (wisi-prj-p prj)
+ (setq process-environment
+ (append (wisi-prj-file-env prj) ;; for GPR_PROJECT_PATH
+ process-environment)))
+
+ (when gpr-file
+ (setq eglot-workspace-configuration
+ ;; This is sent in a workspace/didChangeConfiguration message.
+ (list (list :ada (cons 'projectFile gpr-file)))))
+
+ (unless (and ada-eglot-require-gpr
+ (null gpr-file))
+
+ (eglot 'ada-mode ;; managed-major-mode
+ prj ;; project; project-root is server process
directory
+ 'eglot-ada ;; class
+ ;; IMPROVEME: see above
+ ;; (if gpr-file
+ ;; (list (gnat-find-als)
+ ;; :initializationOptions (list (list :ada (cons
'projectFile gpr-file))))
+ (list (gnat-find-als)) ;; contact
+ "Ada" ;; language-id
+ )
+
+ (when (eglot-current-server)
+ (when (eq ada-face-backend 'eglot)
+ (unless (eglot--server-capable :semanticTokensProvider :range)
+ (display-warning 'ada "LSP server does not support faces; change
ada-face-backend"))
+ (unless (boundp 'eglot-enable-semantic-tokens)
+ (display-warning 'ada "current version of eglot does not support
faces"))
+ ))
+
+ (when (eq ada-indent-backend 'eglot)
+ ;; :documentFormattingProvider does the whole file at once; not
+ ;; useful for indent-region. IMPROVEME: in als devel version? fix it!
+ (unless (plist-get (oref (eglot-current-server) capabilities)
:documentRangeFormattingProvider)
+ (display-warning 'ada "LSP server does not support line or range
indent; change ada-indent-backend"))
+
+ (setq-local indent-line-function #'ada-eglot-indent-line)
+ (setq-local indent-region-function #'eglot-format))
+ ;; We just assume the language server supports xref, completion
+ ))))
+
+;;;###autoload
+(defun ada-eglot-setup ()
+ "Configure elgot settings for Ada."
+ ;; Called from ada-mode when any ada-*-backend is eglot.
+
+ (when (null ada-eglot-require-gpr)
+ ;; The user is not using a project, so wisi-select-prj is not
+ ;; called; start eglot now. See comment in ada-mode on startup
+ ;; cases.
+ (ada-eglot-require-eglot))
+
+ (cl-ecase ada-face-backend
+ (none
+ (setq-local wisi-disable-face t))
+
+ (eglot
+ (setq-local wisi-disable-face t)
+ (when (and (boundp 'eglot-enable-semantic-tokens)
+ (boundp 'eglot-semantic-token-modifier-faces))
+ (setq eglot-enable-semantic-tokens t)
+ (when-let ((item (assoc "defaultLibrary"
eglot-semantic-token-modifier-faces)))
+ ;; No need to distinguish "Ada" from other packages.
+ (setq eglot-semantic-token-modifier-faces
+ (cl-delete item eglot-semantic-token-modifier-faces))))
+
+ ;; LSP defines Semantic Tokens for syntactic
+ ;; highlighting/font-lock. Not supported in eglot.el 1.8,
+ ;; ada_language_server 22.0. Supported in devel versions;
+ ;; https://github.com/joaotavora/eglot/issues/615
+ ;; https://github.com/AkibAzmain/eglot/tree/semantic-tokens
+ ;; https://github.com/AdaCore/ada_language_server/issues/879
+ ;;
+ ;; (setq wisi-disable-face t)
+ ;; (setq eglot-enable-semantic-tokens t)
+ ;; see the default settings in eglot-semantic-token-faces
+ )
+
+ (wisi
+ ;; wisi-setup does the work
+ (setq-local wisi-disable-face nil))
+
+ (other
+ (setq-local wisi-disable-face t))
+ )
+
+ (cl-ecase ada-indent-backend
+ (none
+ (setq-local wisi-disable-indent t))
+
+ (eglot
+ (setq-local wisi-disable-indent t)
+
+ (setq-local indent-line-function #'ada-eglot-indent-line)
+ (setq-local indent-region-function #'eglot-format))
+
+ (wisi
+ ;; wisi-setup does the work
+ (setq-local wisi-disable-indent nil))
+
+ (other
+ (setq-local wisi-disable-indent t))
+ )
+
+ (cl-ecase ada-xref-backend
+ ((gpr_query gnat)
+ (setq-local eglot-stay-out-of (default-value 'eglot-stay-out-of))
+ (add-to-list 'eglot-stay-out-of 'xref)
+ (unless (memq #'wisi-prj-xref-backend xref-backend-functions)
+ (add-hook 'xref-backend-functions #'wisi-prj-xref-backend 10 t)))
+
+ (eglot
+ ;; IMPROVEME: implement lsp backend for wisi-xref, take
+ ;; advantage of ada_language_server extensions. waiting for
+ ;; test cases.
+ (add-hook 'xref-backend-functions #'eglot-xref-backend -10 t)
+
+ ;; IMPROVEME: don't bind C-c C-d? move to gpr-query minor mode
+ ;; or implement via als extensions
+ )
+
+ (other
+ (setq-local wisi-disable-face t))
+ )
+
+ ;; eglot is always better at completion, so no separate user
+ ;; config for this.
+ (setq wisi-disable-completion t)
+
+ (when (and wisi-disable-face
+ wisi-disable-indent
+ (not (eq ada-xref-backend 'wisi)))
+ (setq wisi-disable-parser t)))
+
+(cl-defmethod wisi-prj-select :after ((_project wisi-prj))
+ ;; Connect to or create an eglot instance, providing a gpr file if
+ ;; declared.
+ (when (or (eq ada-xref-backend 'eglot)
+ (eq ada-indent-backend 'eglot)
+ (eq ada-face-backend 'eglot))
+ (ada-eglot-require-eglot)))
+
+(cl-defmethod wisi-prj-deselect :after ((_project wisi-prj))
+ ;; Shutdown a corresponding eglot instance (defined in
+ ;; eglot-current-server by combination of major-mode and
+ ;; current-project), to allow gpr file and other settings to change.
+ (when (eglot-current-server)
+ (eglot-shutdown (eglot-current-server))))
+
+;; create-ada-prj runs create-%s-xref, where %s is ada-xref-backend. So
+;; we need create-eglot-xref. It returns nil, since we don't use any
+;; wisi xref functions; just the ones provided by eglot.
+;;;###autoload
+(defun create-eglot-xref () nil)
+
+(provide 'ada-eglot)
+;;; ada-eglot.el ends here.
diff --git a/ada-gnat-xref.el b/ada-gnat-xref.el
deleted file mode 100644
index eb866eb791..0000000000
--- a/ada-gnat-xref.el
+++ /dev/null
@@ -1,332 +0,0 @@
-;;; ada-gnat-xref.el --- Ada mode cross-reference functionality provided by
'gnat xref' -*- lexical-binding:t -*-
-;;
-;; These tools are all Ada-specific; see gpr-query for multi-language
-;; GNAT cross-reference tools.
-;;
-;; GNAT is provided by AdaCore; see http://libre.adacore.com/
-;;
-;;; Copyright (C) 2012 - 2022 Free Software Foundation, Inc.
-;;
-;; Author: Stephen Leake <stephen_leake@member.fsf.org>
-;; Maintainer: Stephen Leake <stephen_leake@member.fsf.org>
-;;
-;; This file is part of GNU Emacs.
-;;
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-;;
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-;;
-;;; Usage:
-;;
-;; Emacs should enter Ada mode automatically when you load an Ada
-;; file, based on the file extension.
-;;
-;; By default, ada-mode is configured to load this file, so nothing
-;; special needs to done to use it.
-
-(require 'compile)
-(require 'gnat-core)
-
-;;;;; code
-
-;;;; uses of gnat tools
-
-(defconst gnatxref-buffer-name-prefix "*gnatxref-")
-
-(defconst ada-gnat-file-line-col-regexp "\\(.*\\):\\([0-9]+\\):\\([0-9]+\\)")
-
-(defconst ada-gnat-file-line-col-type-regexp
- (concat ada-gnat-file-line-col-regexp ": +\\(?:(\\(.*\\))\\)?")
- "Regexp matching <file>:<line>:<column> (<type>)")
-
-(cl-defstruct (gnatxref-xref (:include gnat-compiler))
- ;; no new slots
- )
-
-;;;###autoload
-(cl-defun create-gnat-xref
- (&key
- gpr-file
- run-buffer-name
- project-path
- target
- runtime
- gnat-stub-opts
- gnat-stub-cargs)
- ;; See note on `create-ada-prj' for why this is not a defalias.
- (make-gnatxref-xref
- :gpr-file gpr-file
- :run-buffer-name run-buffer-name
- :project-path project-path
- :target target
- :runtime runtime
- :gnat-stub-opts gnat-stub-opts
- :gnat-stub-cargs gnat-stub-cargs
- ))
-
-(cl-defmethod wisi-xref-parse-one ((xref gnatxref-xref) project name value)
- (wisi-compiler-parse-one xref project name value))
-
-(cl-defmethod wisi-xref-parse-final ((xref gnatxref-xref) _project
prj-file-name)
- (setf (gnat-compiler-run-buffer-name xref) (gnat-run-buffer-name
prj-file-name gnatxref-buffer-name-prefix)))
-
-(cl-defmethod wisi-xref-completion-table ((_xref gnatxref-xref) _project)
- (wisi-names t t))
-
-(cl-defgeneric wisi-xref-completion-regexp (_xref)
- wisi-names-regexp)
-
-(defun ada-gnat-xref-adj-col (identifier col)
- "Return COL adjusted for 1-index, quoted operators."
- (cond
- ((null col)
- col)
-
- ((eq ?\" (aref identifier 0))
- ;; There are two cases here:
- ;;
- ;; In both cases, gnat find wants the operators quoted, and the
- ;; column on the +. Gnat column is one-indexed; emacs is 0 indexed.
- ;;
- ;; In the first case, the front end passes in a column on the leading ",
so we add one.
- ;;
- ;; In the second case, the front end passes in a column on the +
- (cond
- ((= ?\" (char-after (point)))
- ;; test/ada_mode-slices.adb
- ;; function "+" (Left : in Day; Right : in Integer) return Day;
- (+ 2 col))
-
- (t
- ;; test/ada_mode-slices.adb
- ;; D1, D2 : Day := +Sun;
- (+ 1 col))
- ))
-
- (t
- ;; Gnat column is one-indexed; emacs is 0 indexed.
- (+ 1 col))
- ))
-
-(defun ada-gnat-xref-common-cmd (project)
- "Returns the gnatfind command to run to find cross-references."
- (format "%sgnatfind" (or (gnat-compiler-target (wisi-prj-xref project)) "")))
-
-(defun ada-gnat-xref-common-args (project identifier file line col)
- "Returns a list of arguments to pass to gnatfind. Some
-elements of the result may be nil."
- (list "-a"
- (when wisi-xref-full-path "-f")
- ;; 'gnatfind' does not take a gnat project file argument. We
- ;; assue you are not using gnatxref if you are using a gnat
- ;; project file; use gpr_query.
- (when (wisi-prj-source-path project)
- (concat "-aI" (mapconcat 'identity (wisi-prj-source-path project) "
-aI")))
- (when (plist-get (ada-prj-plist project) 'obj_dir)
- (concat "-aO" (mapconcat 'identity (plist-get (ada-prj-plist
project) 'obj_dir) " -aO")))
- (format "%s:%s:%s:%s"
- identifier
- (file-name-nondirectory file)
- (or line "")
- (or (ada-gnat-xref-adj-col identifier col) ""))))
-
-(defun ada-gnat-xref-refs (project item all)
- ;; WORKAROUND: xref 1.3.2 xref-location changed from defclass to
- ;; cl-defstruct. If drop emacs 26, use 'with-suppressed-warnings'.
- (with-no-warnings ;; "unknown slot"
- (let ((summary (if (functionp 'xref-item-summary) (xref-item-summary item)
(oref item summary)))
- (location (if (functionp 'xref-item-location) (xref-item-location
item) (oref item location))))
- (let ((file (if (functionp 'xref-file-location-file)
- (xref-file-location-file location)
- (oref location file)))
- (line (if (functionp 'xref-file-location-line)
- (xref-file-location-line location)
- (oref location line)))
- (column (if (functionp 'xref-file-location-column)
- (xref-file-location-column location)
- (oref location column))))
- (let* ((wisi-xref-full-path t)
- (args (cons "-r" (ada-gnat-xref-common-args project summary file
line column)))
- (result nil))
- (with-current-buffer (gnat-run-buffer project
(gnat-compiler-run-buffer-name (wisi-prj-xref project)))
- (gnat-run project (ada-gnat-xref-common-cmd project) args)
-
- (goto-char (point-min))
- (when ada-gnat-debug-run (forward-line 2)); skip ADA_PROJECT_PATH,
command
- (if (looking-at "WARNING: gnatfind is obsolete.*")
- ;; Added in gnat pro 23
- (forward-line 2))
-
- (while (not (eobp))
- (cond
- ((looking-at ada-gnat-file-line-col-type-regexp)
- ;; process line
- (let ((found-file (match-string 1))
- (found-line (string-to-number (match-string 2)))
- (found-col (string-to-number (match-string 3)))
- (found-type (match-string 4)))
- (when (or all found-type)
- (push (xref-make (if found-type
- (concat summary " " found-type)
- summary)
- (xref-make-file-location found-file
found-line found-col))
- result))
- ))
- (t
- ;; ignore line
- ))
- (forward-line 1)))
- (nreverse result) ;; specs first.
- )))))
-
-(cl-defmethod wisi-xref-definitions (_xref project item)
- (ada-gnat-xref-refs project item nil))
-
-(cl-defmethod wisi-xref-references (_xref project item)
- (ada-gnat-xref-refs project item t))
-
-(cl-defmethod wisi-xref-other ((_xref gnatxref-xref) project &key identifier
filename line column)
- (let* ((wisi-xref-full-path t)
- (cmd (ada-gnat-xref-common-cmd project))
- (args (ada-gnat-xref-common-args project identifier filename line
column))
- (result nil))
- (with-current-buffer (gnat-run-buffer project
(gnat-compiler-run-buffer-name (wisi-prj-xref project)))
- (gnat-run project cmd args)
-
- (goto-char (point-min))
- (when ada-gnat-debug-run (forward-line 2)); skip ADA_PROJECT_PATH, 'gnat
find'
-
- ;; gnat find returns two items; the starting point, and the 'other' point
- (unless (looking-at (concat ada-gnat-file-line-col-regexp ":"))
- ;; no results
- (error "'%s' not found in cross-reference files; recompile?"
identifier))
-
- (while (not result)
- (looking-at (concat ada-gnat-file-line-col-regexp "\\(: warning:\\)?"))
- (if (match-string 4)
- ;; error in *.gpr; ignore here.
- (forward-line 1)
- ;; else process line
- (let ((found-file (match-string 1))
- (found-line (string-to-number (match-string 2)))
- (found-col (string-to-number (match-string 3))))
- ;; Sometimes gnatfind does not respect "-f" (test/ada_mode.ads
Separate_Procedure full body)
- (unless (file-name-absolute-p found-file)
- (setq found-file (locate-file found-file
compilation-search-path)))
-
- (if (not
- (and
- ;; due to symbolic links, only the non-dir filename is
comparable.
- (equal (file-name-nondirectory filename)
(file-name-nondirectory found-file))
- (= line found-line)
- (= (ada-gnat-xref-adj-col identifier column) found-col)))
- ;; Found other item.
- (setq result (list found-file found-line (1- found-col)))
- ;; else keep searching
- (forward-line 1))
- ))
-
- (when (eobp)
- (error "gnat find did not return other item"))
- ))
- result))
-
-(cl-defmethod wisi-xref-parents ((_xref gnatxref-xref) project &key identifier
filename line column)
- (let* ((arg (ada-gnat-xref-common-args project identifier filename line
column))
- (result nil))
- (with-current-buffer (gnat-run-buffer project
(gnat-compiler-run-buffer-name (wisi-prj-xref project)))
- (gnat-run project (ada-gnat-xref-common-cmd project) (cons "-d" arg))
-
- (goto-char (point-min))
- (when ada-gnat-debug-run (forward-line 2)); skip GPR_PROJECT_PATH, 'gnat
find'
-
- ;; gnat find returns two items; the starting point, and the 'other' point
- (unless (looking-at (concat ada-gnat-file-line-col-regexp ":"))
- ;; no results
- (error "'%s' not found in cross-reference files; recompile?"
identifier))
-
- (while (not result)
- (looking-at (concat ada-gnat-file-line-col-regexp "\\(: warning:\\)?"))
- (if (match-string 4)
- ;; error in *.gpr; ignore here.
- (forward-line 1)
- ;; else process line
- (skip-syntax-forward "^ ")
- (skip-syntax-forward " ")
- (if (looking-at (concat "derived from .* ("
ada-gnat-file-line-col-regexp ")"))
- ;; found other item
- (setq result (list (match-string 1)
- (string-to-number (match-string 2))
- (1- (string-to-number (match-string 3)))))
- (forward-line 1))
- )
- (when (eobp)
- (error "gnat find did not return parent types"))
- ))
-
- (wisi-goto-source (nth 0 result)
- (nth 1 result)
- (nth 2 result))
- ))
-
-(cl-defmethod wisi-xref-all ((_xref gnatxref-xref) project &key identifier
filename line column local-only append)
- ;; we use `compilation-start' to run gnat, not `gnat-run', so it
- ;; is asynchronous, and automatically runs the compilation error
- ;; filter.
-
- (let* ((arg (ada-gnat-xref-common-args project identifier filename line
column)))
- (setq arg (cons "-r" arg))
- (when local-only (setq arg (append arg (list filename))))
-
- (with-current-buffer (gnat-run-buffer project
(gnat-compiler-run-buffer-name (wisi-prj-xref project)))
- (let ((compilation-buffer-name "*gnatfind*")
- (compilation-error "reference")
- (command-and-args (mapconcat (lambda (a) (or a ""))
- (cons (ada-gnat-xref-common-cmd
project) arg)
- " "))
- ;; gnat find uses standard gnu format for output, so don't
- ;; need to set compilation-error-regexp-alist
- prev-pos
- prev-content)
-
- ;; compilation-environment is set in `wisi-prj-select'
-
- ;; WORKAROUND: the 'compilation' API doesn't let us specify "append",
so we use this.
- (with-current-buffer (get-buffer-create compilation-buffer-name)
- (when append
- (setq prev-pos (point))
- (setq prev-content (buffer-substring (point-min) (point-max))))
-
- (unless ada-gnat-debug-run
- ;; hide the command and arguments using text properties, show only
the bare minimum
- (setq command-and-args
- (propertize command-and-args
- 'display
- (format "References to %s at %s:%d:%d" identifier
filename line column))))
- (compilation-start command-and-args
- 'compilation-mode
- (lambda (_name) compilation-buffer-name))
- (when append
- (let ((inhibit-read-only t))
- (goto-char (point-min))
- (insert prev-content)
- (goto-char prev-pos))))
- ))))
-
-(cl-defmethod wisi-xref-overriding ((_xref gnatxref-xref) _project &key
_identifier _filename _line _column)
- (error "gnatxref does not support 'show overriding' - use gpr_query?"))
-
-(cl-defmethod wisi-xref-overridden ((_xref gnatxref-xref) _project &key
_identifier _filename _line _column)
- (error "gnatxref does not support 'show overridden' - use gpr_query?"))
-
-(provide 'ada-gnat-xref)
-;; end of file
diff --git a/ada-mode.casing b/ada-mode.casing
new file mode 100644
index 0000000000..f9369c0603
--- /dev/null
+++ b/ada-mode.casing
@@ -0,0 +1,7 @@
+*AA
+*DB
+*DOS
+*SQL
+ASCII
+AUnit
+LF
diff --git a/ada-mode.el b/ada-mode.el
index 8ec5544587..6369cad9e8 100644
--- a/ada-mode.el
+++ b/ada-mode.el
@@ -6,8 +6,8 @@
;; Maintainer: Stephen Leake <stephen_leake@stephe-leake.org>
;; Keywords: languages
;; ada
-;; Version: 7.3.beta1
-;; package-requires: ((uniquify-files "1.0.1") (wisi "4.0.beta") (emacs
"25.3"))
+;; Version: 8.0.2
+;; package-requires: ((uniquify-files "1.0.1") (wisi "4.1.1") (gnat-compiler
"1.0.0") (emacs "25.3"))
;; url: http://www.nongnu.org/ada-mode/
;;
;; This file is part of GNU Emacs.
@@ -46,15 +46,15 @@
;; `ada-compiler' selects which compiler to use; it can be overridden
;; by the "ada_compiler" setting in project files.
;;
-;; We also support a cross reference tool (also called xref tool) that
-;; is different from the compiler. For example, you can use a local
-;; GNAT compiler to generate and access cross-reference information,
-;; while using a cross-compiler for compiling the final
-;; executable. The user variable `ada-xref-tool' selects the xref
-;; tool; it can be overridden by the "xref_tool" setting in project
-;; files.
+;; We also support a cross reference backend (also called xref
+;; backend) that is different from the compiler. For example, you can
+;; use a local GNAT compiler to generate and access cross-reference
+;; information, while using a cross-compiler for compiling the final
+;; executable. The user variable `ada-xref-backend' selects the xref
+;; backend; it can be overridden by the "xref_backend" setting in
+;; project files.
;;
-;; The indentation engine and skeleton tools are from the wisi
+;; The indentation engine and skeleton backends are from the wisi
;; package.
;;
;;; History:
@@ -117,7 +117,7 @@
(defun ada-mode-version ()
"Return Ada mode version."
(interactive)
- (let ((version-string "7.3.beta"))
+ (let ((version-string "8.0.2"))
(if (called-interactively-p 'interactive)
(message version-string)
version-string)))
@@ -149,19 +149,6 @@ rather than to the same column."
:type 'integer
:safe #'integerp)
-(defcustom ada-process-parse-exec "ada_mode_wisi_lr1_parse"
- "Name of executable to use for external process Ada parser.
-There are two standard choices; ada_mode_wisi_lalr_parse and
-ada_mode_wisi_lr1_parse. The LR1 version (the default) is
-slower to load on first use, but gives better error recovery."
- :type 'string
- :group 'ada)
-
-(defcustom ada-process-parse-exec-opts nil
- "List of process start options for `ada-process-parse-exec'."
- :type 'string
- :group 'ada)
-
(defcustom ada-xref-full-path nil
"If t, cross-references show the full path to source files; if
nil, only the file name."
@@ -218,8 +205,8 @@ nil, only the file name."
(define-key map "\C-cr4" 'ada-refactor-4)
(wisi-case-activate-keys map)
- map
- ) "Local keymap used for Ada mode.")
+ map)
+ "Local keymap used for Ada mode.")
(defvar ada-mode-menu (make-sparse-keymap "Ada"))
(easy-menu-define ada-mode-menu ada-mode-map "Menu keymap for Ada mode"
@@ -232,62 +219,62 @@ nil, only the file name."
["Customize" (customize-group 'ada) t]
("Project files"
["Find and select project ..." ada-build-prompt-select-prj-file t]
- ["Show project" wisi-prj-show t]
- ["Show project file search path" wisi-prj-show-prj-path t]
- ["Show source file search path" wisi-prj-show-src-path t]
- ["Clear current project" wisi-prj-clear-current t]
+ ["Show project" wisi-prj-show t]
+ ["Show project file search path" wisi-prj-show-prj-path t]
+ ["Show source file search path" wisi-prj-show-src-path t]
+ ["Clear current project" wisi-prj-clear-current t]
)
("Build"
- ["Next compilation error" next-error t]
- ["Show secondary error" ada-show-secondary-error t]
- ["Fix compilation error" wisi-fix-compiler-error t]
- ["Show last parse error" wisi-show-parse-error t]
- ["Check syntax" ada-build-check t]
- ["Show main" ada-build-show-main t]
- ["Build" ada-build-make t]
- ["Set main and Build" ada-build-set-make t]
- ["Run" ada-build-run t]
+ ["Next compilation error" next-error t]
+ ["Show secondary error" ada-show-secondary-error t]
+ ["Fix compilation error" wisi-fix-compiler-error t]
+ ["Show last parse error" wisi-show-parse-error t]
+ ["Check syntax" ada-build-check t]
+ ["Show main" ada-build-show-main t]
+ ["Build" ada-build-make t]
+ ["Set main and Build" ada-build-set-make t]
+ ["Run" ada-build-run t]
)
("Navigate"
["Other file" ada-find-other-file t]
["Find file in project" project-find-file t]
["Goto declaration/body" wisi-goto-spec/body t]
- ["Goto next statement keyword" forward-sexp t]
- ["Goto prev statement keyword" backward-sexp t]
- ["Goto subprogram/package start" ada-goto-declaration-start t]
- ["Goto subprogram/package end" ada-goto-declaration-end t]
- ["Goto declarative region start" ada-goto-declarative-region-start t]
- ["Goto containing statement start" wisi-goto-containing-statement-start t]
- ["Show parent declarations" wisi-show-declaration-parents t]
+ ["Goto next statement keyword" forward-sexp
wisi-parser-shared]
+ ["Goto prev statement keyword" backward-sexp
wisi-parser-shared]
+ ["Goto subprogram/package start" ada-goto-declaration-start
wisi-parser-shared]
+ ["Goto subprogram/package end" ada-goto-declaration-end
wisi-parser-shared]
+ ["Goto declarative region start" ada-goto-declarative-region-start
wisi-parser-shared]
+ ["Goto containing statement start" wisi-goto-containing-statement-start
wisi-parser-shared]
+ ["Show parent declarations" wisi-show-declaration-parents
(eq ada-xref-backend 'gpr_query)]
["Show all references (classwide)" xref-find-references t]
["Show all direct references" wisi-show-references t]
- ["Show local references" wisi-show-local-references t]
- ["Show overriding" wisi-show-overriding t]
- ["Show overridden" wisi-show-overridden t]
- ["Goto prev position current buffer" pop-to-mark-command t]
- ["Goto prev position other buffer" pop-global-mark t]
- ["Next placeholder" wisi-skel-next-placeholder t]
- ["Previous placeholder" wisi-skel-prev-placeholder t]
+ ["Show local references" wisi-show-local-references (eq
ada-xref-backend 'gpr_query)]
+ ["Show overriding" wisi-show-overriding (eq
ada-xref-backend 'gpr_query)]
+ ["Show overridden" wisi-show-overridden (eq
ada-xref-backend 'gpr_query)]
+ ["Goto prev position current buffer" pop-to-mark-command t]
+ ["Goto prev position other buffer" pop-global-mark t]
+ ["Next placeholder" wisi-skel-next-placeholder t]
+ ["Previous placeholder" wisi-skel-prev-placeholder t]
)
("Edit"
["Complete name at point" completion-at-point t]
["Expand skeleton" wisi-skel-expand t]
["Indent line or selection" indent-for-tab-command t]
- ["Indent current statement" wisi-indent-statement t]
- ["Indent containing statement" wisi-indent-containing-statement t]
- ["Indent file" (indent-region (point-min) (point-max)) t]
- ["Align" ada-align t]
- ["Comment/uncomment selection" comment-dwim t]
- ["Fill comment paragraph" ada-fill-comment-paragraph t]
+ ["Indent current statement" wisi-indent-statement wisi-parser-shared]
+ ["Indent containing statement" wisi-indent-containing-statement
wisi-parser-shared]
+ ["Indent file" (indent-region (point-min) (point-max))
t]
+ ["Align" ada-align t]
+ ["Comment/uncomment selection" comment-dwim t]
+ ["Fill comment paragraph" ada-fill-comment-paragraph t]
["Fill comment paragraph justify" (ada-fill-comment-paragraph 'full) t]
["Fill comment paragraph postfix" (ada-fill-comment-paragraph 'full t) t]
- ["Make body for subprogram" ada-make-subprogram-body t]
+ ["Make body for subprogram" ada-make-subprogram-body
wisi-parser-shared]
)
("Refactor"
- ["Method (Object) => Object.Method" ada-refactor-1 t]
- ["Object.Method => Method (Object)" ada-refactor-2 t]
- ["Element (Object, Index) => Object (Index)" ada-refactor-3 t]
- ["Object (Index) => Element (Object, Index)" ada-refactor-4 t]
+ ["Method (Object) => Object.Method" ada-refactor-1 wisi-parser-shared]
+ ["Object.Method => Method (Object)" ada-refactor-2 wisi-parser-shared]
+ ["Element (Object, Index) => Object (Index)" ada-refactor-3
wisi-parser-shared]
+ ["Object (Index) => Element (Object, Index)" ada-refactor-4
wisi-parser-shared]
)
("Casing"
["Create full exception" wisi-case-create-exception t]
@@ -298,25 +285,25 @@ nil, only the file name."
["Show casing files list" wisi-case-show-files t]
)
("Misc"
- ["Show last parse error" wisi-show-parse-error t]
- ["Refresh cross reference cache" wisi-refresh-prj-cache t]
- ["Restart parser" wisi-kill-parser t]
+ ["Show last parse error" wisi-show-parse-error
wisi-parser-shared]
+ ["Refresh cross reference cache" wisi-refresh-prj-cache (wisi-prj-p
(project-current))]
+ ["Restart parser" wisi-kill-parser
wisi-parser-shared]
)))
(easy-menu-define ada-context-menu nil
"Context menu keymap for Ada mode"
'("Ada"
- ["Goto declaration/body" wisi-goto-spec-body t]
- ["Goto next statement keyword" forward-sexp t]
- ["Goto prev statement keyword" backward-sexp t]
- ["Goto declarative region start" ada-goto-declarative-region-start t]
- ["Goto containing statement start" wisi-goto-containing-statement-start t]
- ["Goto subprogram/package start" ada-goto-declaration-start t]
- ["Goto subprogram/package end" ada-goto-declaration-end t]
- ["Show parent declarations" wisi-show-declaration-parents t]
- ["Show references" wisi-show-references t]
- ["Show overriding" wisi-show-overriding t]
- ["Show overridden" wisi-show-overridden t]
+ ["Goto declaration/body" wisi-goto-spec-body
wisi-parser-shared]
+ ["Goto next statement keyword" forward-sexp wisi-parser-shared]
+ ["Goto prev statement keyword" backward-sexp wisi-parser-shared]
+ ["Goto declarative region start" ada-goto-declarative-region-start
wisi-parser-shared]
+ ["Goto containing statement start" wisi-goto-containing-statement-start
wisi-parser-shared]
+ ["Goto subprogram/package start" ada-goto-declaration-start
wisi-parser-shared]
+ ["Goto subprogram/package end" ada-goto-declaration-end
wisi-parser-shared]
+ ["Show parent declarations" wisi-show-declaration-parents (eq
ada-xref-backend 'gpr_query)]
+ ["Show references" wisi-show-references (eq
ada-xref-backend 'gpr_query)]
+ ["Show overriding" wisi-show-overriding (eq
ada-xref-backend 'gpr_query)]
+ ["Show overridden" wisi-show-overridden (eq
ada-xref-backend 'gpr_query)]
["-" nil nil]
@@ -329,9 +316,9 @@ nil, only the file name."
["Adjust case region" wisi-case-adjust-region
(use-region-p)]
["Create full case exception" wisi-case-create-exception t]
["Create partial case exception" wisi-case-create-partial-exception t]
- ["Indent current statement" wisi-indent-statement
t]
+ ["Indent current statement" wisi-indent-statement
wisi-parser-shared]
["Expand skeleton" wisi-skel-expand t]
- ["Make body for subprogram" ada-make-subprogram-body
t]
+ ["Make body for subprogram" ada-make-subprogram-body
wisi-parser-shared]
))
(defun ada-popup-menu ()
@@ -479,34 +466,30 @@ Runs `ada-syntax-propertize-hook'."
;; (info "(elisp)Syntax Properties")
;;
;; called from `syntax-propertize', inside save-excursion
with-silent-modifications
- (let ((inhibit-read-only t)
- (inhibit-point-motion-hooks t))
- (goto-char start)
- (save-match-data
- (while (re-search-forward
- (concat
- "[^[:alnum:])]\\('\\)[^'\n]\\('\\)"; 1, 2: character literal,
not attribute
- "\\|[^[:alnum:])]\\('''\\)"; 3: character literal '''
- )
- end t)
- ;; syntax-propertize-extend-region-functions is set to
- ;; syntax-propertize-wholelines by default. We assume no
- ;; coding standard will permit a character literal at the
- ;; start of a line (not preceded by whitespace).
- (cond
- ((match-beginning 1)
- (put-text-property
- (match-beginning 1) (match-end 1) 'syntax-table '(7 . ?'))
- (put-text-property
- (match-beginning 2) (match-end 2) 'syntax-table '(7 . ?')))
- ((match-beginning 3)
- (put-text-property
- (match-beginning 3) (1+ (match-beginning 3)) 'syntax-table '(7 . ?'))
- (put-text-property
- (1- (match-end 3)) (match-end 3) 'syntax-table '(7 . ?')))
- )))
- (run-hook-with-args 'ada-syntax-propertize-hook start end))
- )
+ (goto-char start)
+ (while (re-search-forward
+ (concat
+ "[^[:alnum:])]\\('\\)[^'\n]\\('\\)"; 1, 2: character literal, not
attribute
+ "\\|[^[:alnum:])]\\('''\\)"; 3: character literal '''
+ )
+ end t)
+ ;; syntax-propertize-extend-region-functions is set to
+ ;; syntax-propertize-wholelines by default. We assume no
+ ;; coding standard will permit a character literal at the
+ ;; start of a line (not preceded by whitespace).
+ (cond
+ ((match-beginning 1)
+ (put-text-property
+ (match-beginning 1) (match-end 1) 'syntax-table '(7 . ?'))
+ (put-text-property
+ (match-beginning 2) (match-end 2) 'syntax-table '(7 . ?')))
+ ((match-beginning 3)
+ (put-text-property
+ (match-beginning 3) (1+ (match-beginning 3)) 'syntax-table '(7 . ?'))
+ (put-text-property
+ (1- (match-end 3)) (match-end 3) 'syntax-table '(7 . ?')))
+ ))
+ (run-hook-with-args 'ada-syntax-propertize-hook start end))
;;;; navigation within and between files
@@ -626,84 +609,96 @@ See `ff-other-file-alist'.")
(defun ada-which-function (&optional include-type)
"Return name of subprogram/task/package containing point.
-Also sets ff-function-name for ff-pre-load-hook."
+Also sets `ff-function-name' for `ff-pre-load-hook'."
(interactive)
;; which-function-mode does not provide which-function to call
;; interactively!
;; Fail gracefully and silently, since this could be called from
;; which-function-mode.
- (cond
- (wisi-incremental-parse-enable
- (ada-validate-enclosing-declaration nil 'navigate))
+ (cl-ecase ada-face-backend
+ (wisi
+ (cond
+ (wisi-incremental-parse-enable
+ (ada-validate-enclosing-declaration nil 'navigate))
+
+ (t
+ (wisi-validate-cache (max (point-min) (- (point) (/
ada-which-func-parse-size 2)))
+ (min (point-max) (+ (point) (/
ada-which-func-parse-size 2)))
+ nil
+ 'navigate)
+ ))
- (t
- (wisi-validate-cache (max (point-min) (- (point) (/
ada-which-func-parse-size 2)))
- (min (point-max) (+ (point) (/
ada-which-func-parse-size 2)))
- nil
- 'navigate)
- ))
+ (save-excursion
+ (condition-case nil
+ (let ((result nil)
+ (cache (ada-goto-declaration-start-1 include-type)))
+ (if (null cache)
+ ;; bob or failed parse
+ (setq result "")
+
+ (when (memq (wisi-cache-nonterm cache)
+ '(generic_package_declaration
generic_subprogram_declaration))
+ ;; name is after next statement keyword
+ (setq cache (wisi-next-statement-cache cache)))
+
+ ;; add or delete 'body' as needed
+ (cl-ecase (wisi-cache-nonterm cache)
+ ((entry_body entry_declaration)
+ (setq result (ada-which-function-1 "entry" nil)))
+
+ ((full_type_declaration private_type_declaration)
+ (setq result (ada-which-function-1 "type" nil)))
+
+ (package_body
+ (setq result (ada-which-function-1 "package" nil)))
+
+ ((package_declaration
+ package_specification) ;; after 'generic'
+ (setq result (ada-which-function-1 "package" t)))
+
+ (protected_body
+ (setq result (ada-which-function-1 "protected" nil)))
+
+ ((protected_type_declaration single_protected_declaration)
+ (setq result (ada-which-function-1 "protected" t)))
+
+ ((abstract_subprogram_declaration
+ expression_function_declaration
+ subprogram_declaration
+ subprogram_renaming_declaration
+ generic_subprogram_declaration ;; after 'generic'
+ null_procedure_declaration)
+ (setq result (ada-which-function-1
+ (progn (search-forward-regexp
"function\\|procedure")(match-string 0))
+ nil))) ;; no 'body' keyword in subprogram bodies
+
+ ((subprogram_body subunit)
+ (setq result (ada-which-function-1
+ (progn (search-forward-regexp
"function\\|procedure")(match-string 0))
+ nil)))
+
+ ((single_task_declaration task_type_declaration)
+ (setq result (ada-which-function-1 "task" t)))
+
+
+ (task_body
+ (setq result (ada-which-function-1 "task" nil)))
+ ))
+ (when (called-interactively-p 'interactive)
+ (message result))
+ result)
+ (error ""))))
+
+ (eglot
+ (when (eglot--server-capable :DocumentSymbol)
+ ;; eglot/LSP maybe supports "which function" via DocumentSymbol, which
+ ;; ada_language_server version 22 does not support.
+ (display-warning 'ada "ada-mode which-function via eglot not yet
implemented."))
+ )
- (save-excursion
- (condition-case nil
- (let ((result nil)
- (cache (ada-goto-declaration-start-1 include-type)))
- (if (null cache)
- ;; bob or failed parse
- (setq result "")
-
- (when (memq (wisi-cache-nonterm cache)
- '(generic_package_declaration
generic_subprogram_declaration))
- ;; name is after next statement keyword
- (setq cache (wisi-next-statement-cache cache)))
-
- ;; add or delete 'body' as needed
- (cl-ecase (wisi-cache-nonterm cache)
- ((entry_body entry_declaration)
- (setq result (ada-which-function-1 "entry" nil)))
-
- ((full_type_declaration private_type_declaration)
- (setq result (ada-which-function-1 "type" nil)))
-
- (package_body
- (setq result (ada-which-function-1 "package" nil)))
-
- ((package_declaration
- package_specification) ;; after 'generic'
- (setq result (ada-which-function-1 "package" t)))
-
- (protected_body
- (setq result (ada-which-function-1 "protected" nil)))
-
- ((protected_type_declaration single_protected_declaration)
- (setq result (ada-which-function-1 "protected" t)))
-
- ((abstract_subprogram_declaration
- expression_function_declaration
- subprogram_declaration
- subprogram_renaming_declaration
- generic_subprogram_declaration ;; after 'generic'
- null_procedure_declaration)
- (setq result (ada-which-function-1
- (progn (search-forward-regexp
"function\\|procedure")(match-string 0))
- nil))) ;; no 'body' keyword in subprogram bodies
-
- ((subprogram_body subunit)
- (setq result (ada-which-function-1
- (progn (search-forward-regexp
"function\\|procedure")(match-string 0))
- nil)))
-
- ((single_task_declaration task_type_declaration)
- (setq result (ada-which-function-1 "task" t)))
-
-
- (task_body
- (setq result (ada-which-function-1 "task" nil)))
- ))
- (when (called-interactively-p 'interactive)
- (message result))
- result)
- (error ""))))
+ (none "")
+ ))
(defun ada-add-log-current-function ()
"For `add-log-current-defun-function'."
@@ -718,35 +713,33 @@ Also sets ff-function-name for ff-pre-load-hook."
(defun ada-on-context-clause ()
"Return non-nil if point is on a context clause."
(interactive)
- (let (cache)
- (save-excursion
- ;; Don't require parse of large file just for ada-find-other-file
- (and (< (point-max) wisi-size-threshold)
- (setq cache (wisi-goto-statement-start))
- (memq (wisi-cache-nonterm cache) '(use_clause with_clause))
- ))))
+ (and wisi-parser-shared
+ (save-excursion
+ (memq (wisi-cache-nonterm (wisi-goto-statement-start)) '(use_clause
with_clause))
+ )))
(defun ada-goto-subunit-name ()
"Return non-nil if the current buffer contains a subunit.
Also move point to the subunit name. If no subunit, leave point
alone, return nil."
(interactive)
- (wisi-validate-cache (point-min) (point-max) t 'navigate)
+ (when wisi-parser-shared
+ (wisi-validate-cache (point-min) (point-max) t 'navigate)
- (let (cache
- (name-pos nil))
- (save-excursion
- ;; move to top declaration
- (goto-char (point-min))
- (setq cache (or (wisi-get-cache (point))
- (wisi-forward-cache)))
+ (let (cache
+ (name-pos nil))
+ (save-excursion
+ ;; move to top declaration
+ (goto-char (point-min))
+ (setq cache (or (wisi-get-cache (point))
+ (wisi-forward-cache)))
- (when (eq (wisi-cache-nonterm cache) 'subunit)
- (setq name-pos (car (wisi-next-name-region))))
- )
- (when name-pos
- (goto-char name-pos))
- ))
+ (when (eq (wisi-cache-nonterm cache) 'subunit)
+ (setq name-pos (car (wisi-next-name-region))))
+ )
+ (when name-pos
+ (goto-char name-pos))
+ )))
(defun ada-set-point-accordingly ()
"Move to the string specified in `ff-function-name', which may be a regexp,
@@ -871,14 +864,14 @@ compiler-specific compilation filters."
(let ((start-buffer (current-buffer))
pos item file)
(when (eq major-mode 'compilation-mode)
- (setq compilation-last-buffer (current-buffer)))
+ (setq next-error-last-buffer (current-buffer)))
;; We use `pop-to-buffer', not `set-buffer', so point is correct
- ;; for the current window showing compilation-last-buffer, and
+ ;; for the current window showing next-error-last-buffer, and
;; moving point in that window works. But that might eat an
;; `other-frame-window-mode' prefix, which the user means to apply
;; to ’ada-goto-source’ below; disable that temporarily.
(let ((display-buffer-overriding-action nil))
- (pop-to-buffer compilation-last-buffer nil t)
+ (pop-to-buffer next-error-last-buffer nil t)
(setq pos (next-single-property-change (point) 'ada-secondary-error))
(unless pos
;; probably at end of compilation-buffer, in new compile
@@ -960,6 +953,8 @@ compiler-specific compilation filters."
subprogram, or task declaration point is currently in or just
after. For `beginning-of-defun-function'."
(interactive)
+ (unless wisi-parser-shared
+ (user-error "goto-declaration-* not supported by this parser; add use
clause manually"))
(push-mark)
(ada-validate-enclosing-declaration t 'navigate)
(ada-goto-declaration-start-1 include-type))
@@ -1064,35 +1059,28 @@ The ident for the paragraph is taken from the first
line."
;;;; support for font-lock.el
-(defconst ada-83-keywords
- '("abort" "abs" "accept" "access" "all" "and" "array" "at" "begin"
+(defconst ada-keywords
+ '(;; Ada 83:
+ "abort" "abs" "accept" "access" "all" "and" "array" "at" "begin"
"body" "case" "constant" "declare" "delay" "delta" "digits" "do"
"else" "elsif" "end" "entry" "exception" "exit" "for" "function"
"generic" "goto" "if" "in" "is" "limited" "loop" "mod" "new"
"not" "null" "of" "or" "others" "out" "package" "pragma" "private"
"procedure" "raise" "range" "record" "rem" "renames" "return"
"reverse" "select" "separate" "subtype" "task" "terminate" "then"
- "type" "use" "when" "while" "with" "xor")
- "List of Ada 83 keywords.")
-
-(defconst ada-95-keywords
- '("abstract" "aliased" "protected" "requeue" "tagged" "until")
- "List of keywords new in Ada 95.")
-
-(defconst ada-2005-keywords
- '("interface" "overriding" "synchronized")
- "List of keywords new in Ada 2005.")
-
-(defconst ada-2012-keywords
- '("some")
- "List of keywords new in Ada 2012.")
-
-(defvar ada-keywords nil
- "List of Ada keywords for current `ada-language-version'.")
+ "type" "use" "when" "while" "with" "xor"
+ ;; Ada 95:
+ "abstract" "aliased" "protected" "requeue" "tagged" "until"
+ ;; Ada 2001
+ "interface" "overriding" "synchronized"
+ ;; Ada 2012:
+ "some"
+ ;; Ada 2022:
+ "parallel")
+ "List of Ada keywords.")
(defun ada-font-lock-keywords ()
- "Return Ada mode value for `font-lock-keywords',
-Depends on `ada-language-version'."
+ "Return Ada mode value for `font-lock-keywords'."
;; Grammar actions set `font-lock-face' property for all
;; non-keyword tokens that need it.
(list
@@ -1588,6 +1576,12 @@ Prompts with completion, defaults to filename at point."
(defvar which-func-functions) ;; which-func.el
(defvar which-func-non-auto-modes) ;; ""
+(defvar ada-other-backend-setup-function nil
+ "When non-nil, called with no args from ada-mode if any of
+`ada-face-backend',
+`ada-indent-backend', `ada-xref-backend' are set to other.
+See `ada-eglot-setup' in ada-eglot.el for a similar function.")
+
;;;###autoload
(cl-defun ada-parse-require-process (&key wait)
"Start the Ada parser in an external process, if not already started.
@@ -1611,7 +1605,6 @@ Unless WAIT, does not wait for parser to respond. Returns
the parser object."
:group 'ada
(set (make-local-variable 'syntax-propertize-function)
'ada-syntax-propertize)
- (syntax-ppss-flush-cache (point-min));; reparse with new function
(set (make-local-variable 'parse-sexp-ignore-comments) t)
(set (make-local-variable 'parse-sexp-lookup-properties) t)
@@ -1626,18 +1619,11 @@ Unless WAIT, does not wait for parser to respond.
Returns the parser object."
;; indent-region to use it for all indentation. See
;; ada-fill-comment-paragraph.
- ;; AdaCore standard style (enforced by -gnaty) requires two spaces
- ;; after '--' in comments; this makes it easier to distinguish
- ;; special comments that have something else after '--'
- (set (make-local-variable 'comment-padding) " ")
-
- (set (make-local-variable 'require-final-newline) t)
-
(setq font-lock-defaults
'(ada-font-lock-keywords ;; keywords
- nil ;; keywords-only; font-lock set comment, string faces
+ nil ;; keywords-only; font-lock does keywords, comment, string faces
via regexp. parser does identifiers.
t ;; case-fold
- ((?\_ . "w")))); treat underscore as a word component
+ )); treat underscore as a word component
(set (make-local-variable 'ff-other-file-alist)
'ada-other-file-alist)
@@ -1669,9 +1655,6 @@ Unless WAIT, does not wait for parser to respond. Returns
the parser object."
(set (make-local-variable 'align-region-separate) ada-align-region-separate)
(set (make-local-variable 'align-indent-before-aligning) t)
- (set (make-local-variable 'beginning-of-defun-function)
#'ada-goto-declaration-start)
- (set (make-local-variable 'end-of-defun-function) #'ada-goto-declaration-end)
-
;; Exclude comments alone on line from alignment.
(add-to-list 'align-exclude-rules-list
'(ada-solo-comment
@@ -1684,59 +1667,47 @@ Unless WAIT, does not wait for parser to respond.
Returns the parser object."
(setq align-mode-rules-list ada-align-rules)
- (wisi-setup
- :indent-calculate '(ada-wisi-comment)
- :post-indent-fail 'ada-wisi-post-indent-fail
- :parser (ada-parse-require-process))
-
(setq wisi-prj-parse-undefined-function #'ada-prj-parse-undefined)
(setq wisi-xref-full-path ada-xref-full-path)
+ ;; Startup cases:
+ ;;
+ ;; 1) Newbie or small project; no wisi project, no gpr
+ ;; file. ada-*-background set by default from presence of als,
+ ;; ada_mode_wisi_parse, gpr_query. Start eglot in ada-mode,
+ ;; ada-mode-hook, or ada-mode-post-local-vars.
+ ;;
+ ;; 2) ada-*-background set in dir-local vars or by default, wisi
+ ;; project with or without gpr file declared via wisi-select-* in
+ ;; dir-local vars. Start eglot in wisi-select-prj.
+ ;;
+ ;; 3) ada-*-background, wisi project declared in Makefile or
+ ;; elsewhere before Ada files opened; start eglot in
+ ;; wisi-select-prj.
+ ;;
+ ;; In order to accomodate 1 and 2, we call ada-eglot-setup and wisi-setup in
+ ;; ada-mode-post-local-vars.
(add-hook 'hack-local-variables-hook #'ada-mode-post-local-vars nil t)
)
(defun ada-mode-post-local-vars ()
- ;; These are run after ada-mode-hook and file local variables
+ ;; These are run after ada-mode-hook and file/dir local variables
;; because users or *.ad? files might set the relevant
- ;; variable inside the hook or file local variables.
+ ;; variable inside the hook or local variables.
;; This means to fully set ada-mode interactively, user must
;; do M-x ada-mode M-; (hack-local-variables)
(remove-hook 'hack-local-variables-hook #'ada-mode-post-local-vars)
+ ;;; Handle variables that can easily be file-specific.
+
;; fill-region-as-paragraph in ada-fill-comment-paragraph does not
;; call syntax-propertize, so set comment syntax on
;; ada-fill-comment-prefix. In post-local because user may want to
;; set it per-file.
(put-text-property 0 2 'syntax-table '(11 . nil) ada-fill-comment-prefix)
- (cl-case ada-language-version
- (ada83
- (setq ada-keywords ada-83-keywords))
-
- (ada95
- (setq ada-keywords
- (append ada-83-keywords
- ada-95-keywords)))
-
- (ada2005
- (setq ada-keywords
- (append ada-83-keywords
- ada-95-keywords
- ada-2005-keywords)))
- (ada2012
- (setq ada-keywords
- (append ada-83-keywords
- ada-95-keywords
- ada-2005-keywords
- ada-2012-keywords))))
-
- (when global-font-lock-mode
- ;; This calls ada-font-lock-keywords, which depends on
- ;; ada-keywords
- (font-lock-refresh-defaults))
-
(setq wisi-indent-comment-col-0 ada-indent-comment-col-0)
(setq wisi-auto-case ada-auto-case)
@@ -1745,6 +1716,48 @@ Unless WAIT, does not wait for parser to respond.
Returns the parser object."
(setq wisi-language-keywords ada-keywords)
(setq wisi-case-keyword ada-case-keyword)
(setq wisi-case-adjust-p-function #'ada-case-adjust-p)
+
+ ;;; See comment in ada-mode on startup cases for rationale on doing
+ ;;; ada-eglot-setup here.
+
+ (setq-local wisi-disable-parser nil)
+
+ (when (or (eq ada-xref-backend 'eglot)
+ (eq ada-indent-backend 'eglot)
+ (eq ada-face-backend 'eglot))
+ (require 'ada-eglot)
+ (when (fboundp 'ada-eglot-setup)
+ (ada-eglot-setup)))
+
+ (when (or (eq ada-xref-backend 'other)
+ (eq ada-indent-backend 'other)
+ (eq ada-face-backend 'other))
+ (when ada-other-backend-setup-function
+ (funcall ada-other-backend-setup-function)))
+
+ ;; We want at least one warning for missing ada-process-parse-exec,
+ ;; to give users a reminder to build/install it. But avoid that
+ ;; warning for users using eglot; ada-eglot-setup sets
+ ;; wisi-disable-parser if the wisi parser is not needed.
+ ;;
+ (unless wisi-disable-parser
+ (unless (executable-find ada-process-parse-exec)
+ (display-warning
+ 'ada
+ (format "Ada parser exec '%s' not found; install it, or set
ada-*-backend to eglot."
+ ada-process-parse-exec))
+ (setq-local wisi-disable-parser t)))
+
+ ;; wisi-setup tolerates parser nil.
+ (wisi-setup
+ :indent-calculate '(ada-wisi-comment)
+ :post-indent-fail 'ada-wisi-post-indent-fail
+ :parser (unless wisi-disable-parser (ada-parse-require-process)))
+
+ (when wisi-parser-shared
+ (setq-local beginning-of-defun-function #'ada-goto-declaration-start)
+ (setq-local end-of-defun-function #'ada-goto-declaration-end))
+
)
(put 'ada-mode 'custom-mode-group 'ada)
diff --git a/ada-mode.texi b/ada-mode.texi
index 21bece042f..73bf7cb1d9 100644
--- a/ada-mode.texi
+++ b/ada-mode.texi
@@ -25,7 +25,7 @@ developing GNU and promoting software freedom.''
@titlepage
@sp 10
-@title Ada Mode Version 7.1.3
+@title Ada Mode Version 8.0.2
@page
@vskip 0pt plus 1filll
@insertcopying
@@ -37,7 +37,7 @@ developing GNU and promoting software freedom.''
@node Top, Overview, (dir), (dir)
@top Top
-Ada Mode Version 7.1.3
+Ada Mode Version 8.0.2
@end ifnottex
@menu
@@ -62,18 +62,14 @@ Ada Mode Version 7.1.3
Overview
-* Why not LSP?::
+* wisi parser vs LSP::
+* Supported features::
Installation
* Ada executables::
* Known versions::
-Ada executables
-
-* Building GNATCOLL::
-* Building the executables::
-
Customizing Ada mode
* Slow response::
@@ -120,16 +116,18 @@ Developer overview
The Emacs mode for programming in Ada helps the user in reading
existing code and facilitates developing new code.
-Cross-reference information output by the compiler is used to provide
-powerful code navigation (jump to definition, find all uses, etc).
-
When you open a file with a file extension of @file{.ads} or
@file{.adb}, Emacs will automatically load and activate Ada
mode.
Ada mode works without any customization, if you are using the GNAT
compiler (@url{https://libre.adacore.com/}) and the GNAT default
-naming convention.
+naming convention. However, you must compile the parser; @xref{Ada
+executables} for how to do that.
+
+If you want to use the Emacs cross reference facility xref, you must
+install one of the ELPA packages eglot or gpr-query. @xref{wisi parser
+vs LSP vs ...} for more on this.
You must customize a few things if you are using a different file
naming convention or compiler; @xref{Non-standard file names},
@@ -147,36 +145,96 @@ tools.
information on debugging.
@menu
-* Why not LSP?::
+* wisi parser vs LSP::
+* Supported features::
@end menu
-@node Why not LSP?
-@section Why not LSP?
+@node wisi parser vs LSP vs ...
+@section wisi parser vs LSP vs ...
+ada-mode can be configured to work with a wisi parser, or an LSP
+language server via eglot. It can also be configured to experiment
+with other backends, such as tree-sitter or lsp-mode, but these other
+backends are not yet fully supported.
+
The Language Server Protocol (LSP, @url{https://langserver.org})
-supports an external language parser, as Ada mode does, and it is
-supported by the GNU ELPA package eglot. Ada mode does not use LSP mostly for
-historical reasons; the Ada mode parser was first developed before LSP
-was started. In addition, LSP does not support some of the navigation
-information provided by the Ada mode parser (although that could be
-provided as a custom command).
-
-We may investigate supporting an LSP parser in the future. In
-particular, the AdaCore Gnat Studio editor uses an LSP parser for
-several functions; Emacs Ada mode could use that as a backend if it
-supports LSP.
+defines an external language parser, and it is supported by the GNU
+ELPA package eglot, using an Ada language server provided by AdaCore
+(@code{ada_language_server},
+@url{https://github.com/AdaCore/ada_language_server/}). LSP supports
+face, indent, and multi-file navigation. However, as of
+@code{ada_language_server} version 22.0 (als), als does not provide
+face or single line indent (it does provide whole-file indent), so it
+is only useful for xref.
+
+The Emacs wisi package provides an interface to a custom parser
+generated by the WisiToken package; the parser provides face, indent,
+and single-file navigation.
+
+The Emacs gpr-query package provides an xref backend that uses
+information output by the GNAT compiler.
+
+By default, if the wisi parser is found, ada-mode uses it for face, indent,
+and single-file navigation.
+
+If the gpr-query executable is found, it is used for multi-file
+navigation. Otherwise, gnatxref is used. To use the eglot xref
+backend, you must explicitly set @code{ada-xref-backend} to
+@code{eglot}.
+
+Otherwise, if the language server is found, it is used for face and/or
+indent (assuming a future version of the @code{ada_language_server}
+supports these features).
+
+You can override the default choices by setting the elisp variables
+@code{ada-xref-backend, ada-indent-backend, ada-face-backend}. These
+can all take the value @code{other} to experiment with other backends.
+
+@node Supported features
+@section Supported features
+The following table lists features supported in either wisi or LSP,
+and whether LSP, wisi, @code{ada_language_server} version 22, eglot
+version 1.9 supports them.
+
+@multitable {wisi}{LSP}{als 22}{eglot 1.9}{ada-find-other-file moves to
corresponding declaration}
+@headitem wisi @tab LSP @tab als 22 @tab eglot 1.9 @tab feature
+@item t @tab t @tab nil @tab t @tab line/region indent; needs
documentRangeFormattingProvider
+@item t @tab t @tab nil @tab nil @tab ada-which-function; needs
DocumentSymbol
+@item t @tab nil @tab nil @tab nil @tab ada-fix-context-clause;
needs full syntax tree access
+@item t @tab nil @tab nil @tab nil @tab wisi-goto-*; needs full
syntax tree access
+@item t @tab nil @tab nil @tab nil @tab wisi-goto-*; needs full
syntax tree access
+@item t @tab nil @tab nil @tab nil @tab forward-sexp goes to next
keyword in statement; needs full syntax tree access
+@item t @tab t @tab nil @tab t @tab ada-find-other-file moves to
corresponding declaration; needs DocumentSymbol
+@item t @tab t @tab nil @tab nil @tab syntax-based identifier
faces; needs SemanticToken
+@item t @tab t @tab t @tab ? @tab refactor; wisi and als 22
support different refactor operations.
+@end multitable
+
+Similarly for gpr-query.
+@multitable {gpr-query}{LSP}{als 22}{eglot 1.9}{}
+@headitem gpr-query @tab LSP @tab als 22 @tab eglot 1.9 @tab feature
+@item t @tab nil @tab nil @tab nil @tab show overridden.
+@item t @tab nil @tab nil @tab nil @tab show overriding.
+@item t @tab nil @tab nil @tab nil @tab show parent types.
+@item t @tab t @tab t @tab t @tab show definitions.
+@item t @tab t @tab t @tab t @tab show references.
+@end multitable
@node Installation, Customization, Overview, Top
@chapter Installation
Ada mode requires Emacs 25.3 or greater. Compiling the Ada code for
the external process parser requires GNAT GPL 2017 or later; tested
-with GNAT Community Edition 2021 and GNAT Pro 22.2 (@pxref{Known
+with GNAT Community Edition 2021, GNAT Pro 22.2 (@pxref{Known
versions}).
Ada mode is distributed in the Gnu ELPA package archive; it can be
installed via @code{M-x list-packages} (@pxref{Packages,,,emacs,Emacs
-User Guide}). Note that it requires the @code{wisi} and
-@code{uniquify-files} packages as dependencies.
+User Guide}). Note that it requires several other packages as
+dependencies.
+
+Before ada-mode version 8, the Emacs packages gpr-query and gpr-mode
+were bundled with ada-mode; they have now been split out, so it is
+easier to configure ada-mode with eglot instead of gpr-query; you must
+install one of these if you want to use xref.
In Emacs < 27 you must first enable packages in your
@file{~/.emacs}, @emph{after} customizing
@@ -189,9 +247,9 @@ In Emacs < 27 you must first enable packages in your
To see what version of Ada mode you have installed, invoke @kbd{M-x
ada-mode-version}.
-You must also install the associated Ada executables (for the language
-parser). You may want to install the Ada Reference Manual in info
-format, via the ELPA package ada-ref-man.
+You must also install the associated Ada executables (see below). You
+may want to install the Ada Reference Manual in info format, via the
+ELPA package ada-ref-man.
@menu
* Ada executables::
@@ -201,157 +259,27 @@ format, via the ELPA package ada-ref-man.
@node Ada executables
@section Ada executables
-Ada mode requires the external parser, which must be compiled.
-
-Ada mode has support for an external cross reference tool
-@file{gpr_query}, which uses compiler-generated information. In the
-case of Ada, the necessary @file{.ali} files are automatically
-generated by the standard compilation process. For other languages,
-e.g. C, C++, @file{.gli} files can be generated using the compiler
-switch @code{-fdump-xref}. @code{-fdump-xref} is an AdaCore extension,
-not available in FSF GCC.
-
-@file{gpr_query} is an Ada program, which is distributed as source and
-must be built. Its source code is in the @code{ada-mode} Gnu ELPA package.
-
-@file{gpr_query} is similar to the AdaCore utility @code{gnatxref},
-but supports additional queries.
-
-Both the parser and @file{gpr_query} require the @code{GNATCOLL}
-library provided by AdaCore, distributed with GNAT GPL 2017 or later,
-and also available at Github
-(@url{https://github.com/AdaCore/gnatcoll}). The parser builds with
-the gnatcoll distributed with the gnat compiler. However, that
-gnatcoll does not include the xref package, which is required by
-@file{gpr_query}. So we must build gnatcoll xref from sources
-downloaded from github.
-
-The notes below assume that the compiler is installed at
-@file{$prefix}, e.g. @file{/usr/local/gnat-2019}, and that
-@file{$prefix/bin} is first on the @code{PATH}. If you are running
-Windows, use mingw64 @code{bash} to run these commands.
-
-On some operating systems, we must install gnatcoll-iconv; other
-operating systems don't need it.
-
-On linux, some versions of the @code{GNATCOLL.iconv} package (used by
-@code{gpr_query}, but not the parser) explicitly
-require the @file{libiconv.so} library. GNAT provides the
-@file{libiconv.so} library in @file{<gnat>/lib64/libiconv.so}. On
-Debian, that directory is not in the standard load path, and iconv is
-provided by glibc, so @file{libiconv.so} is not found on the standard
-load path. So you must set @var{LD_LIBRARY_PATH}, but only when
-running @code{gpr-query}:
-
-@example
-(setq gpr-query-env '("LD_LIBRARY_PATH=/Projects/gnat/pro_19.2/lib64")
-@end example
-@c FIXME: is this done by gpr-query-mode or wisi-prj? give example for
-@c wisi-prj setting.
-
-In general, @file{gpr_query} should be compiled with the compiler
-version that is used to generate the user project @file{.ali} files;
-the @file{ali} file format can change with each compiler
-version. @file{gpr_query} creates a database of cross reference
-information; that database must be deleted if the compiler version
-changes, to force a complete rebuild.
-
-@menu
-* Building GNATCOLL::
-* Building the executables::
-@end menu
-
-@node Building GNATCOLL
-@subsection Building GNATCOLL
-
-The GNAT Community and GNAT pro binary installs have some of the
-GNATCOLL packages we need, but we need to install others from source.
-
-Debian 11 provides binary packages for the GNATCOLL packages we need;
-@table @samp
-@item libgnatcoll-db-bin
-@item libgnatcoll-iconv20-dev
-@item libgnatcoll-sql4-dev
-@item libgnatcoll-sqlite20-dev
-@item libgnatcoll-xref21-dev
-@end table
-
-Debian does not provide a binary for gnatstub.
-
-If you are using GNAT Community, download gnatcoll-db from
-@url{https://github.com/AdaCore/gnatcoll-db}; select the latest
-release branch (or the one that matches your compiler), click on the
-``clone or download'' button, select ``Download ZIP''.
-
-If you are using GNAT Pro, download @file{gnatcoll-db.tar.gz} from the
-GNAT Studio sources in GNAT Tracker.
-
-Similarly, if needed for your OS, download gnatcoll-bindings from the
-GNAT Community sources. This is for gnatcoll-iconv; not needed on
-Windows.
-
-@c debian/comm-2020 requires gnatcoll-iconv
-@c debian/pro-21.1 requires gnatcoll-iconv
-
-Then unpack, build, and install the required components. If you are
-unsure whether you need to install iconv, skip that step; a later step
-will complain if it is needed.
-
-If @code{./setup.py} complains it can't find @code{python}, try
-@code{python3 setup.py ...}.
-
-For github gnatcoll-db version 21.2, apply gnatcoll-2021-sql.diff.
-
-@example
-unzip ~/Downloads/gnatcoll-bindings-22.2.zip
-cd gnatcoll-bindings-22.2
-cd iconv
-./setup.py build
-./setup.py install
-
-unzip ~/Downloads/gnatcoll-db-22.2.zip
-cd gnatcoll-db-22.2
-make -C sql
-make -C sql install
-make -C sqlite
-make -C sqlite install
-make -C xref
-make -C xref install
-@end example
-
-@c To build gnatcoll-core with debug, edit the corresponding gpr file
-@c to delete @code{-gnatwe} (there are lots of warnings about license
-@c incompatibility, and a few other things). Then _do not_ build or
-@c install; just setup to create the .gpr files. Installing causes
-@c lots of spurious warnings about files need to be
-@c recompiled. Uninstall core, sql, sqlite, xref; add the build
-@c directories to GPR_PROJECT_PATH, add @code{BUILD=DEBUG} to the
-@c command line, edit the .gpr files to set OS. Sigh; that still
-@c doesn't work.
+Ada mode requires either the external parser and gpr-query, or the Ada
+language server @code{ada_language_server}. All of these can be
+installed via the Alire Ada package manager
+(@url{https://alire.ada.dev/}), or compiled directly.
-@node Building the executables
-@subsection Building the executables
+See the gpr-query package for information on compiling gpr-query.
-@file{gpr_query} requires the @code{pthread} library. On Windows, this
-is available in Mingw64 as package
-@code{mingw64/mingw-w64-x86_64-winpthreads-git}.
-
-To build and install @file{gpr_query} and the parser, assuming the
-@code{ada-mode-6.0.xx} GNU ELPA package is installed:
+To install the external parser,
@example
-cd ~/.emacs.d/elpa/ada-mode-6.0.xx
+cd ~/.emacs.d/elpa/ada-mode-i.j.xx
./build.sh
./install.sh
@end example
-By default, @file{install.sh} installs the executables in the same
-directory as the GNAT executable (using @file{gprinstall}). If you
-don't have write privileges there, or if you want to install somewhere
-else, use @code{install.sh --prefix=<dir>}.
+By default, @file{install.sh} installs the parser executable in
+@code{$HOME/.local/bin}. If you want to install somewhere else, use
+@code{install.sh --prefix=<dir>}.
-@code{ada-mode} will use @file{gpr_query} and the parser if they are
-found in @code{PATH}.
+These scripts default to use Alire (@url{https://alire.ada.dev/}) if
+it is found on @code{PATH}; otherwise they use @code{gprbuild}.
@node Known versions
@section Known versions
@@ -382,15 +310,23 @@ version, something like ``10.3.0'', possibly followed by
a date.
This version is derived from some AdaCore version, but is typically
not identical to a released version. It may be supported by the
packager.
+
+@item Alire
+Alire packages several recent versions of the FSF compiler. It is used
+by all Alire build commands. The versions available can be listed by:
+@example
+alr toolchain
+@end table
+
+The compiler can be installed for external use by:
+@example
+alr toolchain --install <version> --install-dir <prefix>
@end table
Sometimes compiler versions change what code they accept, particularly
in the area of access types. So some compiler versions may require
-minor edits of the code; there is a ``WORKAROUND'' comment in the code
-describing the edit required.
-
-Sometimes there is a bug in the gnatcoll source; we provide a patch
-file.
+minor edits of the ada-mode code; there is a ``WORKAROUND'' comment in
+the code describing the edit required.
Compiler versions that work:
@table @samp
@@ -404,8 +340,6 @@ No edits required.
@item Community 2021
Requires ada-mode version 7.1.6 or later.
-gnatcoll requires a patch; @xref{Building GNATCOLL}.
-
@item Pro 20.2
Requires ada-mode version 7.1.6 or later.
@@ -418,6 +352,11 @@ No edits required.
No edits required.
@item FSF 11.1.0
+No edits required.
+
+@item FSF 12.1
+No edits required.
+
@end table
Compiler versions that fail:
@@ -1508,11 +1447,19 @@ The current project file is shown by the menu command
@key{Ada | Project Files | Show project}.
To set the project file, use the menu command @key{Ada | Project Files | Find
and
-select Project ...}, or one of the elisp functions described in
-@ref{Selecting Projects,,, wisi, Wisi User Guide}.
+select Project ...}.
+
+You can also set the project file on the Emacs command line. For
+@code{Example_2} in @xref{Compiling Examples}:
+@example
+cd .../Example_2
+emacs --eval "(ada-build-prompt-select-prj-file \"hello.gpr\")" hello.adb
+@end example
-The project file may also be a GNAT project file (with file extension
-is @code{.gpr}).
+Finally, you can set the project file in some lisp startup code
+using one of the elisp functions described in @ref{Selecting
+Projects,,, wisi, Wisi User Guide}. The project file may also be a
+GNAT project file (with file extension is @code{.gpr}).
@node Project file variables, , Project file overview, Project files
@section Project file variables
@@ -1525,27 +1472,24 @@ that are lists are elisp lists.
wisi defines some project variables, Ada mode defines some, others are
defined by the compiler and the cross reference tool.
-Here is the list of variables valid defined by wisi and Ada mode. In
+Here is the list of variables valid defined by Ada mode; @ref{Project
+files,,, wisi, Wisi User Guide} for the variables defined by wisi. In
the default values, the current directory @code{"."} is the directory
containing the project file.
@table @asis
@c These are the names that appear in the .prj file.
@c
-@c defined in wisi-prj.el and ada-mode.el wisi-prj-parse-one.
-@c defaults defined in ada-mode.el ada-prj-default
+@c defined in wisi-prj.el and ada-core.el wisi-prj-parse-one.
+@c defaults defined in ada-core.el ada-prj-default
@item @code{ada_compiler} [default: @code{ada-compiler, gnat}]
Ada compiler for this project.
Setting this in the project file reinitializes all options for the
-xref tool, so it must occur before any compiler-specific project
+compiler, so it must occur before any compiler-specific project
variable.
-@item @code{casing}
-List of files containing casing exceptions.
-@xref{Automatic casing,,, wisi, Wisi User Guide}.
-
@item @code{gnat-stub-args}
List of strings passed to @code{gnat stub} when it is run.
@@ -1554,32 +1498,29 @@ List of strings passed to @code{gnat stub} after
@code{-cargs}.
@item @code{obj_dir}
A list of directories to search for object and cross-reference
-files. Only needed if you are not using GPR files.
+files. Only needed if you are not using gpr files.
-@item @code{src_dir}
-A list of directories to search for source files. Added to the source
-directories from a gpr file (if any).
-
-@item @code{xref_tool} [default: @code{ada-xref-tool}]
-Cross reference tool for this project.
+@item @code{xref_backend} [default: @code{ada-xref-backend}]
+Cross reference backend for this project.
Setting this in the project file reinitializes all options for the
-xref tool, so it must occur in the project file before any other
-settings that affect the xref tool.
-
-If @file{gpr_query} is found in @code{PATH}, @code{ada-xref-tool}
-defaults to @code{'gpr_query}. Otherwise, it defaults to @code{'gnat},
-which uses @code{gnat find}.
-
+xref backend, so it must occur in the project file before any other
+settings that affect the xref backend.
@end table
The following project file variables are defined by the GNAT compiler:
@table @asis
-@c defined in gnat-core.el wisi-compiler-parse-one.
+@c defined in gnat-compiler.el wisi-compiler-parse-one.
@item @code{ada_project_path} [default: ]
Same as @code{gpr_project_path}; see below.
+@item @code{gnat-stub-cargs} [default: nil]
+Arguments passed to @code{gnat stub --cargs}.
+
+@item @code{gnat-stub-opts} [default: nil]
+Arguments passed to @code{gnat stub}.
+
@item @code{gpr_file} [default: ]
The GNAT project file for the project.
@@ -1589,7 +1530,7 @@ project file are appended to @code{src_dir} and
with a GNAT project file, and other source directories with the Emacs
project file.
-@item @code{gpr_project_path} [default: ]
+@item @code{gpr_project_path} [default: nil]
A list of directories to
search for GNAT project files. The list is passed to tools via the
@code{GPR_PROJECT_PATH} process environment variable in the process
@@ -1892,29 +1833,6 @@ In rare cases, the parser gets confused; it can be reset
by invoking
menu @key{Ada | Misc | Restart parser}. Please report such cases as a
bug.
-@menu
-* Ada-specific indent functions::
-@end menu
-
-@node Ada-specific indent functions
-@section Ada-specific indent functions
-The following indent functions are defined by the ada-mode grammar
-backend (@xref{Indent functions,,, wisi, Wisi User Guide}).
-
-@table @code
-@item ada-indent-aggregate
-Insures that aggregates are indented consistently; see the code for
-more details. Only used once in the grammar; for @code{aggregate} in
-@code{primary}.
-
-@c FIXME: doc these!
-@item ada-indent-aspect
-@item ada-indent-renames
-@item ada-indent-return
-@item ada-indent-record
-@item ada-indent-record*
-@end table
-
@node Statement skeletons, Aligning code, Indentation, Top
@chapter Statement skeletons
diff --git a/ada-skel.el b/ada-skel.el
index 21d1f377a0..76aafbc407 100644
--- a/ada-skel.el
+++ b/ada-skel.el
@@ -1,6 +1,6 @@
;;; ada-skel.el --- Extension to Ada mode for inserting statement skeletons
-*- lexical-binding:t -*-
-;; Copyright (C) 1987, 1993, 1994, 1996-2021 Free Software Foundation, Inc.
+;; Copyright (C) 1987, 1993, 1994, 1996-2022 Free Software Foundation, Inc.
;; Authors: Stephen Leake <stephen_leake@stephe-leake.org>
@@ -367,9 +367,7 @@ See `ada-find-other-file' to create library level package
body from spec."
"Setup a buffer for ada-skel."
(setq wisi-skel-token-alist ada-skel-token-alist)
(add-hook 'skeleton-end-hook #'wisi-indent-statement -90 t)
- (when (and ada-skel-initial-string
- (= (buffer-size) 0))
- (insert ada-skel-initial-string))
+ ;; Enable auto-insert-mode to insert ada-skel-initial-string in new files.
)
(add-hook 'ada-mode-hook #'ada-skel-setup)
diff --git a/ada_annex_p.wy b/ada_annex_p.wy
index f260e37b2d..efb033cec0 100644
--- a/ada_annex_p.wy
+++ b/ada_annex_p.wy
@@ -37,33 +37,25 @@
%meta_syntax EBNF
%code copyright_license %{
-;; Copyright (C) 2013 - 2022 Free Software Foundation, Inc.
-
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 3, or (at
-;; your option) any later version.
-;;
-;; This software is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-}%
-
-%code actions spec post
-%{
- Partial_Parse_Active : aliased Boolean := False;
- Partial_Parse_Byte_Goal : aliased WisiToken.Buffer_Pos :=
WisiToken.Buffer_Pos'Last;
+-- Copyright (C) 2013 - 2022 Free Software Foundation, Inc.
+
+-- This program is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU General Public License as
+-- published by the Free Software Foundation; either version 3, or (at
+-- your option) any later version.
+--
+-- This software is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
}%
%generate LALR Ada_Emacs re2c Process
%generate LR1 Ada_Emacs text_rep re2c Process
-%lr1_hash_table_size 124_087
-
%language_runtime "Wisi.Ada"
;; wisitoken-parse-lr-mckenzie_recover.adb requires 16.
@@ -1035,7 +1027,7 @@ iterated_element_association
ada-indent-broken]))%
;
-AND_relation_list ;;:new, split out from expression for action. FIXME: put back
+AND_relation_list ;;:new, split out from expression for action.
: 'and' relation
| AND_relation_list 'and' relation
;
@@ -2367,7 +2359,8 @@ exception_handler_list ;;:new for pragma, action
: exception_handler
| pragma_g ;;:new for pragma
| exception_handler_list exception_handler
- %((wisi-motion-action [1 2]))%
+ %((wisi-statement-action [1 motion 2 motion])
+ (wisi-motion-action [1 2]))%
;
handled_sequence_of_statements
diff --git a/ada_annex_p_process_actions.adb b/ada_annex_p_process_actions.adb
index 91b63ccdcd..2fa3e8b1c1 100644
--- a/ada_annex_p_process_actions.adb
+++ b/ada_annex_p_process_actions.adb
@@ -13294,6 +13294,7 @@ package body Ada_Annex_P_Process_Actions is
begin
case Parse_Data.Post_Parse_Action is
when Navigate =>
+ Statement_Action (Parse_Data, Tree, Nonterm, ((1, Motion), (2,
Motion)));
Motion_Action (Parse_Data, Tree, Nonterm, (Index_ID'(1,
Invalid_Token_ID) & Index_ID'(2, Invalid_Token_ID)));
when Face =>
null;
diff --git a/ada_annex_p_process_actions.ads b/ada_annex_p_process_actions.ads
index cec9c42b85..56857b4ff7 100644
--- a/ada_annex_p_process_actions.ads
+++ b/ada_annex_p_process_actions.ads
@@ -3723,7 +3723,6 @@ package Ada_Annex_P_Process_Actions is
Tokens : in WisiToken.Syntax_Trees.Recover_Token_Array;
Recover_Active : in Boolean)
return WisiToken.Syntax_Trees.In_Parse_Actions.Status;
-
Partial_Parse_Active : aliased Boolean := False;
Partial_Parse_Byte_Goal : aliased WisiToken.Buffer_Pos :=
WisiToken.Buffer_Pos'Last;
end Ada_Annex_P_Process_Actions;
diff --git a/ada_annex_p_process_lalr_main.adb
b/ada_annex_p_process_lalr_main.adb
index a5d43b287e..0d2068e0e9 100644
--- a/ada_annex_p_process_lalr_main.adb
+++ b/ada_annex_p_process_lalr_main.adb
@@ -17,10 +17,10 @@
-- You should have received a copy of the GNU General Public License
-- along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-with Ada_Annex_P_Process_Actions; use Ada_Annex_P_Process_Actions;
with SAL;
with WisiToken.Lexer.re2c;
with ada_annex_p_re2c_c;
+with Ada_Annex_P_Process_Actions; use Ada_Annex_P_Process_Actions;
package body Ada_Annex_P_Process_LALR_Main is
function Is_Block_Delimited (ID : in WisiToken.Token_ID) return Boolean
@@ -31460,11 +31460,6 @@ package body Ada_Annex_P_Process_LALR_Main is
return Table;
end Create_Parse_Table;
- function Create_Lexer (Trace : in WisiToken.Trace_Access) return
WisiToken.Lexer.Handle
- is begin
- return Lexer.New_Lexer (Trace,
Ada_Annex_P_Process_Actions.Descriptor'Access);
- end Create_Lexer;
-
function Create_Productions return
WisiToken.Syntax_Trees.Production_Info_Trees.Vector
is begin
return Result : WisiToken.Syntax_Trees.Production_Info_Trees.Vector do
@@ -32899,4 +32894,24 @@ package body Ada_Annex_P_Process_LALR_Main is
end return;
end Create_Productions;
+ function Create_Parser
+ (Trace : in WisiToken.Trace_Access;
+ User_Data : in WisiToken.Syntax_Trees.User_Data_Access;
+ Language_Fixes : in
WisiToken.Parse.LR.Parser.Language_Fixes_Access;
+ Language_Matching_Begin_Tokens : in
WisiToken.Parse.LR.Parser.Language_Matching_Begin_Tokens_Access;
+ Language_String_ID_Set : in
WisiToken.Parse.LR.Parser.Language_String_ID_Set_Access)
+ return WisiToken.Parse.LR.Parser.Parser
+ is begin
+ return Parser : WisiToken.Parse.LR.Parser.Parser do
+ Parser.Tree.Lexer := Lexer.New_Lexer (Trace,
Ada_Annex_P_Process_Actions.Descriptor'Access);
+ Parser.Productions := Create_Productions;
+ Parser.User_Data := User_Data;
+ Parser.Partial_Parse_Active :=
Ada_Annex_P_Process_Actions.Partial_Parse_Active'Access;
+ Parser.Partial_Parse_Byte_Goal :=
Ada_Annex_P_Process_Actions.Partial_Parse_Byte_Goal'Access;
+ Parser.Table := Create_Parse_Table;
+ Parser.Language_Fixes := Language_Fixes;
+ Parser.Language_Matching_Begin_Tokens :=
Language_Matching_Begin_Tokens;
+ Parser.Language_String_ID_Set := Language_String_ID_Set;
+ end return;
+ end Create_Parser;
end Ada_Annex_P_Process_LALR_Main;
diff --git a/ada_annex_p_process_lalr_main.ads
b/ada_annex_p_process_lalr_main.ads
index 266e735e31..f0fc9b0991 100644
--- a/ada_annex_p_process_lalr_main.ads
+++ b/ada_annex_p_process_lalr_main.ads
@@ -18,14 +18,15 @@
-- along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
with WisiToken.Syntax_Trees;
-with WisiToken.Lexer;
-with WisiToken.Parse.LR;
+with WisiToken.Parse.LR.Parser;
package Ada_Annex_P_Process_LALR_Main is
- function Create_Parse_Table
- return WisiToken.Parse.LR.Parse_Table_Ptr;
+ function Create_Parser
+ (Trace : in WisiToken.Trace_Access;
+ User_Data : in WisiToken.Syntax_Trees.User_Data_Access;
+ Language_Fixes : in
WisiToken.Parse.LR.Parser.Language_Fixes_Access;
+ Language_Matching_Begin_Tokens : in
WisiToken.Parse.LR.Parser.Language_Matching_Begin_Tokens_Access;
+ Language_String_ID_Set : in
WisiToken.Parse.LR.Parser.Language_String_ID_Set_Access)
+ return WisiToken.Parse.LR.Parser.Parser;
- function Create_Productions return
WisiToken.Syntax_Trees.Production_Info_Trees.Vector;
-
- function Create_Lexer (Trace : in WisiToken.Trace_Access) return
WisiToken.Lexer.Handle;
end Ada_Annex_P_Process_LALR_Main;
diff --git a/ada_annex_p_process_lr1_main.adb b/ada_annex_p_process_lr1_main.adb
index 9838beeec5..cfde664581 100644
--- a/ada_annex_p_process_lr1_main.adb
+++ b/ada_annex_p_process_lr1_main.adb
@@ -17,10 +17,10 @@
-- You should have received a copy of the GNU General Public License
-- along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-with Ada_Annex_P_Process_Actions; use Ada_Annex_P_Process_Actions;
with SAL;
with WisiToken.Lexer.re2c;
with ada_annex_p_re2c_c;
+with Ada_Annex_P_Process_Actions; use Ada_Annex_P_Process_Actions;
package body Ada_Annex_P_Process_LR1_Main is
function Is_Block_Delimited (ID : in WisiToken.Token_ID) return Boolean
@@ -361,11 +361,6 @@ package body Ada_Annex_P_Process_LR1_Main is
return Table;
end Create_Parse_Table;
- function Create_Lexer (Trace : in WisiToken.Trace_Access) return
WisiToken.Lexer.Handle
- is begin
- return Lexer.New_Lexer (Trace,
Ada_Annex_P_Process_Actions.Descriptor'Access);
- end Create_Lexer;
-
function Create_Productions return
WisiToken.Syntax_Trees.Production_Info_Trees.Vector
is begin
return Result : WisiToken.Syntax_Trees.Production_Info_Trees.Vector do
@@ -1800,4 +1795,25 @@ package body Ada_Annex_P_Process_LR1_Main is
end return;
end Create_Productions;
+ function Create_Parser
+ (Trace : in WisiToken.Trace_Access;
+ User_Data : in WisiToken.Syntax_Trees.User_Data_Access;
+ Language_Fixes : in
WisiToken.Parse.LR.Parser.Language_Fixes_Access;
+ Language_Matching_Begin_Tokens : in
WisiToken.Parse.LR.Parser.Language_Matching_Begin_Tokens_Access;
+ Language_String_ID_Set : in
WisiToken.Parse.LR.Parser.Language_String_ID_Set_Access;
+ Text_Rep_File_Name : in String)
+ return WisiToken.Parse.LR.Parser.Parser
+ is begin
+ return Parser : WisiToken.Parse.LR.Parser.Parser do
+ Parser.Tree.Lexer := Lexer.New_Lexer (Trace,
Ada_Annex_P_Process_Actions.Descriptor'Access);
+ Parser.Productions := Create_Productions;
+ Parser.User_Data := User_Data;
+ Parser.Partial_Parse_Active :=
Ada_Annex_P_Process_Actions.Partial_Parse_Active'Access;
+ Parser.Partial_Parse_Byte_Goal :=
Ada_Annex_P_Process_Actions.Partial_Parse_Byte_Goal'Access;
+ Parser.Table := Create_Parse_Table (Text_Rep_File_Name);
+ Parser.Language_Fixes := Language_Fixes;
+ Parser.Language_Matching_Begin_Tokens :=
Language_Matching_Begin_Tokens;
+ Parser.Language_String_ID_Set := Language_String_ID_Set;
+ end return;
+ end Create_Parser;
end Ada_Annex_P_Process_LR1_Main;
diff --git a/ada_annex_p_process_lr1_main.ads b/ada_annex_p_process_lr1_main.ads
index e191ef5a2e..ecd1edd2df 100644
--- a/ada_annex_p_process_lr1_main.ads
+++ b/ada_annex_p_process_lr1_main.ads
@@ -18,15 +18,16 @@
-- along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
with WisiToken.Syntax_Trees;
-with WisiToken.Lexer;
-with WisiToken.Parse.LR;
+with WisiToken.Parse.LR.Parser;
package Ada_Annex_P_Process_LR1_Main is
- function Create_Parse_Table
- (Text_Rep_File_Name : in String)
- return WisiToken.Parse.LR.Parse_Table_Ptr;
+ function Create_Parser
+ (Trace : in WisiToken.Trace_Access;
+ User_Data : in WisiToken.Syntax_Trees.User_Data_Access;
+ Language_Fixes : in
WisiToken.Parse.LR.Parser.Language_Fixes_Access;
+ Language_Matching_Begin_Tokens : in
WisiToken.Parse.LR.Parser.Language_Matching_Begin_Tokens_Access;
+ Language_String_ID_Set : in
WisiToken.Parse.LR.Parser.Language_String_ID_Set_Access;
+ Text_Rep_File_Name : in String)
+ return WisiToken.Parse.LR.Parser.Parser;
- function Create_Productions return
WisiToken.Syntax_Trees.Production_Info_Trees.Vector;
-
- function Create_Lexer (Trace : in WisiToken.Trace_Access) return
WisiToken.Lexer.Handle;
end Ada_Annex_P_Process_LR1_Main;
diff --git a/ada_annex_p_re2c.c b/ada_annex_p_re2c.c
index a01cc3a840..2dc421e62d 100644
--- a/ada_annex_p_re2c.c
+++ b/ada_annex_p_re2c.c
@@ -1,5 +1,5 @@
-/* Generated by re2c 2.0.2 */
-#line 1 "ada_annex_p.re2c"
+/* Generated by re2c 2.2 */
+#line 1 "../ada_annex_p.re2c"
// generated parser support file. -*- buffer-read-only:t mode: C -*-
// command line: wisitoken-bnf-generate.exe --generate LALR Ada_Emacs re2c
PROCESS ada_annex_p.wy
//
@@ -166,7 +166,7 @@ int ada_annex_p_next_token
while (*id == -1 && status == 0)
{
-#line 170 "ada_annex_p_re2c.c"
+#line 170 "../ada_annex_p_re2c.c"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
@@ -358,26 +358,26 @@ yy3:
}
yy4:
YYDEBUG(4, YYPEEK());
-#line 290 "ada_annex_p.re2c"
+#line 290 "../ada_annex_p.re2c"
{ lexer->byte_token_start = lexer->cursor;
lexer->char_token_start = lexer->char_pos;
lexer->line_token_start = lexer->line;
continue; }
-#line 367 "ada_annex_p_re2c.c"
+#line 367 "../ada_annex_p_re2c.c"
yy5:
YYDEBUG(5, YYPEEK());
YYSKIP();
YYDEBUG(6, YYPEEK());
-#line 412 "ada_annex_p.re2c"
+#line 412 "../ada_annex_p.re2c"
{*id = 119; continue;}
-#line 374 "ada_annex_p_re2c.c"
+#line 374 "../ada_annex_p_re2c.c"
yy7:
YYDEBUG(7, YYPEEK());
YYSKIP();
YYDEBUG(8, YYPEEK());
-#line 294 "ada_annex_p.re2c"
+#line 294 "../ada_annex_p.re2c"
{*id = 1; lexer->line++; continue;}
-#line 381 "ada_annex_p_re2c.c"
+#line 381 "../ada_annex_p_re2c.c"
yy9:
YYDEBUG(9, YYPEEK());
yyaccept = 0;
@@ -393,9 +393,9 @@ yy10:
YYSKIP();
yy11:
YYDEBUG(11, YYPEEK());
-#line 414 "ada_annex_p.re2c"
+#line 414 "../ada_annex_p.re2c"
{status = ERROR_unrecognized_character; continue;}
-#line 399 "ada_annex_p_re2c.c"
+#line 399 "../ada_annex_p_re2c.c"
yy12:
YYDEBUG(12, YYPEEK());
yyaccept = 1;
@@ -691,16 +691,16 @@ yy15:
}
yy16:
YYDEBUG(16, YYPEEK());
-#line 409 "ada_annex_p.re2c"
+#line 409 "../ada_annex_p.re2c"
{*id = 116; continue;}
-#line 697 "ada_annex_p_re2c.c"
+#line 697 "../ada_annex_p_re2c.c"
yy17:
YYDEBUG(17, YYPEEK());
YYSKIP();
YYDEBUG(18, YYPEEK());
-#line 382 "ada_annex_p.re2c"
+#line 382 "../ada_annex_p.re2c"
{*id = 89; continue;}
-#line 704 "ada_annex_p_re2c.c"
+#line 704 "../ada_annex_p_re2c.c"
yy19:
YYDEBUG(19, YYPEEK());
yyaccept = 3;
@@ -861,23 +861,23 @@ yy19:
}
yy20:
YYDEBUG(20, YYPEEK());
-#line 406 "ada_annex_p.re2c"
+#line 406 "../ada_annex_p.re2c"
{*id = 113; continue;}
-#line 867 "ada_annex_p_re2c.c"
+#line 867 "../ada_annex_p_re2c.c"
yy21:
YYDEBUG(21, YYPEEK());
YYSKIP();
YYDEBUG(22, YYPEEK());
-#line 378 "ada_annex_p.re2c"
+#line 378 "../ada_annex_p.re2c"
{*id = 85; continue;}
-#line 874 "ada_annex_p_re2c.c"
+#line 874 "../ada_annex_p_re2c.c"
yy23:
YYDEBUG(23, YYPEEK());
YYSKIP();
YYDEBUG(24, YYPEEK());
-#line 380 "ada_annex_p.re2c"
+#line 380 "../ada_annex_p.re2c"
{*id = 87; continue;}
-#line 881 "ada_annex_p_re2c.c"
+#line 881 "../ada_annex_p_re2c.c"
yy25:
YYDEBUG(25, YYPEEK());
YYSKIP();
@@ -888,23 +888,23 @@ yy25:
}
yy26:
YYDEBUG(26, YYPEEK());
-#line 404 "ada_annex_p.re2c"
+#line 404 "../ada_annex_p.re2c"
{*id = 111; continue;}
-#line 894 "ada_annex_p_re2c.c"
+#line 894 "../ada_annex_p_re2c.c"
yy27:
YYDEBUG(27, YYPEEK());
YYSKIP();
YYDEBUG(28, YYPEEK());
-#line 400 "ada_annex_p.re2c"
+#line 400 "../ada_annex_p.re2c"
{*id = 107; continue;}
-#line 901 "ada_annex_p_re2c.c"
+#line 901 "../ada_annex_p_re2c.c"
yy29:
YYDEBUG(29, YYPEEK());
YYSKIP();
YYDEBUG(30, YYPEEK());
-#line 388 "ada_annex_p.re2c"
+#line 388 "../ada_annex_p.re2c"
{*id = 95; continue;}
-#line 908 "ada_annex_p_re2c.c"
+#line 908 "../ada_annex_p_re2c.c"
yy31:
YYDEBUG(31, YYPEEK());
yyaccept = 4;
@@ -917,9 +917,9 @@ yy31:
}
yy32:
YYDEBUG(32, YYPEEK());
-#line 399 "ada_annex_p.re2c"
+#line 399 "../ada_annex_p.re2c"
{*id = 106; continue;}
-#line 923 "ada_annex_p_re2c.c"
+#line 923 "../ada_annex_p_re2c.c"
yy33:
YYDEBUG(33, YYPEEK());
YYSKIP();
@@ -930,9 +930,9 @@ yy33:
}
yy34:
YYDEBUG(34, YYPEEK());
-#line 389 "ada_annex_p.re2c"
+#line 389 "../ada_annex_p.re2c"
{*id = 96; continue;}
-#line 936 "ada_annex_p_re2c.c"
+#line 936 "../ada_annex_p_re2c.c"
yy35:
YYDEBUG(35, YYPEEK());
YYSKIP();
@@ -943,9 +943,9 @@ yy35:
}
yy36:
YYDEBUG(36, YYPEEK());
-#line 402 "ada_annex_p.re2c"
+#line 402 "../ada_annex_p.re2c"
{*id = 109; continue;}
-#line 949 "ada_annex_p_re2c.c"
+#line 949 "../ada_annex_p_re2c.c"
yy37:
YYDEBUG(37, YYPEEK());
yyaccept = 5;
@@ -975,9 +975,9 @@ yy37:
}
yy39:
YYDEBUG(39, YYPEEK());
-#line 408 "ada_annex_p.re2c"
+#line 408 "../ada_annex_p.re2c"
{*id = 115; continue;}
-#line 981 "ada_annex_p_re2c.c"
+#line 981 "../ada_annex_p_re2c.c"
yy40:
YYDEBUG(40, YYPEEK());
YYSKIP();
@@ -988,16 +988,16 @@ yy40:
}
yy41:
YYDEBUG(41, YYPEEK());
-#line 386 "ada_annex_p.re2c"
+#line 386 "../ada_annex_p.re2c"
{*id = 93; continue;}
-#line 994 "ada_annex_p_re2c.c"
+#line 994 "../ada_annex_p_re2c.c"
yy42:
YYDEBUG(42, YYPEEK());
YYSKIP();
YYDEBUG(43, YYPEEK());
-#line 401 "ada_annex_p.re2c"
+#line 401 "../ada_annex_p.re2c"
{*id = 108; continue;}
-#line 1001 "ada_annex_p_re2c.c"
+#line 1001 "../ada_annex_p_re2c.c"
yy44:
YYDEBUG(44, YYPEEK());
YYSKIP();
@@ -1010,9 +1010,9 @@ yy44:
}
yy45:
YYDEBUG(45, YYPEEK());
-#line 396 "ada_annex_p.re2c"
+#line 396 "../ada_annex_p.re2c"
{*id = 103; continue;}
-#line 1016 "ada_annex_p_re2c.c"
+#line 1016 "../ada_annex_p_re2c.c"
yy46:
YYDEBUG(46, YYPEEK());
yyaccept = 6;
@@ -1026,9 +1026,9 @@ yy46:
}
yy47:
YYDEBUG(47, YYPEEK());
-#line 391 "ada_annex_p.re2c"
+#line 391 "../ada_annex_p.re2c"
{*id = 98; continue;}
-#line 1032 "ada_annex_p_re2c.c"
+#line 1032 "../ada_annex_p_re2c.c"
yy48:
YYDEBUG(48, YYPEEK());
YYSKIP();
@@ -1040,16 +1040,16 @@ yy48:
}
yy49:
YYDEBUG(49, YYPEEK());
-#line 393 "ada_annex_p.re2c"
+#line 393 "../ada_annex_p.re2c"
{*id = 100; continue;}
-#line 1046 "ada_annex_p_re2c.c"
+#line 1046 "../ada_annex_p_re2c.c"
yy50:
YYDEBUG(50, YYPEEK());
YYSKIP();
YYDEBUG(51, YYPEEK());
-#line 383 "ada_annex_p.re2c"
+#line 383 "../ada_annex_p.re2c"
{*id = 90; continue;}
-#line 1053 "ada_annex_p_re2c.c"
+#line 1053 "../ada_annex_p_re2c.c"
yy52:
YYDEBUG(52, YYPEEK());
yyaccept = 2;
@@ -1335,16 +1335,16 @@ yy71:
}
yy72:
YYDEBUG(72, YYPEEK());
-#line 379 "ada_annex_p.re2c"
+#line 379 "../ada_annex_p.re2c"
{*id = 86; continue;}
-#line 1341 "ada_annex_p_re2c.c"
+#line 1341 "../ada_annex_p_re2c.c"
yy73:
YYDEBUG(73, YYPEEK());
YYSKIP();
YYDEBUG(74, YYPEEK());
-#line 381 "ada_annex_p.re2c"
+#line 381 "../ada_annex_p.re2c"
{*id = 88; continue;}
-#line 1348 "ada_annex_p_re2c.c"
+#line 1348 "../ada_annex_p_re2c.c"
yy75:
YYDEBUG(75, YYPEEK());
yyaccept = 5;
@@ -1561,9 +1561,9 @@ yy78:
YYDEBUG(78, YYPEEK());
YYSKIP();
YYDEBUG(79, YYPEEK());
-#line 384 "ada_annex_p.re2c"
+#line 384 "../ada_annex_p.re2c"
{*id = 91; continue;}
-#line 1567 "ada_annex_p_re2c.c"
+#line 1567 "../ada_annex_p_re2c.c"
yy80:
YYDEBUG(80, YYPEEK());
YYSKIP();
@@ -2328,9 +2328,9 @@ yy91:
}
yy92:
YYDEBUG(92, YYPEEK());
-#line 410 "ada_annex_p.re2c"
+#line 410 "../ada_annex_p.re2c"
{*id = 117; continue;}
-#line 2334 "ada_annex_p_re2c.c"
+#line 2334 "../ada_annex_p_re2c.c"
yy93:
YYDEBUG(93, YYPEEK());
YYSKIP();
@@ -3530,9 +3530,9 @@ yy119:
YYDEBUG(119, YYPEEK());
YYSKIP();
YYDEBUG(120, YYPEEK());
-#line 405 "ada_annex_p.re2c"
+#line 405 "../ada_annex_p.re2c"
{*id = 112; continue;}
-#line 3536 "ada_annex_p_re2c.c"
+#line 3536 "../ada_annex_p_re2c.c"
yy121:
YYDEBUG(121, YYPEEK());
YYSKIP();
@@ -3724,16 +3724,16 @@ yy123:
YYDEBUG(123, YYPEEK());
YYSKIP();
YYDEBUG(124, YYPEEK());
-#line 390 "ada_annex_p.re2c"
+#line 390 "../ada_annex_p.re2c"
{*id = 97; continue;}
-#line 3730 "ada_annex_p_re2c.c"
+#line 3730 "../ada_annex_p_re2c.c"
yy125:
YYDEBUG(125, YYPEEK());
YYSKIP();
YYDEBUG(126, YYPEEK());
-#line 403 "ada_annex_p.re2c"
+#line 403 "../ada_annex_p.re2c"
{*id = 110; continue;}
-#line 3737 "ada_annex_p_re2c.c"
+#line 3737 "../ada_annex_p_re2c.c"
yy127:
YYDEBUG(127, YYPEEK());
YYSKIP();
@@ -3786,9 +3786,9 @@ yy131:
YYDEBUG(131, YYPEEK());
YYSKIP();
YYDEBUG(132, YYPEEK());
-#line 387 "ada_annex_p.re2c"
+#line 387 "../ada_annex_p.re2c"
{*id = 94; continue;}
-#line 3792 "ada_annex_p_re2c.c"
+#line 3792 "../ada_annex_p_re2c.c"
yy133:
YYDEBUG(133, YYPEEK());
yyaccept = 9;
@@ -3801,23 +3801,23 @@ yy133:
}
yy134:
YYDEBUG(134, YYPEEK());
-#line 398 "ada_annex_p.re2c"
+#line 398 "../ada_annex_p.re2c"
{*id = 105; continue;}
-#line 3807 "ada_annex_p_re2c.c"
+#line 3807 "../ada_annex_p_re2c.c"
yy135:
YYDEBUG(135, YYPEEK());
YYSKIP();
YYDEBUG(136, YYPEEK());
-#line 397 "ada_annex_p.re2c"
+#line 397 "../ada_annex_p.re2c"
{*id = 104; continue;}
-#line 3814 "ada_annex_p_re2c.c"
+#line 3814 "../ada_annex_p_re2c.c"
yy137:
YYDEBUG(137, YYPEEK());
YYSKIP();
YYDEBUG(138, YYPEEK());
-#line 385 "ada_annex_p.re2c"
+#line 385 "../ada_annex_p.re2c"
{*id = 92; continue;}
-#line 3821 "ada_annex_p_re2c.c"
+#line 3821 "../ada_annex_p_re2c.c"
yy139:
YYDEBUG(139, YYPEEK());
YYSKIP();
@@ -3830,16 +3830,16 @@ yy140:
YYDEBUG(140, YYPEEK());
YYSKIP();
YYDEBUG(141, YYPEEK());
-#line 392 "ada_annex_p.re2c"
+#line 392 "../ada_annex_p.re2c"
{*id = 99; continue;}
-#line 3836 "ada_annex_p_re2c.c"
+#line 3836 "../ada_annex_p_re2c.c"
yy142:
YYDEBUG(142, YYPEEK());
YYSKIP();
YYDEBUG(143, YYPEEK());
-#line 394 "ada_annex_p.re2c"
+#line 394 "../ada_annex_p.re2c"
{*id = 101; continue;}
-#line 3843 "ada_annex_p_re2c.c"
+#line 3843 "../ada_annex_p_re2c.c"
yy144:
YYDEBUG(144, YYPEEK());
yyaccept = 10;
@@ -3852,9 +3852,9 @@ yy144:
}
yy145:
YYDEBUG(145, YYPEEK());
-#line 395 "ada_annex_p.re2c"
+#line 395 "../ada_annex_p.re2c"
{*id = 102; continue;}
-#line 3858 "ada_annex_p_re2c.c"
+#line 3858 "../ada_annex_p_re2c.c"
yy146:
YYDEBUG(146, YYPEEK());
yyaccept = 2;
@@ -4040,9 +4040,9 @@ yy151:
}
yy152:
YYDEBUG(152, YYPEEK());
-#line 304 "ada_annex_p.re2c"
+#line 304 "../ada_annex_p.re2c"
{*id = 11; continue;}
-#line 4046 "ada_annex_p_re2c.c"
+#line 4046 "../ada_annex_p_re2c.c"
yy153:
YYDEBUG(153, YYPEEK());
yyaccept = 2;
@@ -4237,9 +4237,9 @@ yy159:
}
yy160:
YYDEBUG(160, YYPEEK());
-#line 326 "ada_annex_p.re2c"
+#line 326 "../ada_annex_p.re2c"
{*id = 33; continue;}
-#line 4243 "ada_annex_p_re2c.c"
+#line 4243 "../ada_annex_p_re2c.c"
yy161:
YYDEBUG(161, YYPEEK());
yyaccept = 2;
@@ -4447,9 +4447,9 @@ yy168:
}
yy169:
YYDEBUG(169, YYPEEK());
-#line 335 "ada_annex_p.re2c"
+#line 335 "../ada_annex_p.re2c"
{*id = 42; continue;}
-#line 4453 "ada_annex_p_re2c.c"
+#line 4453 "../ada_annex_p_re2c.c"
yy170:
YYDEBUG(170, YYPEEK());
yyaccept = 14;
@@ -4576,9 +4576,9 @@ yy170:
}
yy171:
YYDEBUG(171, YYPEEK());
-#line 340 "ada_annex_p.re2c"
+#line 340 "../ada_annex_p.re2c"
{*id = 47; continue;}
-#line 4582 "ada_annex_p_re2c.c"
+#line 4582 "../ada_annex_p_re2c.c"
yy172:
YYDEBUG(172, YYPEEK());
yyaccept = 15;
@@ -4705,9 +4705,9 @@ yy172:
}
yy173:
YYDEBUG(173, YYPEEK());
-#line 375 "ada_annex_p.re2c"
+#line 375 "../ada_annex_p.re2c"
{*id = 82; continue;}
-#line 4711 "ada_annex_p_re2c.c"
+#line 4711 "../ada_annex_p_re2c.c"
yy174:
YYDEBUG(174, YYPEEK());
yyaccept = 2;
@@ -4900,9 +4900,9 @@ yy180:
}
yy181:
YYDEBUG(181, YYPEEK());
-#line 362 "ada_annex_p.re2c"
+#line 362 "../ada_annex_p.re2c"
{*id = 69; continue;}
-#line 4906 "ada_annex_p_re2c.c"
+#line 4906 "../ada_annex_p_re2c.c"
yy182:
YYDEBUG(182, YYPEEK());
yyaccept = 17;
@@ -5029,9 +5029,9 @@ yy182:
}
yy183:
YYDEBUG(183, YYPEEK());
-#line 342 "ada_annex_p.re2c"
+#line 342 "../ada_annex_p.re2c"
{*id = 49; continue;}
-#line 5035 "ada_annex_p_re2c.c"
+#line 5035 "../ada_annex_p_re2c.c"
yy184:
YYDEBUG(184, YYPEEK());
yyaccept = 2;
@@ -5495,9 +5495,9 @@ yy207:
YYDEBUG(207, YYPEEK());
YYSKIP();
YYDEBUG(208, YYPEEK());
-#line 303 "ada_annex_p.re2c"
+#line 303 "../ada_annex_p.re2c"
{*id = 10; if (lexer->cursor[-1] == 0x0a || (lexer->cursor[-1] == 0x0d
&& lexer->cursor[-2] == 0x0a)) lexer->line++; continue;}
-#line 5501 "ada_annex_p_re2c.c"
+#line 5501 "../ada_annex_p_re2c.c"
yy209:
YYDEBUG(209, YYPEEK());
YYSKIP();
@@ -6207,9 +6207,9 @@ yy221:
YYSKIP();
yy222:
YYDEBUG(222, YYPEEK());
-#line 411 "ada_annex_p.re2c"
+#line 411 "../ada_annex_p.re2c"
{*id = 118; continue;}
-#line 6213 "ada_annex_p_re2c.c"
+#line 6213 "../ada_annex_p_re2c.c"
yy223:
YYDEBUG(223, YYPEEK());
yyaccept = 18;
@@ -6378,9 +6378,9 @@ yy225:
YYDEBUG(225, YYPEEK());
YYSKIP();
YYDEBUG(226, YYPEEK());
-#line 295 "ada_annex_p.re2c"
+#line 295 "../ada_annex_p.re2c"
{*id = 2; if (lexer->cursor[-1] == 0x0a || (lexer->cursor[-1] == 0x0d
&& lexer->cursor[-2] == 0x0a)) lexer->line++; continue;}
-#line 6384 "ada_annex_p_re2c.c"
+#line 6384 "../ada_annex_p_re2c.c"
yy227:
YYDEBUG(227, YYPEEK());
YYSKIP();
@@ -6907,9 +6907,9 @@ yy239:
}
yy240:
YYDEBUG(240, YYPEEK());
-#line 339 "ada_annex_p.re2c"
+#line 339 "../ada_annex_p.re2c"
{*id = 46; continue;}
-#line 6913 "ada_annex_p_re2c.c"
+#line 6913 "../ada_annex_p_re2c.c"
yy241:
YYDEBUG(241, YYPEEK());
yyaccept = 2;
@@ -7058,9 +7058,9 @@ yy243:
}
yy244:
YYDEBUG(244, YYPEEK());
-#line 348 "ada_annex_p.re2c"
+#line 348 "../ada_annex_p.re2c"
{*id = 55; continue;}
-#line 7064 "ada_annex_p_re2c.c"
+#line 7064 "../ada_annex_p_re2c.c"
yy245:
YYDEBUG(245, YYPEEK());
yyaccept = 21;
@@ -7187,9 +7187,9 @@ yy245:
}
yy246:
YYDEBUG(246, YYPEEK());
-#line 368 "ada_annex_p.re2c"
+#line 368 "../ada_annex_p.re2c"
{*id = 75; continue;}
-#line 7193 "ada_annex_p_re2c.c"
+#line 7193 "../ada_annex_p_re2c.c"
yy247:
YYDEBUG(247, YYPEEK());
yyaccept = 2;
@@ -7419,9 +7419,9 @@ yy256:
}
yy257:
YYDEBUG(257, YYPEEK());
-#line 359 "ada_annex_p.re2c"
+#line 359 "../ada_annex_p.re2c"
{*id = 66; continue;}
-#line 7425 "ada_annex_p_re2c.c"
+#line 7425 "../ada_annex_p_re2c.c"
yy258:
YYDEBUG(258, YYPEEK());
yyaccept = 2;
@@ -7581,9 +7581,9 @@ yy261:
}
yy262:
YYDEBUG(262, YYPEEK());
-#line 344 "ada_annex_p.re2c"
+#line 344 "../ada_annex_p.re2c"
{*id = 51; continue;}
-#line 7587 "ada_annex_p_re2c.c"
+#line 7587 "../ada_annex_p_re2c.c"
yy263:
YYDEBUG(263, YYPEEK());
yyaccept = 2;
@@ -7776,9 +7776,9 @@ yy269:
}
yy270:
YYDEBUG(270, YYPEEK());
-#line 366 "ada_annex_p.re2c"
+#line 366 "../ada_annex_p.re2c"
{*id = 73; continue;}
-#line 7782 "ada_annex_p_re2c.c"
+#line 7782 "../ada_annex_p_re2c.c"
yy271:
YYDEBUG(271, YYPEEK());
yyaccept = 25;
@@ -7905,9 +7905,9 @@ yy271:
}
yy272:
YYDEBUG(272, YYPEEK());
-#line 369 "ada_annex_p.re2c"
+#line 369 "../ada_annex_p.re2c"
{*id = 76; continue;}
-#line 7911 "ada_annex_p_re2c.c"
+#line 7911 "../ada_annex_p_re2c.c"
yy273:
YYDEBUG(273, YYPEEK());
yyaccept = 26;
@@ -8034,9 +8034,9 @@ yy273:
}
yy274:
YYDEBUG(274, YYPEEK());
-#line 345 "ada_annex_p.re2c"
+#line 345 "../ada_annex_p.re2c"
{*id = 52; continue;}
-#line 8040 "ada_annex_p_re2c.c"
+#line 8040 "../ada_annex_p_re2c.c"
yy275:
YYDEBUG(275, YYPEEK());
yyaccept = 2;
@@ -8185,9 +8185,9 @@ yy277:
}
yy278:
YYDEBUG(278, YYPEEK());
-#line 322 "ada_annex_p.re2c"
+#line 322 "../ada_annex_p.re2c"
{*id = 29; continue;}
-#line 8191 "ada_annex_p_re2c.c"
+#line 8191 "../ada_annex_p_re2c.c"
yy279:
YYDEBUG(279, YYPEEK());
yyaccept = 2;
@@ -8415,9 +8415,9 @@ yy288:
}
yy289:
YYDEBUG(289, YYPEEK());
-#line 338 "ada_annex_p.re2c"
+#line 338 "../ada_annex_p.re2c"
{*id = 45; continue;}
-#line 8421 "ada_annex_p_re2c.c"
+#line 8421 "../ada_annex_p_re2c.c"
yy290:
YYDEBUG(290, YYPEEK());
yyaccept = 2;
@@ -8709,9 +8709,9 @@ yy305:
}
yy306:
YYDEBUG(306, YYPEEK());
-#line 343 "ada_annex_p.re2c"
+#line 343 "../ada_annex_p.re2c"
{*id = 50; continue;}
-#line 8715 "ada_annex_p_re2c.c"
+#line 8715 "../ada_annex_p_re2c.c"
yy307:
YYDEBUG(307, YYPEEK());
yyaccept = 2;
@@ -8871,9 +8871,9 @@ yy310:
}
yy311:
YYDEBUG(311, YYPEEK());
-#line 341 "ada_annex_p.re2c"
+#line 341 "../ada_annex_p.re2c"
{*id = 48; continue;}
-#line 8877 "ada_annex_p_re2c.c"
+#line 8877 "../ada_annex_p_re2c.c"
yy312:
YYDEBUG(312, YYPEEK());
YYSKIP();
@@ -9028,9 +9028,9 @@ yy319:
YYDEBUG(319, YYPEEK());
YYSKIP();
YYDEBUG(320, YYPEEK());
-#line 296 "ada_annex_p.re2c"
+#line 296 "../ada_annex_p.re2c"
{*id = 3; if (lexer->cursor[-1] == 0x0a || (lexer->cursor[-1] == 0x0d
&& lexer->cursor[-2] == 0x0a)) lexer->line++; continue;}
-#line 9034 "ada_annex_p_re2c.c"
+#line 9034 "../ada_annex_p_re2c.c"
yy321:
YYDEBUG(321, YYPEEK());
YYSKIP();
@@ -9962,9 +9962,9 @@ yy347:
}
yy348:
YYDEBUG(348, YYPEEK());
-#line 319 "ada_annex_p.re2c"
+#line 319 "../ada_annex_p.re2c"
{*id = 26; continue;}
-#line 9968 "ada_annex_p_re2c.c"
+#line 9968 "../ada_annex_p_re2c.c"
yy349:
YYDEBUG(349, YYPEEK());
yyaccept = 32;
@@ -10091,9 +10091,9 @@ yy349:
}
yy350:
YYDEBUG(350, YYPEEK());
-#line 357 "ada_annex_p.re2c"
+#line 357 "../ada_annex_p.re2c"
{*id = 64; continue;}
-#line 10097 "ada_annex_p_re2c.c"
+#line 10097 "../ada_annex_p_re2c.c"
yy351:
YYDEBUG(351, YYPEEK());
yyaccept = 2;
@@ -10275,9 +10275,9 @@ yy356:
}
yy357:
YYDEBUG(357, YYPEEK());
-#line 334 "ada_annex_p.re2c"
+#line 334 "../ada_annex_p.re2c"
{*id = 41; continue;}
-#line 10281 "ada_annex_p_re2c.c"
+#line 10281 "../ada_annex_p_re2c.c"
yy358:
YYDEBUG(358, YYPEEK());
yyaccept = 2;
@@ -10437,9 +10437,9 @@ yy361:
}
yy362:
YYDEBUG(362, YYPEEK());
-#line 325 "ada_annex_p.re2c"
+#line 325 "../ada_annex_p.re2c"
{*id = 32; continue;}
-#line 10443 "ada_annex_p_re2c.c"
+#line 10443 "../ada_annex_p_re2c.c"
yy363:
YYDEBUG(363, YYPEEK());
yyaccept = 2;
@@ -10588,9 +10588,9 @@ yy365:
}
yy366:
YYDEBUG(366, YYPEEK());
-#line 324 "ada_annex_p.re2c"
+#line 324 "../ada_annex_p.re2c"
{*id = 31; continue;}
-#line 10594 "ada_annex_p_re2c.c"
+#line 10594 "../ada_annex_p_re2c.c"
yy367:
YYDEBUG(367, YYPEEK());
yyaccept = 2;
@@ -10739,9 +10739,9 @@ yy369:
}
yy370:
YYDEBUG(370, YYPEEK());
-#line 329 "ada_annex_p.re2c"
+#line 329 "../ada_annex_p.re2c"
{*id = 36; continue;}
-#line 10745 "ada_annex_p_re2c.c"
+#line 10745 "../ada_annex_p_re2c.c"
yy371:
YYDEBUG(371, YYPEEK());
yyaccept = 37;
@@ -10868,9 +10868,9 @@ yy371:
}
yy372:
YYDEBUG(372, YYPEEK());
-#line 358 "ada_annex_p.re2c"
+#line 358 "../ada_annex_p.re2c"
{*id = 65; continue;}
-#line 10874 "ada_annex_p_re2c.c"
+#line 10874 "../ada_annex_p_re2c.c"
yy373:
YYDEBUG(373, YYPEEK());
yyaccept = 2;
@@ -11184,9 +11184,9 @@ yy390:
}
yy391:
YYDEBUG(391, YYPEEK());
-#line 333 "ada_annex_p.re2c"
+#line 333 "../ada_annex_p.re2c"
{*id = 40; continue;}
-#line 11190 "ada_annex_p_re2c.c"
+#line 11190 "../ada_annex_p_re2c.c"
yy392:
YYDEBUG(392, YYPEEK());
yyaccept = 2;
@@ -11346,9 +11346,9 @@ yy395:
}
yy396:
YYDEBUG(396, YYPEEK());
-#line 353 "ada_annex_p.re2c"
+#line 353 "../ada_annex_p.re2c"
{*id = 60; continue;}
-#line 11352 "ada_annex_p_re2c.c"
+#line 11352 "../ada_annex_p_re2c.c"
yy397:
YYDEBUG(397, YYPEEK());
yyaccept = 2;
@@ -11486,9 +11486,9 @@ yy398:
}
yy399:
YYDEBUG(399, YYPEEK());
-#line 336 "ada_annex_p.re2c"
+#line 336 "../ada_annex_p.re2c"
{*id = 43; continue;}
-#line 11492 "ada_annex_p_re2c.c"
+#line 11492 "../ada_annex_p_re2c.c"
yy400:
YYDEBUG(400, YYPEEK());
yyaccept = 41;
@@ -11615,9 +11615,9 @@ yy400:
}
yy401:
YYDEBUG(401, YYPEEK());
-#line 376 "ada_annex_p.re2c"
+#line 376 "../ada_annex_p.re2c"
{*id = 83; continue;}
-#line 11621 "ada_annex_p_re2c.c"
+#line 11621 "../ada_annex_p_re2c.c"
yy402:
YYDEBUG(402, YYPEEK());
yyaccept = 2;
@@ -11755,9 +11755,9 @@ yy403:
}
yy404:
YYDEBUG(404, YYPEEK());
-#line 356 "ada_annex_p.re2c"
+#line 356 "../ada_annex_p.re2c"
{*id = 63; continue;}
-#line 11761 "ada_annex_p_re2c.c"
+#line 11761 "../ada_annex_p_re2c.c"
yy405:
YYDEBUG(405, YYPEEK());
yyaccept = 2;
@@ -11895,9 +11895,9 @@ yy406:
}
yy407:
YYDEBUG(407, YYPEEK());
-#line 354 "ada_annex_p.re2c"
+#line 354 "../ada_annex_p.re2c"
{*id = 61; continue;}
-#line 11901 "ada_annex_p_re2c.c"
+#line 11901 "../ada_annex_p_re2c.c"
yy408:
YYDEBUG(408, YYPEEK());
YYSKIP();
@@ -12122,9 +12122,9 @@ yy414:
YYSKIP();
YYDEBUG(415, YYPEEK());
YYRESTORECTX();
-#line 407 "ada_annex_p.re2c"
+#line 407 "../ada_annex_p.re2c"
{*id = 114; continue;}
-#line 12128 "ada_annex_p_re2c.c"
+#line 12128 "../ada_annex_p_re2c.c"
yy416:
YYDEBUG(416, YYPEEK());
YYSKIP();
@@ -12291,9 +12291,9 @@ yy421:
}
yy422:
YYDEBUG(422, YYPEEK());
-#line 311 "ada_annex_p.re2c"
+#line 311 "../ada_annex_p.re2c"
{*id = 18; continue;}
-#line 12297 "ada_annex_p_re2c.c"
+#line 12297 "../ada_annex_p_re2c.c"
yy423:
YYDEBUG(423, YYPEEK());
yyaccept = 2;
@@ -12464,9 +12464,9 @@ yy427:
}
yy428:
YYDEBUG(428, YYPEEK());
-#line 363 "ada_annex_p.re2c"
+#line 363 "../ada_annex_p.re2c"
{*id = 70; continue;}
-#line 12470 "ada_annex_p_re2c.c"
+#line 12470 "../ada_annex_p_re2c.c"
yy429:
YYDEBUG(429, YYPEEK());
yyaccept = 46;
@@ -12593,9 +12593,9 @@ yy429:
}
yy430:
YYDEBUG(430, YYPEEK());
-#line 331 "ada_annex_p.re2c"
+#line 331 "../ada_annex_p.re2c"
{*id = 38; continue;}
-#line 12599 "ada_annex_p_re2c.c"
+#line 12599 "../ada_annex_p_re2c.c"
yy431:
YYDEBUG(431, YYPEEK());
yyaccept = 2;
@@ -12744,9 +12744,9 @@ yy433:
}
yy434:
YYDEBUG(434, YYPEEK());
-#line 310 "ada_annex_p.re2c"
+#line 310 "../ada_annex_p.re2c"
{*id = 17; continue;}
-#line 12750 "ada_annex_p_re2c.c"
+#line 12750 "../ada_annex_p_re2c.c"
yy435:
YYDEBUG(435, YYPEEK());
yyaccept = 48;
@@ -12873,9 +12873,9 @@ yy435:
}
yy436:
YYDEBUG(436, YYPEEK());
-#line 364 "ada_annex_p.re2c"
+#line 364 "../ada_annex_p.re2c"
{*id = 71; continue;}
-#line 12879 "ada_annex_p_re2c.c"
+#line 12879 "../ada_annex_p_re2c.c"
yy437:
YYDEBUG(437, YYPEEK());
yyaccept = 2;
@@ -13013,9 +13013,9 @@ yy438:
}
yy439:
YYDEBUG(439, YYPEEK());
-#line 337 "ada_annex_p.re2c"
+#line 337 "../ada_annex_p.re2c"
{*id = 44; continue;}
-#line 13019 "ada_annex_p_re2c.c"
+#line 13019 "../ada_annex_p_re2c.c"
yy440:
YYDEBUG(440, YYPEEK());
yyaccept = 50;
@@ -13142,9 +13142,9 @@ yy440:
}
yy441:
YYDEBUG(441, YYPEEK());
-#line 314 "ada_annex_p.re2c"
+#line 314 "../ada_annex_p.re2c"
{*id = 21; continue;}
-#line 13148 "ada_annex_p_re2c.c"
+#line 13148 "../ada_annex_p_re2c.c"
yy442:
YYDEBUG(442, YYPEEK());
yyaccept = 2;
@@ -13414,9 +13414,9 @@ yy455:
}
yy456:
YYDEBUG(456, YYPEEK());
-#line 305 "ada_annex_p.re2c"
+#line 305 "../ada_annex_p.re2c"
{*id = 12; continue;}
-#line 13420 "ada_annex_p_re2c.c"
+#line 13420 "../ada_annex_p_re2c.c"
yy457:
YYDEBUG(457, YYPEEK());
yyaccept = 52;
@@ -13543,9 +13543,9 @@ yy457:
}
yy458:
YYDEBUG(458, YYPEEK());
-#line 367 "ada_annex_p.re2c"
+#line 367 "../ada_annex_p.re2c"
{*id = 74; continue;}
-#line 13549 "ada_annex_p_re2c.c"
+#line 13549 "../ada_annex_p_re2c.c"
yy459:
YYDEBUG(459, YYPEEK());
yyaccept = 2;
@@ -13793,9 +13793,9 @@ yy470:
}
yy471:
YYDEBUG(471, YYPEEK());
-#line 309 "ada_annex_p.re2c"
+#line 309 "../ada_annex_p.re2c"
{*id = 16; continue;}
-#line 13799 "ada_annex_p_re2c.c"
+#line 13799 "../ada_annex_p_re2c.c"
yy472:
YYDEBUG(472, YYPEEK());
yyaccept = 54;
@@ -13922,16 +13922,16 @@ yy472:
}
yy473:
YYDEBUG(473, YYPEEK());
-#line 328 "ada_annex_p.re2c"
+#line 328 "../ada_annex_p.re2c"
{*id = 35; continue;}
-#line 13928 "ada_annex_p_re2c.c"
+#line 13928 "../ada_annex_p_re2c.c"
yy474:
YYDEBUG(474, YYPEEK());
YYSKIP();
YYDEBUG(475, YYPEEK());
-#line 298 "ada_annex_p.re2c"
+#line 298 "../ada_annex_p.re2c"
{*id = 5; if (lexer->cursor[-1] == 0x0a || (lexer->cursor[-1] == 0x0d
&& lexer->cursor[-2] == 0x0a)) lexer->line++; continue;}
-#line 13935 "ada_annex_p_re2c.c"
+#line 13935 "../ada_annex_p_re2c.c"
yy476:
YYDEBUG(476, YYPEEK());
YYSKIP();
@@ -14650,9 +14650,9 @@ yy491:
}
yy492:
YYDEBUG(492, YYPEEK());
-#line 313 "ada_annex_p.re2c"
+#line 313 "../ada_annex_p.re2c"
{*id = 20; continue;}
-#line 14656 "ada_annex_p_re2c.c"
+#line 14656 "../ada_annex_p_re2c.c"
yy493:
YYDEBUG(493, YYPEEK());
yyaccept = 56;
@@ -14779,9 +14779,9 @@ yy493:
}
yy494:
YYDEBUG(494, YYPEEK());
-#line 349 "ada_annex_p.re2c"
+#line 349 "../ada_annex_p.re2c"
{*id = 56; continue;}
-#line 14785 "ada_annex_p_re2c.c"
+#line 14785 "../ada_annex_p_re2c.c"
yy495:
YYDEBUG(495, YYPEEK());
yyaccept = 2;
@@ -14941,9 +14941,9 @@ yy498:
}
yy499:
YYDEBUG(499, YYPEEK());
-#line 365 "ada_annex_p.re2c"
+#line 365 "../ada_annex_p.re2c"
{*id = 72; continue;}
-#line 14947 "ada_annex_p_re2c.c"
+#line 14947 "../ada_annex_p_re2c.c"
yy500:
YYDEBUG(500, YYPEEK());
yyaccept = 2;
@@ -15125,9 +15125,9 @@ yy505:
}
yy506:
YYDEBUG(506, YYPEEK());
-#line 355 "ada_annex_p.re2c"
+#line 355 "../ada_annex_p.re2c"
{*id = 62; continue;}
-#line 15131 "ada_annex_p_re2c.c"
+#line 15131 "../ada_annex_p_re2c.c"
yy507:
YYDEBUG(507, YYPEEK());
yyaccept = 2;
@@ -15287,9 +15287,9 @@ yy510:
}
yy511:
YYDEBUG(511, YYPEEK());
-#line 377 "ada_annex_p.re2c"
+#line 377 "../ada_annex_p.re2c"
{*id = 84; continue;}
-#line 15293 "ada_annex_p_re2c.c"
+#line 15293 "../ada_annex_p_re2c.c"
yy512:
YYDEBUG(512, YYPEEK());
yyaccept = 2;
@@ -15449,9 +15449,9 @@ yy515:
}
yy516:
YYDEBUG(516, YYPEEK());
-#line 360 "ada_annex_p.re2c"
+#line 360 "../ada_annex_p.re2c"
{*id = 67; continue;}
-#line 15455 "ada_annex_p_re2c.c"
+#line 15455 "../ada_annex_p_re2c.c"
yy517:
YYDEBUG(517, YYPEEK());
yyaccept = 2;
@@ -15600,9 +15600,9 @@ yy519:
}
yy520:
YYDEBUG(520, YYPEEK());
-#line 323 "ada_annex_p.re2c"
+#line 323 "../ada_annex_p.re2c"
{*id = 30; continue;}
-#line 15606 "ada_annex_p_re2c.c"
+#line 15606 "../ada_annex_p_re2c.c"
yy521:
YYDEBUG(521, YYPEEK());
yyaccept = 2;
@@ -15740,9 +15740,9 @@ yy522:
}
yy523:
YYDEBUG(523, YYPEEK());
-#line 308 "ada_annex_p.re2c"
+#line 308 "../ada_annex_p.re2c"
{*id = 15; continue;}
-#line 15746 "ada_annex_p_re2c.c"
+#line 15746 "../ada_annex_p_re2c.c"
yy524:
YYDEBUG(524, YYPEEK());
yyaccept = 2;
@@ -15902,9 +15902,9 @@ yy527:
}
yy528:
YYDEBUG(528, YYPEEK());
-#line 361 "ada_annex_p.re2c"
+#line 361 "../ada_annex_p.re2c"
{*id = 68; continue;}
-#line 15908 "ada_annex_p_re2c.c"
+#line 15908 "../ada_annex_p_re2c.c"
yy529:
YYDEBUG(529, YYPEEK());
yyaccept = 2;
@@ -15920,9 +15920,9 @@ yy530:
YYDEBUG(530, YYPEEK());
YYSKIP();
YYDEBUG(531, YYPEEK());
-#line 297 "ada_annex_p.re2c"
+#line 297 "../ada_annex_p.re2c"
{*id = 4; if (lexer->cursor[-1] == 0x0a || (lexer->cursor[-1] == 0x0d
&& lexer->cursor[-2] == 0x0a)) lexer->line++; continue;}
-#line 15926 "ada_annex_p_re2c.c"
+#line 15926 "../ada_annex_p_re2c.c"
yy532:
YYDEBUG(532, YYPEEK());
YYSKIP();
@@ -17146,9 +17146,9 @@ yy548:
}
yy549:
YYDEBUG(549, YYPEEK());
-#line 373 "ada_annex_p.re2c"
+#line 373 "../ada_annex_p.re2c"
{*id = 80; continue;}
-#line 17152 "ada_annex_p_re2c.c"
+#line 17152 "../ada_annex_p_re2c.c"
yy550:
YYDEBUG(550, YYPEEK());
yyaccept = 2;
@@ -17286,9 +17286,9 @@ yy551:
}
yy552:
YYDEBUG(552, YYPEEK());
-#line 332 "ada_annex_p.re2c"
+#line 332 "../ada_annex_p.re2c"
{*id = 39; continue;}
-#line 17292 "ada_annex_p_re2c.c"
+#line 17292 "../ada_annex_p_re2c.c"
yy553:
YYDEBUG(553, YYPEEK());
yyaccept = 2;
@@ -17437,9 +17437,9 @@ yy555:
}
yy556:
YYDEBUG(556, YYPEEK());
-#line 315 "ada_annex_p.re2c"
+#line 315 "../ada_annex_p.re2c"
{*id = 22; continue;}
-#line 17443 "ada_annex_p_re2c.c"
+#line 17443 "../ada_annex_p_re2c.c"
yy557:
YYDEBUG(557, YYPEEK());
yyaccept = 2;
@@ -17577,9 +17577,9 @@ yy558:
}
yy559:
YYDEBUG(559, YYPEEK());
-#line 370 "ada_annex_p.re2c"
+#line 370 "../ada_annex_p.re2c"
{*id = 77; continue;}
-#line 17583 "ada_annex_p_re2c.c"
+#line 17583 "../ada_annex_p_re2c.c"
yy560:
YYDEBUG(560, YYPEEK());
yyaccept = 2;
@@ -17717,9 +17717,9 @@ yy561:
}
yy562:
YYDEBUG(562, YYPEEK());
-#line 321 "ada_annex_p.re2c"
+#line 321 "../ada_annex_p.re2c"
{*id = 28; continue;}
-#line 17723 "ada_annex_p_re2c.c"
+#line 17723 "../ada_annex_p_re2c.c"
yy563:
YYDEBUG(563, YYPEEK());
yyaccept = 2;
@@ -17857,9 +17857,9 @@ yy564:
}
yy565:
YYDEBUG(565, YYPEEK());
-#line 320 "ada_annex_p.re2c"
+#line 320 "../ada_annex_p.re2c"
{*id = 27; continue;}
-#line 17863 "ada_annex_p_re2c.c"
+#line 17863 "../ada_annex_p_re2c.c"
yy566:
YYDEBUG(566, YYPEEK());
yyaccept = 2;
@@ -18008,9 +18008,9 @@ yy568:
}
yy569:
YYDEBUG(569, YYPEEK());
-#line 317 "ada_annex_p.re2c"
+#line 317 "../ada_annex_p.re2c"
{*id = 24; continue;}
-#line 18014 "ada_annex_p_re2c.c"
+#line 18014 "../ada_annex_p_re2c.c"
yy570:
YYDEBUG(570, YYPEEK());
yyaccept = 71;
@@ -18137,9 +18137,9 @@ yy570:
}
yy571:
YYDEBUG(571, YYPEEK());
-#line 312 "ada_annex_p.re2c"
+#line 312 "../ada_annex_p.re2c"
{*id = 19; continue;}
-#line 18143 "ada_annex_p_re2c.c"
+#line 18143 "../ada_annex_p_re2c.c"
yy572:
YYDEBUG(572, YYPEEK());
yyaccept = 72;
@@ -18266,9 +18266,9 @@ yy572:
}
yy573:
YYDEBUG(573, YYPEEK());
-#line 327 "ada_annex_p.re2c"
+#line 327 "../ada_annex_p.re2c"
{*id = 34; continue;}
-#line 18272 "ada_annex_p_re2c.c"
+#line 18272 "../ada_annex_p_re2c.c"
yy574:
YYDEBUG(574, YYPEEK());
yyaccept = 2;
@@ -18406,9 +18406,9 @@ yy575:
}
yy576:
YYDEBUG(576, YYPEEK());
-#line 374 "ada_annex_p.re2c"
+#line 374 "../ada_annex_p.re2c"
{*id = 81; continue;}
-#line 18412 "ada_annex_p_re2c.c"
+#line 18412 "../ada_annex_p_re2c.c"
yy577:
YYDEBUG(577, YYPEEK());
yyaccept = 2;
@@ -18435,9 +18435,9 @@ yy579:
YYDEBUG(579, YYPEEK());
YYSKIP();
YYDEBUG(580, YYPEEK());
-#line 299 "ada_annex_p.re2c"
+#line 299 "../ada_annex_p.re2c"
{*id = 6; if (lexer->cursor[-1] == 0x0a || (lexer->cursor[-1] == 0x0d
&& lexer->cursor[-2] == 0x0a)) lexer->line++; continue;}
-#line 18441 "ada_annex_p_re2c.c"
+#line 18441 "../ada_annex_p_re2c.c"
yy581:
YYDEBUG(581, YYPEEK());
YYSKIP();
@@ -18772,9 +18772,9 @@ yy587:
YYDEBUG(587, YYPEEK());
YYSKIP();
YYDEBUG(588, YYPEEK());
-#line 300 "ada_annex_p.re2c"
+#line 300 "../ada_annex_p.re2c"
{*id = 7; if (lexer->cursor[-1] == 0x0a || (lexer->cursor[-1] == 0x0d
&& lexer->cursor[-2] == 0x0a)) lexer->line++; continue;}
-#line 18778 "ada_annex_p_re2c.c"
+#line 18778 "../ada_annex_p_re2c.c"
yy589:
YYDEBUG(589, YYPEEK());
YYSKIP();
@@ -19109,9 +19109,9 @@ yy595:
YYDEBUG(595, YYPEEK());
YYSKIP();
YYDEBUG(596, YYPEEK());
-#line 302 "ada_annex_p.re2c"
+#line 302 "../ada_annex_p.re2c"
{*id = 9; if (lexer->cursor[-1] == 0x0a || (lexer->cursor[-1] == 0x0d
&& lexer->cursor[-2] == 0x0a)) lexer->line++; continue;}
-#line 19115 "ada_annex_p_re2c.c"
+#line 19115 "../ada_annex_p_re2c.c"
yy597:
YYDEBUG(597, YYPEEK());
YYSKIP();
@@ -19446,9 +19446,9 @@ yy603:
YYDEBUG(603, YYPEEK());
YYSKIP();
YYDEBUG(604, YYPEEK());
-#line 301 "ada_annex_p.re2c"
+#line 301 "../ada_annex_p.re2c"
{*id = 8; if (lexer->cursor[-1] == 0x0a || (lexer->cursor[-1] == 0x0d
&& lexer->cursor[-2] == 0x0a)) lexer->line++; continue;}
-#line 19452 "ada_annex_p_re2c.c"
+#line 19452 "../ada_annex_p_re2c.c"
yy605:
YYDEBUG(605, YYPEEK());
YYSKIP();
@@ -19905,9 +19905,9 @@ yy611:
}
yy612:
YYDEBUG(612, YYPEEK());
-#line 371 "ada_annex_p.re2c"
+#line 371 "../ada_annex_p.re2c"
{*id = 78; continue;}
-#line 19911 "ada_annex_p_re2c.c"
+#line 19911 "../ada_annex_p_re2c.c"
yy613:
YYDEBUG(613, YYPEEK());
yyaccept = 75;
@@ -20034,9 +20034,9 @@ yy613:
}
yy614:
YYDEBUG(614, YYPEEK());
-#line 372 "ada_annex_p.re2c"
+#line 372 "../ada_annex_p.re2c"
{*id = 79; continue;}
-#line 20040 "ada_annex_p_re2c.c"
+#line 20040 "../ada_annex_p_re2c.c"
yy615:
YYDEBUG(615, YYPEEK());
yyaccept = 2;
@@ -20174,9 +20174,9 @@ yy616:
}
yy617:
YYDEBUG(617, YYPEEK());
-#line 346 "ada_annex_p.re2c"
+#line 346 "../ada_annex_p.re2c"
{*id = 53; continue;}
-#line 20180 "ada_annex_p_re2c.c"
+#line 20180 "../ada_annex_p_re2c.c"
yy618:
YYDEBUG(618, YYPEEK());
yyaccept = 2;
@@ -20325,9 +20325,9 @@ yy620:
}
yy621:
YYDEBUG(621, YYPEEK());
-#line 330 "ada_annex_p.re2c"
+#line 330 "../ada_annex_p.re2c"
{*id = 37; continue;}
-#line 20331 "ada_annex_p_re2c.c"
+#line 20331 "../ada_annex_p_re2c.c"
yy622:
YYDEBUG(622, YYPEEK());
yyaccept = 2;
@@ -20476,9 +20476,9 @@ yy624:
}
yy625:
YYDEBUG(625, YYPEEK());
-#line 306 "ada_annex_p.re2c"
+#line 306 "../ada_annex_p.re2c"
{*id = 13; continue;}
-#line 20482 "ada_annex_p_re2c.c"
+#line 20482 "../ada_annex_p_re2c.c"
yy626:
YYDEBUG(626, YYPEEK());
yyaccept = 2;
@@ -20627,9 +20627,9 @@ yy628:
}
yy629:
YYDEBUG(629, YYPEEK());
-#line 316 "ada_annex_p.re2c"
+#line 316 "../ada_annex_p.re2c"
{*id = 23; continue;}
-#line 20633 "ada_annex_p_re2c.c"
+#line 20633 "../ada_annex_p_re2c.c"
yy630:
YYDEBUG(630, YYPEEK());
yyaccept = 80;
@@ -20756,9 +20756,9 @@ yy630:
}
yy631:
YYDEBUG(631, YYPEEK());
-#line 350 "ada_annex_p.re2c"
+#line 350 "../ada_annex_p.re2c"
{*id = 57; continue;}
-#line 20762 "ada_annex_p_re2c.c"
+#line 20762 "../ada_annex_p_re2c.c"
yy632:
YYDEBUG(632, YYPEEK());
yyaccept = 2;
@@ -20896,9 +20896,9 @@ yy633:
}
yy634:
YYDEBUG(634, YYPEEK());
-#line 347 "ada_annex_p.re2c"
+#line 347 "../ada_annex_p.re2c"
{*id = 54; continue;}
-#line 20902 "ada_annex_p_re2c.c"
+#line 20902 "../ada_annex_p_re2c.c"
yy635:
YYDEBUG(635, YYPEEK());
yyaccept = 82;
@@ -21025,9 +21025,9 @@ yy635:
}
yy636:
YYDEBUG(636, YYPEEK());
-#line 352 "ada_annex_p.re2c"
+#line 352 "../ada_annex_p.re2c"
{*id = 59; continue;}
-#line 21031 "ada_annex_p_re2c.c"
+#line 21031 "../ada_annex_p_re2c.c"
yy637:
YYDEBUG(637, YYPEEK());
yyaccept = 2;
@@ -21165,9 +21165,9 @@ yy638:
}
yy639:
YYDEBUG(639, YYPEEK());
-#line 307 "ada_annex_p.re2c"
+#line 307 "../ada_annex_p.re2c"
{*id = 14; continue;}
-#line 21171 "ada_annex_p_re2c.c"
+#line 21171 "../ada_annex_p_re2c.c"
yy640:
YYDEBUG(640, YYPEEK());
yyaccept = 84;
@@ -21294,9 +21294,9 @@ yy640:
}
yy641:
YYDEBUG(641, YYPEEK());
-#line 318 "ada_annex_p.re2c"
+#line 318 "../ada_annex_p.re2c"
{*id = 25; continue;}
-#line 21300 "ada_annex_p_re2c.c"
+#line 21300 "../ada_annex_p_re2c.c"
yy642:
YYDEBUG(642, YYPEEK());
yyaccept = 2;
@@ -21445,11 +21445,11 @@ yy644:
}
yy645:
YYDEBUG(645, YYPEEK());
-#line 351 "ada_annex_p.re2c"
+#line 351 "../ada_annex_p.re2c"
{*id = 58; continue;}
-#line 21451 "ada_annex_p_re2c.c"
+#line 21451 "../ada_annex_p_re2c.c"
}
-#line 415 "ada_annex_p.re2c"
+#line 415 "../ada_annex_p.re2c"
}
/* lexer->cursor and lexer ->char_pos are one char past end of token */
diff --git a/ada_mode.prj b/ada_mode.prj
index c45ed512e3..acfa5e75c0 100644
--- a/ada_mode.prj
+++ b/ada_mode.prj
@@ -4,5 +4,6 @@ gpr_project_path=$WISI
gpr_file=ada_mode_wisi_parse.gpr
casing=ada-mode.casing
+casing=../wisi/wisi.casing
-- end of file
diff --git a/ada_mode_wisi_lalr_parse.ads b/ada_mode_wisi_lalr_parse.ads
index e5ff9dc821..540492d697 100644
--- a/ada_mode_wisi_lalr_parse.ads
+++ b/ada_mode_wisi_lalr_parse.ads
@@ -18,7 +18,6 @@
pragma License (GPL);
-with Ada_Annex_P_Process_Actions;
with Ada_Annex_P_Process_LALR_Main;
with Gen_Emacs_Wisi_LR_Parse;
with WisiToken.Parse.LR.McKenzie_Recover.Ada;
@@ -27,12 +26,7 @@ procedure Ada_Mode_Wisi_LALR_Parse is new
Gen_Emacs_Wisi_LR_Parse
(Parse_Data_Type => Wisi.Ada.Parse_Data_Type,
Language_Protocol_Version => Wisi.Ada.Language_Protocol_Version,
Name => "Ada_mode_wisi_lalr_parse",
- Descriptor =>
Ada_Annex_P_Process_Actions.Descriptor'Access,
- Partial_Parse_Active =>
Ada_Annex_P_Process_Actions.Partial_Parse_Active'Access,
- Partial_Parse_Byte_Goal =>
Ada_Annex_P_Process_Actions.Partial_Parse_Byte_Goal'Access,
Language_Fixes =>
WisiToken.Parse.LR.McKenzie_Recover.Ada.Language_Fixes'Access,
Language_Matching_Begin_Tokens =>
WisiToken.Parse.LR.McKenzie_Recover.Ada.Matching_Begin_Tokens'Access,
Language_String_ID_Set =>
WisiToken.Parse.LR.McKenzie_Recover.Ada.String_ID_Set'Access,
- Create_Lexer =>
Ada_Annex_P_Process_LALR_Main.Create_Lexer,
- Create_Parse_Table =>
Ada_Annex_P_Process_LALR_Main.Create_Parse_Table,
- Create_Productions =>
Ada_Annex_P_Process_LALR_Main.Create_Productions);
+ Create_Parser =>
Ada_Annex_P_Process_LALR_Main.Create_Parser);
diff --git a/ada_mode_wisi_lr1_parse.ads b/ada_mode_wisi_lr1_parse.ads
index 5c9aca0dfb..fb543c82d8 100644
--- a/ada_mode_wisi_lr1_parse.ads
+++ b/ada_mode_wisi_lr1_parse.ads
@@ -18,7 +18,6 @@
pragma License (GPL);
-with Ada_Annex_P_Process_Actions;
with Ada_Annex_P_Process_LR1_Main;
with Gen_Emacs_Wisi_LR_Text_Rep_Parse;
with WisiToken.Parse.LR.McKenzie_Recover.Ada;
@@ -27,13 +26,8 @@ procedure Ada_Mode_Wisi_LR1_Parse is new
Gen_Emacs_Wisi_LR_Text_Rep_Parse
(Parse_Data_Type => Wisi.Ada.Parse_Data_Type,
Name => "Ada_mode_wisi_lr1_parse",
Language_Protocol_Version => Wisi.Ada.Language_Protocol_Version,
- Descriptor =>
Ada_Annex_P_Process_Actions.Descriptor'Access,
- Partial_Parse_Active =>
Ada_Annex_P_Process_Actions.Partial_Parse_Active'Access,
- Partial_Parse_Byte_Goal =>
Ada_Annex_P_Process_Actions.Partial_Parse_Byte_Goal'Access,
Language_Fixes =>
WisiToken.Parse.LR.McKenzie_Recover.Ada.Language_Fixes'Access,
Language_Matching_Begin_Tokens =>
WisiToken.Parse.LR.McKenzie_Recover.Ada.Matching_Begin_Tokens'Access,
Language_String_ID_Set =>
WisiToken.Parse.LR.McKenzie_Recover.Ada.String_ID_Set'Access,
Text_Rep_File_Name => "ada_annex_p_lr1_parse_table.txt",
- Create_Lexer => Ada_Annex_P_Process_LR1_Main.Create_Lexer,
- Create_Parse_Table =>
Ada_Annex_P_Process_LR1_Main.Create_Parse_Table,
- Create_Productions =>
Ada_Annex_P_Process_LR1_Main.Create_Productions);
+ Create_Parser =>
Ada_Annex_P_Process_LR1_Main.Create_Parser);
diff --git a/ada_mode_wisi_parse.gpr.gp b/ada_mode_wisi_parse.gpr.gp
deleted file mode 100644
index d5ee96a0fe..0000000000
--- a/ada_mode_wisi_parse.gpr.gp
+++ /dev/null
@@ -1,150 +0,0 @@
--- Abstract :
---
--- build ada_mode_wisi_parse and other executables
---
--- Copyright (C) 2014, 2018 - 2020 Free Software Foundation, Inc.
---
--- This program is free software; you can redistribute it and/or
--- modify it under terms of the GNU General Public License as
--- published by the Free Software Foundation; either version 3, or (at
--- your option) any later version. This program is distributed in the
--- hope that it will be useful, but WITHOUT ANY WARRANTY; without even
--- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
--- PURPOSE. See the GNU General Public License for more details. You
--- should have received a copy of the GNU General Public License
--- distributed with this program; see file COPYING. If not, write to
--- the Free Software Foundation, 51 Franklin Street, Suite 500, Boston,
--- MA 02110-1335, USA.
-
-with "standard_common";
-with "gnatcoll";
-with "gnatcoll_sqlite";
-with "gnatcoll_xref";
-#if HAVE_GNAT_UTIL="yes"
-with "gnat_util";
-#end if;
-#if HAVE_LIBADALANG="yes"
-with "libadalang";
-#end if;
-with "wisi";
-project Ada_Mode_Wisi_Parse is
-
- for Main use
- ("ada_mode_wisi_lalr_parse.ads",
- "ada_mode_wisi_lr1_parse.ads",
- "run_ada_lalr_parse.ads",
- "run_ada_lr1_parse.ads",
--- #if ELPA="no"
--- #if HAVE_LIBADALANG="yes"
--- "dump_libadalang_corrected.adb",
--- #end if;
--- "dump_wisitoken_corrected.adb", FIXME: broken by wisitoken changes
--- #end if;
- "gpr_mode_wisi_parse.ads",
- "run_gpr_parse.ads",
- "gpr_query.adb"
- );
-
- for Source_Dirs use (".");
-
- case Standard_Common.Profile is
- when "On" =>
- for Object_Dir use "obj_pro";
- for Exec_Dir use "exec_pro";
-
- when "Off" =>
- for Object_Dir use "obj";
- for Exec_Dir use ".";
- end case;
-
- for Languages use ("Ada", "C");
-
- package Compiler is
-
- case Standard_Common.Build is
- when "Debug" =>
- for Default_Switches ("Ada") use
- Standard_Common.Compiler.Common_Switches &
- Standard_Common.Compiler.Style_Checks &
- Standard_Common.Compiler.Debug_Switches;
-
- -- Generated files; lines too long, don't need debug
- for Switches ("ada_process_actions.adb") use
- Standard_Common.Compiler.Common_Switches &
- Standard_Common.Compiler.Base_Style_Checks &
- Standard_Common.Compiler.Base_Release_Switches & ("-O1",
"-gnat2020");
-
- for Switches ("ada_process_main.adb") use
- Standard_Common.Compiler.Common_Switches &
- Standard_Common.Compiler.Base_Style_Checks &
- Standard_Common.Compiler.Base_Release_Switches & ("-O1",
"-gnat2020");
-
- for Switches ("gpr_process_main.adb") use
- Standard_Common.Compiler.Common_Switches &
- Standard_Common.Compiler.Base_Style_Checks &
- Standard_Common.Compiler.Base_Release_Switches & ("-O1",
"-gnat2020");
-
- for Default_Switches ("C") use
Standard_Common.Compiler.Debug_Switches_C;
-
- for Switches ("gpr_query.adb") use
- -- WORKAROUND: GNAT Community 2021 reports that gnatcoll 21.2 is
missing an "overrides" somewhere
- Standard_Common.Compiler.Common_Switches &
- "-gnaty3abcefhiklnprtx" & -- not overrding --
Standard_Common.Compiler.Base_Style_Checks &
- Standard_Common.Compiler.Debug_Switches;
-
- when "Normal" =>
- for Default_Switches ("Ada") use
- Standard_Common.Compiler.Common_Switches &
- Standard_Common.Compiler.Style_Checks &
- Standard_Common.Compiler.Release_Switches;
-
- for Switches ("ada_process_actions.adb") use
- Standard_Common.Compiler.Common_Switches &
- Standard_Common.Compiler.Base_Style_Checks &
- Standard_Common.Compiler.Base_Release_Switches & ("-O1",
"-gnat2020");
-
- for Switches ("ada_process_main.adb") use
- Standard_Common.Compiler.Common_Switches &
- Standard_Common.Compiler.Base_Style_Checks &
- Standard_Common.Compiler.Base_Release_Switches & ("-O1",
"-gnat2020");
-
- for Switches ("gpr_process.adb") use
- Standard_Common.Compiler.Common_Switches &
- Standard_Common.Compiler.Base_Style_Checks &
- Standard_Common.Compiler.Base_Release_Switches & ("-O1",
"-gnat2020");
-
- for Switches ("gpr_query.adb") use
- -- WORKAROUND: GNAT Community 2021 with gnatcoll 21.2 and -gnat2020
reports a missing "overrides"
- -- AdaCore ticket U618-051
- Standard_Common.Compiler.Common_Switches &
- "-gnaty3abcefhiklnprtx" & "-gnatyM120" & -- not overriding
- Standard_Common.Compiler.Release_Switches;
-
- for Default_Switches ("C") use
Standard_Common.Compiler.Release_Switches_C;
- end case;
-
- end Compiler;
-
- package Builder is
- -- Specifying some configuration pragmas can reduce parse times
- -- by 10% or so, on some systems. But doing so only here causes
- -- recompiling of wisitoken. If we add Global_ or Local_
- -- Configuration_Pragmas in wisitoken.gpr, we get compilation
- -- errors there. So we leave it up to users to patch this if
- -- they want it.
- -- for Global_Configuration_Pragmas use "config.pragmas";
-
- for Global_Compilation_Switches ("Ada") use
Standard_Common.Builder'Global_Compilation_Switches ("Ada");
-
- end Builder;
-
- package Binder is
- for default_switches ("Ada") use ("-E"); -- symbolic traceback
- end Binder;
-
- package Install is
- for Required_Artifacts ("bin") use
- ("ada_annex_p_lr1_parse_table.txt");
- end Install;
-
-end Ada_Mode_Wisi_Parse;
diff --git a/build.sh b/build.sh
index ac6b778380..f88790beba 100755
--- a/build.sh
+++ b/build.sh
@@ -1,56 +1,54 @@
#!/bin/sh
# Build executables for Ada mode.
-# build.sh <other gprbuild options>
+# build.sh options when not using Alire; <other gprbuild options>
# e.g. 'build.sh -j0' : use all available processors to compile
# 'build.sh -wn' : treat warnings as warnings.
# 'build.sh -vh' : Verbose output (high verbosity)
#
# See install.sh for install
-# As of gnat pro 21, gnat_util is no longer provided or required
-echo 'with "gnat_util"; abstract project check is end check;' > check.gpr
-gprbuild -P check.gpr > /dev/null 2>&1
-if test $? -eq 0 ; then
- HAVE_GNAT_UTIL=yes
-else
- HAVE_GNAT_UTIL=no
-fi
+if type alr; then
+ # alr can be installed from https://alire.ada.dev/
+ echo "building ada-mode executables via Alire"
-# support for libadalang is still experimental
-args=`echo -DHAVE_LIBADALANG="no" -DELPA="yes"
-DHAVE_GNAT_UTIL=$HAVE_GNAT_UTIL ada_mode_wisi_parse.gpr.gp
ada_mode_wisi_parse.gpr`
+ # alr get --build builds dependencies with release, but top with
development.
+ alr get emacs_ada_mode~8.0.2
+ cd emacs_ada_mode_*; alr build --release
-echo "gnatprep " $args
-gnatprep $args
+elif type gprbuild; then
+ echo "building ada-mode executables via gnat compiler"
+
+ if [ -d ../wisi-4.1.? ]; then
+ WISI_DIR=`ls -d ../wisi-4.1.?`
+ fi
-if [ -d ../wisi-4.0.? ]; then
- WISI_DIR=`ls -d ../wisi-4.0.?`
-else
- # try devel version
- WISI_DIR=`find .. -type d -name "wisi-4.0beta*"`
-fi
+ args=`echo -DELPA="yes" $WISI_DIR/wisi.gpr.gp $WISI_DIR/wisi.gpr`
+ echo "gnatprep " $args
+ gnatprep $args
-args=`echo -DELPA="yes" $WISI_DIR/wisi.gpr.gp $WISI_DIR/wisi.gpr`
-echo "gnatprep " $args
-gnatprep $args
+ # We don't add WISI_DIR to GPR_PROJECT_PATH because the user may have
+ # already set GPR_PROJECT_PATH.
-# We don't add WISI_DIR to GPR_PROJECT_PATH because the user may have
-# already set GPR_PROJECT_PATH.
+ # Allow running build.sh again, since it often fails the first time.
+ # - Run gprclean, to allow changing compilers and other drastic things
-# Allow running build.sh again, since it often fails the first time.
-# - Run gprclean, to allow changing compilers and other drastic things
+ gprclean -r -P ada_mode_wisi_parse.gpr -aP$WISI_DIR
-gprclean -r -P ada_mode_wisi_parse.gpr -aP$WISI_DIR
+ gprbuild -p -j8 -P $WISI_DIR/wisi.gpr wisitoken-bnf-generate
-gprbuild -p -j8 -P $WISI_DIR/wisi.gpr wisitoken-bnf-generate
+ # We generate the Ada LR1 parse table .txt file here, because it is too
+ # large to keep in ELPA. The code generated by wisitoken-bnf-generate
+ # is in ELPA, because it requires the re2c tool, which we don't expect
+ # users to have installed. The LR1 parse table for gpr is in the Ada
+ # code, so we don't need to generate that here.
+ echo "generate Ada LR1 parse table"
+ $WISI_DIR/wisitoken-bnf-generate --task_count 1 ada_annex_p.wy
-# We generate the Ada LR1 parse table .txt file here, because it is too
-# large to keep in ELPA. The code generated by wisitoken-bnf-generate
-# is in ELPA, because it requires the re2c tool, which we don't expect
-# users to have installed. The LR1 parse table for gpr is in the Ada
-# code, so we don't need to generate that here.
-echo "generate Ada LR1 parse table"
-$WISI_DIR/wisitoken-bnf-generate --task_count 1 ada_annex_p.wy
+ gprbuild -p -j8 -P ada_mode_wisi_parse.gpr -aP $WISI_DIR "$@"
-gprbuild -p -j8 -P ada_mode_wisi_parse.gpr -aP $WISI_DIR "$@"
+else
+ echo "neither Alire nor gnat compiler found"
+ exit 1
+fi
# end of file
diff --git a/create_makefile_conf.sh b/create_makefile_conf.sh
deleted file mode 100755
index 6ec4d8c2db..0000000000
--- a/create_makefile_conf.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-# Create Makefile.conf, which defines HAVE_LIBADALANG
-
-echo 'with "libadalang"; abstract project check is end check;' > check.gpr
-gprbuild -P check.gpr > /dev/null 2>&1
-if test $? -eq 0 ; then
- echo 'HAVE_LIBADALANG := "yes"' >> Makefile.conf
-else
- echo 'HAVE_LIBADALANG := "no"' >> Makefile.conf
-fi
-
-echo 'with "gnat_util"; abstract project check is end check;' > check.gpr
-gprbuild -P check.gpr > /dev/null 2>&1
-if test $? -eq 0 ; then
- echo 'HAVE_GNAT_UTIL := "yes"' >> Makefile.conf
-else
- echo 'HAVE_GNAT_UTIL := "no"' >> Makefile.conf
-fi
-
-# end of file
diff --git a/gpr-indent-user-options.el b/gpr-indent-user-options.el
deleted file mode 100644
index 174a5ebc0b..0000000000
--- a/gpr-indent-user-options.el
+++ /dev/null
@@ -1,48 +0,0 @@
-;; user options shared by gpr mode indentation engines -*- lexical-binding:t
-*-
-;;
-;; Copyright (C) 2017, 2019 Free Software Foundation, Inc.
-;;
-;; Author: Stephen Leake <stephen_leake@member.fsf.org>
-;;
-;; This file is part of GNU Emacs.
-;;
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-;;
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-
-;;;; code
-
-(defgroup gpr-indentation nil
- "Indentation options for gpr source."
- :group 'gpr)
-
-(defcustom gpr-indent 3
- "Size of default indentation, when no other indentation is used."
- :type 'integer
- :safe #'integerp)
-(make-variable-buffer-local 'gpr-indent)
-
-(defcustom gpr-indent-broken 2
- "Indentation for the continuation of a broken line."
- :type 'integer
- :safe #'integerp)
-(make-variable-buffer-local 'gpr-indent-broken)
-
-(defcustom gpr-indent-when 3
- "Indentation for `when' relative to `case'."
- :type 'integer
- :safe #'integerp)
-(make-variable-buffer-local 'gpr-indent-when)
-
-(provide 'gpr-indent-user-options)
-
-;; end file
diff --git a/gpr-mode.el b/gpr-mode.el
deleted file mode 100644
index a544fa2239..0000000000
--- a/gpr-mode.el
+++ /dev/null
@@ -1,429 +0,0 @@
-;; gpr-mode --- Major mode for editing GNAT project files -*-
lexical-binding:t -*-
-
-;; Copyright (C) 2004, 2007, 2008, 2012-2015, 2017 - 2020 Free Software
Foundation, Inc.
-
-;; Author: Stephen Leake <stephen_leake@member.fsf.org>
-;; Maintainer: Stephen Leake <stephen_leake@member.fsf.org>
-
-;; This file is part of GNU Emacs.
-
-;; gpr-mode is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
-
-;; gpr-mode is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-;;; Commentary:
-;;
-;;; History:
-;;
-;; The first gpr-mode was written by Rolf Ebert
-;; <rolf.ebert_nosp...@gmx.net> in 2004.
-;;
-;; Stephen Leake <stephen_leake@member.fsf.org> rewrote it in 2013 to
-;; use the wisi indentation engine.
-;;
-;;;;; Code:
-
-(require 'cl-lib)
-(require 'gnat-core)
-(require 'gpr-indent-user-options)
-(require 'gpr-process)
-(require 'gpr-skel)
-(require 'wisi-process-parse)
-(require 'wisi-prj)
-
-(defgroup gpr nil
- "Major mode for editing gpr (Gnat Project File) source code in Emacs."
- :group 'languages)
-
-(defvar gpr-mode-map
- (let ((map (make-sparse-keymap)))
- ;; C-c <letter> are reserved for users
-
- ;; global-map has C-x ` 'next-error
- (define-key map [return] 'wisi-indent-newline-indent)
- ;; comment-dwim is in global map on M-;
- (define-key map "\C-c\C-e" 'wisi-skel-expand)
- (define-key map "\C-c\C-f" 'wisi-show-parse-error)
- (define-key map "\C-c\C-i" 'wisi-indent-statement)
- (define-key map "\C-c\C-o" 'ff-find-other-file)
- (define-key map "\C-c\C-P" 'gpr-set-as-project)
- (define-key map "\C-c\C-w" 'wisi-case-adjust-at-point)
- (define-key map "\C-c\C-y" 'wisi-case-create-exception)
- (define-key map "\C-c\C-\M-y" 'wisi-case-create-partial-exception)
- (define-key map "\M-n" 'wisi-skel-next-placeholder)
- (define-key map "\M-p" 'wisi-skel-prev-placeholder)
-
- (wisi-case-activate-keys map)
-
- map
- ) "Local keymap used for GPR mode.")
-
-(defvar gpr-mode-menu (make-sparse-keymap "gpr"))
-(easy-menu-define gpr-mode-menu gpr-mode-map "Menu keymap for gpr mode"
- '("gpr"
- ("Help"
- ["gpr Mode" (info "gpr-mode") t]
- ["GNAT Reference Manual" (info "gnat_rm") t]
- ["GNAT User Guide" (info "gnat_ugn") t]
- ["Key bindings" describe-bindings t]
- )
-
- ["Customize" (customize-group 'gpr)]
- ["------" nil nil]
- ["Show current project" wisi-prj-show t]
- ["Show project search path" wisi-prj-show-prj-path t]
- ["Next compilation error" next-error t]
- ["Show last parse error" wisi-show-parse-error t]
- ["Other file" ff-find-other-file t]
- ("Edit"
- ["Indent Line or selection" indent-for-tab-command t]
- ["Indent current statement" wisi-indent-statement t]
- ["Indent Lines in File" (indent-region (point-min) (point-max))
t]
- ["Expand skeleton" wisi-skel-expand t]
- ["Next skeleton placeholder" wisi-skel-next-placeholder t]
- ["Previous skeleton placeholder" wisi-skel-prev-placeholder t]
- ["Comment/uncomment selection" comment-dwim t]
- ["Fill Comment Paragraph" fill-paragraph t]
- )
- ))
-
-(defconst gpr-keywords
- '(
- "abstract"
- "aggregate"
- "at"
- "case"
- "configuration"
- "end"
- "extends"
- "external"
- "external_as_list"
- "for"
- "is"
- "library"
- "limited"
- "null"
- "others"
- "package"
- ;; "project" may also be a non-keyword attribute prefix; see
test/gpr/gds.gpr
- "renames"
- "standard"
- "type"
- "use"
- "when"
- "with"
- )
- "List of gpr mode keywords for font-lock and auto-casing.")
-
-(defvar gpr-font-lock-keywords
- ;; Grammar actions set `font-lock-face' property for all
- ;; non-keyword tokens that need it.
- (list
- (list (concat "\\<" (regexp-opt gpr-keywords t) "\\>") '(0
font-lock-keyword-face)))
- "Expressions to highlight in gpr mode.")
-
-(defun gpr-ff-special-with ()
- (let ((project-path (match-string 1)))
- ;; project-path may be any of "foo", "foo.gpr", "../foo.gpr"
- ;;
- ;; The result of ff-special-constructs is used by
- ;; ff-find-the-other-file with ff-search-directories and nil
- ;; suffix list, so it must contain the relative path and the
- ;; suffix
- (if (file-name-extension project-path)
- project-path
- (concat project-path ".gpr"))
- ))
-
-(defun gpr-set-ff-special-constructs ()
- "Add gpr-specific pairs to `ff-special-constructs'."
- (set (make-local-variable 'ff-special-constructs) nil)
- (mapc (lambda (pair) (add-to-list 'ff-special-constructs pair))
- ;; Each car is a regexp; if it matches at point, the cdr is
- ;; invoked. Each cdr should return the absolute file name to
- ;; go to.
- (list
- ;; A "with" clause; allow "foo_bar.gpr" and "../foo"
- (cons "^with[ \t]+\"\\(\\(?:\\(?:\\sw\\|\\s.\\)\\|\\s_\\)+\\)\";"
- 'gpr-ff-special-with)
- )))
-
-(defun gpr-which-function ()
- "Return the name of the package or project point is in or just after, or
nil."
- (wisi-validate-cache (point-min) (point) nil 'navigate)
- ;; No message on parse fail, since this could be called from
which-function-mode
- (when (wisi-cache-covers-pos 'navigate (point))
- (let ((cache (wisi-backward-cache))
- done
- project-pos
- package-pos
- decl-pos)
- (while (and cache (not done))
- ;; find attribute_declaration and package containing point (if any)
- (cond
- ((not (eq (wisi-cache-class cache) 'statement-start))
- nil)
-
- ((eq (wisi-cache-nonterm cache) 'attribute_declaration)
- (setq decl-pos (point)))
-
- ((eq (wisi-cache-nonterm cache) 'package_spec)
- (setq package-pos (point))
- (setq done t))
-
- ((eq (wisi-cache-nonterm cache) 'simple_project_declaration)
- (setq project-pos (point))
- (setq done t))
- )
-
- (setq cache (wisi-goto-containing cache)))
-
- (cond
- (package-pos
- (goto-char package-pos)
- (setq done t))
-
- (decl-pos
- (goto-char decl-pos)
- (setq done t))
-
- (project-pos
- (goto-char project-pos)
- (setq done t))
-
- (t ;; before project
- (setq done nil))
- )
-
- (when done
- (wisi-next-name))
-
- )))
-
-(defun gpr-add-log-current-function ()
- "For `add-log-current-defun-function'. Returns enclosing package or project
name."
- ;; add-log-current-defun is typically called with point at the start
- ;; of an ediff change section, which is before the start of the
- ;; declaration of a new item. So go to the end of the current line
- ;; first
- (save-excursion
- (end-of-line 1)
- (gpr-which-function)))
-
-(defvar gpr-mode-syntax-table
- (let ((table (make-syntax-table)))
- ;; (info "(elisp)Syntax Class Table" "*info syntax class table*")
- ;; make-syntax-table sets all alphanumeric to w, etc; so we only
- ;; have to add gpr-specific things.
-
- ;; string brackets. `%' is the obsolete alternative string
- ;; bracket (arm J.2); if we make it syntax class ", it throws
- ;; font-lock and indentation off the track, so we use syntax class
- ;; $.
- (modify-syntax-entry ?% "$" table)
- (modify-syntax-entry ?\" "\"" table)
-
- ;; punctuation; operators etc
- (modify-syntax-entry ?- ". 124" table); operator, double hyphen as comment
- (modify-syntax-entry ?& "." table)
- (modify-syntax-entry ?. "." table)
- (modify-syntax-entry ?: "." table)
- (modify-syntax-entry ?= "." table)
- (modify-syntax-entry ?> "." table)
- (modify-syntax-entry ?\; "." table)
- (modify-syntax-entry ?\\ "." table); default is escape; not correct for
gpr strings
- (modify-syntax-entry ?\| "." table)
-
- ;; and \f and \n end a comment
- (modify-syntax-entry ?\f ">" table)
- (modify-syntax-entry ?\n ">" table)
-
- (modify-syntax-entry ?_ "_" table); symbol constituents, not word.
-
- (modify-syntax-entry ?\( "()" table)
- (modify-syntax-entry ?\) ")(" table)
-
- ;; skeleton placeholder delimiters; see gpr-skel.el. We use generic
- ;; comment delimiter class, not comment starter/comment ender, so
- ;; these can be distinguished from line end.
- (modify-syntax-entry ?{ "!" table)
- (modify-syntax-entry ?} "!" table)
-
- table
- )
- "Syntax table to be used for editing gpr source code.")
-
-;;;; wisi integration
-
-(defcustom gpr-auto-case t
- "When non-nil, automatically change case of preceding word while
-typing. Casing of gpr keywords is done according to `gpr-case-keyword',
-identifiers according to `gpr-case-identifier'."
- :group 'gpr
- :type '(choice (const nil)
- (const t))
- :safe (lambda (val) (memq val '(nil t))))
-(make-variable-buffer-local 'gpr-auto-case)
-
-(defcustom gpr-case-keyword 'lower-case
- "Indicate how to adjust case for language keywords.
-Value is one of lower-case, upper-case."
- :group 'gpr
- :type '(choice (const lower-case)
- (const upper-case))
- :safe #'symbolp)
-(make-variable-buffer-local 'gpr-case-keyword)
-
-(defcustom gpr-case-strict t
- "If non-nil, force Mixed_Case for identifiers.
-Otherwise, allow UPPERCASE for identifiers."
- :group 'gpr
- :type 'boolean
- :safe #'booleanp)
-(make-variable-buffer-local 'gpr-case-strict)
-
-(defcustom gpr-case-identifier 'mixed-case
- "Indicates how to adjust the case of gpr keywords."
- :group 'gpr
- :type '(choice (const mixed-case)
- (const lower-case)
- (const upper-case))
- ;; see comment on :safe at gpr-case-keyword
- :safe (lambda (val) (memq val '(mixed-case lower-case upper-case))))
-(make-variable-buffer-local 'gpr-case-identifier)
-
-(defun gpr-case-adjust-p (_typed-char)
- "For `wisi-case-adjust-p-function'."
- ;; casing of 'project' in "Project'Project_Dir" vs "project GDS is"
- (save-excursion
- (let ((end (1+ (point)))
- (start (progn (skip-syntax-backward "w")(point))))
- (cond
- ((string= "project" (downcase (buffer-substring-no-properties start
end)))
- (cond
- ((null (char-after end)) ;; at eob
- nil)
- ((= (char-after end) ?') ;; attribute Project'
- t)
- ((= (char-after end) ? ) ;; keyword project GDS
- (wisi-case-keyword start end)
- nil)
- ))
-
- (t t) ;; not "project"
- ))))
-
-(cl-defstruct (gpr-wisi-parser (:include wisi-process--parser))
- ;; no new slots
- )
-
-(cl-defstruct (gpr-prj (:include wisi-prj))
- ;; no new slots
- )
-
-(defun gpr-prj-default (&optional name)
- (make-gpr-prj :name (or name "_default_") :compiler (make-gnat-compiler)))
-
-(cl-defmethod wisi-prj-default ((prj gpr-prj))
- (gpr-prj-default (wisi-prj-name prj)))
-
-(cl-defmethod wisi-parse-format-language-options ((_parser gpr-wisi-parser))
- (format "%d %d %d"
- gpr-indent
- gpr-indent-broken
- gpr-indent-when
- ))
-
-(defconst gpr-wisi-language-protocol-version "1"
- "Defines language-specific parser parameters.
-Must match wisi-gpr.ads Language_Protocol_Version.")
-
-(defcustom gpr-process-parse-exec "gpr_mode_wisi_parse"
- "Name of executable to use for external process gpr parser,"
- :type 'string
- :group 'gpr)
-
-(defun gpr-set-as-project ()
- "Set current buffer (a gpr file) as current project file."
- (interactive)
- (wisi-prj-dtrt-parse-file (buffer-file-name) (gpr-prj-default
(buffer-file-name)) (buffer-file-name)))
-
-;;;;
-;;;###autoload
-(defun gpr-mode ()
- "The major mode for editing GNAT project files."
-
- (interactive)
- (kill-all-local-variables)
- (setq major-mode 'gpr-mode)
- (setq mode-name "GNAT Project")
- (use-local-map gpr-mode-map)
- (set-syntax-table gpr-mode-syntax-table)
- (set 'case-fold-search t); gpr is case insensitive; the syntax parsing
requires this setting
- (set (make-local-variable 'comment-start) "--")
- (set (make-local-variable 'comment-end) "")
- (set (make-local-variable 'comment-start-skip) "---*[ \t]*")
- (set (make-local-variable 'comment-multi-line) nil)
-
- (set (make-local-variable 'require-final-newline) t)
-
- (set (make-local-variable 'font-lock-defaults)
- '(gpr-font-lock-keywords
- nil t
- ((?\_ . "w"))))
-
- (gpr-set-ff-special-constructs)
- (setq ff-search-directories 'compilation-search-path);; includes project
search path
-
- (set (make-local-variable 'add-log-current-defun-function)
- 'gpr-add-log-current-function)
-
- (wisi-setup
- :indent-calculate nil
- :post-indent-fail nil
- :parser
- (wisi-process-parse-get
- (make-gpr-wisi-parser
- :label "gpr"
- :language-protocol-version gpr-wisi-language-protocol-version
- :exec-file gpr-process-parse-exec
- :face-table gpr-process-face-table
- :token-table gpr-process-token-table
- :repair-image gpr-process-repair-image
- )))
-
- (run-mode-hooks 'gpr-mode-hook)
-
- (setq wisi-auto-case gpr-auto-case)
- (setq wisi-case-identifier gpr-case-identifier)
- (setq wisi-case-strict gpr-case-strict)
- (setq wisi-language-keywords gpr-keywords)
- (setq wisi-case-keyword gpr-case-keyword)
- (setq wisi-case-adjust-p-function #'gpr-case-adjust-p)
- )
-
-;;;###autoload
-(add-to-list 'auto-mode-alist '("\\.gpr\\'" . gpr-mode)) ; GNAT project files
-
-(put 'gpr-mode 'custom-mode-group 'gpr)
-
-(defvar gpr-parser 'process
- "Indicate parser and lexer to use for gpr buffers:
-
-process : wisi elisp lexer, external process parser specified
- by ‘gpr-process-parse-exec ’.
-")
-
-(provide 'gpr-mode)
-;;; gpr-mode.el ends here
diff --git a/gpr-mode.texi b/gpr-mode.texi
deleted file mode 100644
index da6b27f1c8..0000000000
--- a/gpr-mode.texi
+++ /dev/null
@@ -1,256 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@settitle gpr Mode
-
-@copying
-Copyright @copyright{} 2013, 2019 Free Software Foundation, Inc.
-
-@quotation
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.3 or
-any later version published by the Free Software Foundation; with no
-Invariant Sections, with the Front-Cover texts being ``A GNU Manual'',
-and with the Back-Cover Texts as in (a) below. A copy of the license
-is included in the section entitled ``GNU Free Documentation License''.
-
-(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
-modify this GNU manual. Buying copies from the FSF supports it in
-developing GNU and promoting software freedom.''
-@end quotation
-@end copying
-
-@dircategory Emacs
-@direntry
-* gpr mode: (gpr-mode). Emacs mode for editing and navigating gpr
files (gnat project files).
-@end direntry
-
-@titlepage
-@sp 10
-@title gpr Mode
-@sp 2
-@subtitle An Emacs major mode for editing and navigating gpr files
-@sp 2
-@page
-@vskip 0pt plus 1filll
-@insertcopying
-@end titlepage
-
-@contents
-
-@ifnottex
-@node Top, Overview, (dir), (dir)
-@end ifnottex
-
-@menu
-* Overview::
-* Installation::
-* Customization::
-* Moving Through Gpr Code::
-* Identifier completion::
-* Indentation::
-* Statement skeletons::
-* GNU Free Documentation License::
-* Index::
-@end menu
-
-@node Overview, Installation, Top, Top
-@chapter Overview
-gpr files are the project files used by the GNAT compiler and
-associated tools. They describe search paths, compiler options, etc.
-
-@xref{GNAT Project Manager,,GNAT Project Manager,gnat_ugn,GNAT Pro
-User's Guide}, for general information on gpr files.
-
-The Emacs mode for gpr files helps the user in reading
-existing code and facilitates writing new code.
-
-When you open a file with a file extension of @file{.gpr}, Emacs will
-automatically load and activate gpr mode.
-
-@node Installation, Customization, Overview, Top
-@chapter Installation
-
-gpr mode is distributed in the Gnu ELPA package archive, bundled with
-Ada mode; it can be installed via @code{M-x list-packages}
-(@pxref{Packages,,,emacs,Emacs User Guide}).
-
-gpr mode does not have a separate version; it uses the Ada mode
-version number. To see what version of Ada mode you have installed, do
-@kbd{M-x ada-mode-version}.
-
-@node Customization, Moving Through Gpr Code, Installation, Top
-@chapter Customization
-
-Indentation variables for gpr mode can be set via the menu @samp{gpr |
-Customize} from a gpr mode buffer. Click on the @samp{Help} button
-there for help on using customize. @xref{Indentation}.
-
-To modify a specific variable, you can directly call the function
-@code{customize-variable}; just type @kbd{M-x customize-variable
-@key{RET} @var{variable-name} @key{RET}}).
-
-Alternately, you can specify variable settings in the Emacs
-configuration file, @file{~/.emacs}. This file is coded in Emacs lisp,
-and the syntax to set a variable is the following:
-@example
-(setq variable-name value)
-@end example
-
-Some general Emacs settings that are useful for gpr files:
-@table @code
-@item delete-trailing-whitespace
-Deletes space, tab at end of line and blank lines at end of buffer.
-@item untabify
-Deletes tab characters that have crept into the file.
-@item indent-tabs-mode
-Don't insert tab characters when indenting.
-@item hippie-expand
-Bind @code{hippie-expand} to a key; it expands the word before point,
-using words from current buffer, other buffers, file names, etc; see
-@code{hippie-expand-try-functions-list}. You can also add
-@code{wisi-skel-hippie-try} to that list (@pxref{Statement skeletons}).
-@end table
-
-The above can all be set by the following code in your
-@file{~/.emacs}. Note that some are functions are added to
-@code{before-save-hook}; they run just before a buffer is written to disk.
-@example
-(setq-default indent-tabs-mode nil)
-(require 'gpr-mode)
-(add-to-list 'hippie-expand-try-functions-list 'wisi-skel-hippie-try)
-(define-key gpr-mode-map "\C-e" 'hippie-expand)
-(add-hook 'gpr-mode-hook
- (lambda ()
- (add-hook 'before-save-hook 'delete-trailing-whitespace nil t)
- (add-hook 'before-save-hook
- (lambda () (untabify (point-min) (point-max)))
- nil t)))
-@end example
-
-@node Moving Through Gpr Code, Identifier completion, Customization, Top
-@chapter Moving Through Gpr Code
-
-These commands navigate through gpr code. All these functions are
-available through the gpr menu and keybindings.
-
-@table @kbd
-@item C-c C-o
-@findex ff-find-other-file
-If point is on a @code{with} clause, position point on the
-corresponding package declaration.
-
-@item C-u SPACE
-Jump back to the previous location.
-
-@item C-M-f
-Move to the end of the current declaration.
-
-@item C-M-b
-Move to the start of the current declaration.
-
-@end table
-
-@node Identifier completion, Indentation, Moving Through Gpr Code, Top
-@chapter Identifier completion
-
-Emacs provides a general way of completing identifiers: @kbd{M-/}
-(bound to @code{dabbrev-expand}). This is an easy way to type faster:
-you just have to type the first few letters of an identifier, and then
-loop through all the possible completions.
-
-If you have bound @code{hippie-expand}, that also uses
-@code{dabbrev-expand}.
-
-@kbd{M-/} works by parsing all open gpr files for possible
-completions.
-
-For instance, if the words @samp{my_identifier} and @samp{my_subprogram}
-are the only words starting with @samp{my} in any of the open gpr files,
-then you will have this scenario:
-
-@example
-You type: my@kbd{M-/}
-Emacs inserts: @samp{my_identifier}
-If you press @kbd{M-/} once again, Emacs replaces @samp{my_identifier} with
-@samp{my_subprogram}.
-Pressing @kbd{M-/} once more will bring you back to @samp{my_identifier}.
-@end example
-
-This is a very fast way to do completion, and the casing of words will
-also be respected.
-
-@node Indentation, Statement skeletons, Identifier completion, Top
-@chapter Indentation
-
-gpr mode comes with a full set of rules for automatic indentation. You
-can also configure the indentation, via the following variables:
-
-@table @asis
-@item @code{gpr-indent} (default value: 3)
-Number of columns for default indentation.
-
-@item @code{gpr-indent-broken} (default value: 2)
-Number of columns to indent the continuation of a broken line.
-
-@item @code{gpr-indent-when} (default value: 3)
-Indentation for @code{when} relative to @code{case}.
-
-@end table
-
-The following keys indent portions of the text:
-@table @kbd
-
-@item RET
-Insert and indent a new line.
-
-@item TAB
-Indent the current line, or the current region.
-
-@item C-c TAB
-Indent the current declaration.
-
-@end table
-
-The indentation algorithm relies on an error-correcting grammar parser
-to identify the syntactic role for keywords and other words in the
-code.
-
-@node Statement skeletons, GNU Free Documentation License, Indentation, Top
-@chapter Statement skeletons
-
-@kbd{C-c C-e} expands the previous one or two words into a statment
-skeleton. For example, @kbd{c a s e C-c C-e} expands to:
-
-@example
-case is
-when =>
-end case;
-@end example
-
-For named packages, the name is taken from
-the word before point, and the package keyword from the word
-before that:
-
-@example
-package A_Package
-@end example
-
-expands to:
-
-@example
-package A_Package is
-end A_Package;
-@end example
-
-Some expansions prompt for more information, such as
-a choice of license.
-
-@node GNU Free Documentation License, Index, Statement skeletons, Top
-@appendix GNU Free Documentation License
-@include doclicense.texi
-
-@node Index, , GNU Free Documentation License, Top
-@unnumbered Index
-
-@printindex fn
-
-@bye
diff --git a/gpr-process.el b/gpr-process.el
deleted file mode 100644
index 59e611b917..0000000000
--- a/gpr-process.el
+++ /dev/null
@@ -1,148 +0,0 @@
-;;; gpr-process.el --- Generated parser support file -*- buffer-read-only:t
lexical-binding:t -*-
-;; command line: wisitoken-bnf-generate.exe --generate LR1 Ada_Emacs re2c
PROCESS gpr.wy
-
-;; Copyright (C) 2013 - 2022 Free Software Foundation, Inc.
-
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 3, or (at
-;; your option) any later version.
-;;
-;; This software is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-
-(require 'wisi-process-parse)
-
-(defconst gpr-process-token-table
- [WHITESPACE
- NEW_LINE
- COMMENT
- GNAT_PREP
- PLACEHOLDER
- ABSTRACT
- AT
- AGGREGATE
- CASE
- CONFIGURATION
- END
- EXTENDS
- EXTERNAL
- EXTERNAL_AS_LIST
- FOR
- IS
- LEFT_PAREN
- LIBRARY
- NULL
- OTHERS
- PACKAGE
- PROJECT
- RENAMES
- RIGHT_PAREN
- STANDARD
- TYPE
- USE
- WHEN
- WITH
- AMPERSAND
- COLON
- COLON_EQUALS
- COMMA
- DOT
- EQUAL_GREATER
- QUOTE
- SEMICOLON
- VERTICAL_BAR
- NUMERIC_LITERAL
- IDENTIFIER
- STRING_LITERAL
- Wisi_EOI
- wisitoken_accept
- aggregate_g
- attribute_declaration
- attribute_prefix
- attribute_reference
- case_statement
- case_item
- case_items
- compilation_unit
- context_clause
- context_clause_opt
- declarative_item
- declarative_items
- declarative_items_opt
- discrete_choice
- discrete_choice_list
- expression
- external_value
- identifier_opt
- name
- package_declaration
- package_spec
- package_extension
- package_renaming
- project_declaration_opt
- project_extension
- project_qualifier_opt
- simple_declarative_item
- simple_project_declaration
- string_primary
- string_list
- term
- typed_string_declaration
- with_clause
- Wisi_SOI
- ])
-
-(defconst gpr-process-face-table
- [
- font-lock-function-name-face
- font-lock-keyword-face
- nil
- ])
-
-(defconst gpr-process-repair-image
- '(
- (ABSTRACT . "abstract")
- (AT . "at")
- (AGGREGATE . "aggregate")
- (CASE . "case")
- (CONFIGURATION . "configuration")
- (END . "end")
- (EXTENDS . "extends")
- (EXTERNAL . "external")
- (EXTERNAL_AS_LIST . "external_as_list")
- (FOR . "for")
- (IS . "is")
- (LEFT_PAREN . "(")
- (LIBRARY . "library")
- (NULL . "null")
- (OTHERS . "others")
- (PACKAGE . "package")
- (PROJECT . "project")
- (RENAMES . "renames")
- (RIGHT_PAREN . ")")
- (STANDARD . "standard")
- (TYPE . "type")
- (USE . "use")
- (WHEN . "when")
- (WITH . "with")
- (AMPERSAND . "&")
- (COLON . ":")
- (COLON_EQUALS . ":=")
- (COMMA . ",")
- (DOT . ".")
- (EQUAL_GREATER . "=>")
- (QUOTE . "'")
- (SEMICOLON . ";")
- (VERTICAL_BAR . "|")
- (NUMERIC_LITERAL . "1234567890")
- (IDENTIFIER . "A_Bogus_Identifier")
- (STRING_LITERAL . "\"\"")
- ))
-
-(provide 'gpr-process)
diff --git a/gpr-query.el b/gpr-query.el
deleted file mode 100644
index ac74a5f7d1..0000000000
--- a/gpr-query.el
+++ /dev/null
@@ -1,1090 +0,0 @@
-;; gpr-query.el --- Minor mode for navigating sources using gpr_query -*-
lexical-binding:t -*-
-;;
-;; gpr-query supports Ada and any gcc language that supports the
-;; AdaCore -fdump-xref switch (which includes C, C++).
-;;
-;; Copyright (C) 2013 - 2022 Free Software Foundation, Inc.
-
-;; Author: Stephen Leake <stephen_leake@member.fsf.org>
-;; Maintainer: Stephen Leake <stephen_leake@member.fsf.org>
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-
-;;; Usage:
-;;
-;; M-x gpr-query
-
-(require 'cl-lib)
-(require 'compile)
-(require 'gnat-core)
-(require 'xref)
-(require 'wisi-prj)
-
-(defgroup gpr-query nil
- "gpr_query cross reference tool"
- :group 'tools)
-
-(defcustom gpr-query-exec "gpr_query"
- "Executable for gpr_query."
- :type 'string)
-
-(defcustom gpr-query-no-symbols nil
- "If non-nil, don't get symbol completion table from gpr-query.
-Reading all the symbols can be slow in a very large project."
- :type 'boolean)
-
-(defcustom gpr-query-exec-opts '()
- "Options for `gpr-query-exec'; a list of strings.
-\"--project\" is specified automatically. This can be used to
-override the database location by specifying
-\"--db=<writeable_file>\". See \"gpr_query --help\" for more
-options."
- :type 'list)
-
-(defcustom gpr-query-env nil
- "Environment variables needed by the gpr_query executable.
-Value must be a list where each element is \"<name>=<value>\""
- ;; This could also be provided as a project file setting, But it is
- ;; intended for LD_LIBRARY_PATH (info "(ada-mode)Ada executables"),
- ;; which must be set for all projects on the system.
- :type 'string)
-
-(defconst gpr-query-protocol-version "3"
- "Defines data exchanged between this package and the background process.
-Must match gpr_query.adb Version.")
-
-;;;;; sessions
-
-;; gpr_query reads the project files and the database at startup,
-;; which is noticeably slow for a reasonably sized project. But
-;; running queries after startup is fast. So we leave gpr_query
-;; running, and send it new queries via stdin, getting responses via
-;; stdout.
-;;
-;; We maintain a cache of active sessions, one per gnat project.
-
-(cl-defstruct (gpr-query--session)
- gpr-file ;; string absolute file name
- process-env ;; copy of process-environment used to start a process
- (xref-process nil) ;; running gpr_query, for xrefs; default-directory gives
location of db
- no-symbols ;; boolean; if non-nil, don't start symbols process
- (symbols-process nil);; runs 'complete' gpr_query command to get
symbol-locs, symbols; then dies.
-
- symbol-locs ;; alist completion table, with locations; see
gpr-query--symbols-filter
- symbols ;; symbols completion table.
- symbols-valid ;; t when symbols valid
- symbols-count-total
- )
-
-;; Starting the buffer name with a space hides it from some lists, and
-;; also disables font-lock. We sometimes use it to display xref
-;; locations in compilation-mode, so we want font-lock enabled.
-(defconst gpr-query-buffer-name-prefix "*gpr_query-")
-
-(defconst gpr-query-prompt "^>>> $"
- ;; gpr_query output ends with this
- "Regexp matching gpr_query prompt; indicates previous command is complete.")
-
-(defvar gpr-query--debug nil
- "When non-nil, dispay debug messages.")
-
-(defvar-local gpr-query--local-session nil
- "Buffer-local in gpr-query process buffer; the current session.")
-
-(defun gpr-query--check-startup ()
- ;; current buffer is process output buffer
- (goto-char (point-min))
- (if (search-forward-regexp "version: \\([0-9]+\\)$" nil t)
- (unless (string-equal (match-string 1) gpr-query-protocol-version)
- (user-error "gpr-query version mismatch: elisp %s process %s"
- gpr-query-protocol-version
- (match-string 1)))
- (user-error "'%s' is an old version (did not output version); expecting %s"
- gpr-query-exec
- gpr-query-protocol-version))
-
- ;; Check for warnings about invalid directories etc. But some
- ;; warnings are tolerable, so only abort if process actually
- ;; died.
- (goto-char (point-min))
- (when (search-forward "warning:" nil t)
- (if debug-on-error
- (error "gpr_query warnings")
- (beep)
- (message "gpr_query warnings"))))
-
-(defun gpr-query--xref-filter (process text)
- "Process filter for xref-process."
- ;; First, wait for startup to complete, indicated by receiving the
- ;; first prompt. Then start the symbols process; it does the same
- ;; startup, which is faster after the xref startup due to disk
- ;; caching. Then unregister the filter; it is not needed any more.
- (when (buffer-name (process-buffer process))
- ;; process buffer is not dead
- (with-current-buffer (process-buffer process)
- (let ((search-start (marker-position (process-mark process))))
- (save-excursion
- (goto-char (process-mark process))
- (insert text)
- (set-marker (process-mark process) (point)))
-
- ;; Wait for current command (or startup) to finish, do next
- ;; action.
- (goto-char search-start)
- ;; back up a line in case we got part of the prompt previously.
- (forward-line -1)
- (when (re-search-forward gpr-query-prompt (point-max) 1)
- ;; startup completed
- (gpr-query--check-startup)
- (set-process-filter process nil)
-
- (unless (gpr-query--session-no-symbols gpr-query--local-session)
- ;; start the symbols process to get the symbols
- (gpr-query--start-process gpr-query--local-session 'symbols))
- )))))
-
-(defvar gpr-query--symbols-progress ""
- ;; We assume only one gpr-query symbols process is active at a time
- "For progress messages while waiting for symbols.")
-
-(defconst gpr-query--symbol-char "[-+*/=<>&[:alnum:]_.]")
-
-(defconst gpr-query-completion-regexp
- (concat "\\(" gpr-query--symbol-char "+\\)\\((.*)\\)?<.*<[0-9]+>>")
- "Regexp matching completion item from gpr-query--read-symbols.")
-
-(defun gpr-query--update-progress ()
- ;; separate for debugging; update gpr-query--symbols-progress
- (let* ((count (line-number-at-pos (point)))
- (percent (/ (* 100 count) (gpr-query--session-symbols-count-total
gpr-query--local-session))))
- (setq gpr-query--symbols-progress (format "%d%%" percent))
- ))
-
-(defun gpr-query--symbols-filter (process text)
- "Process filter for symbols process."
- (when (buffer-live-p (process-buffer process))
- (with-current-buffer (process-buffer process)
- (let ((search-start (marker-position (process-mark process))))
- (save-excursion
- (goto-char (process-mark process))
- (insert text)
- (set-marker (process-mark process) (point)))
-
- ;; Update session progress slots, accumulate symbols
- (cond
- ((null (gpr-query--session-symbols-count-total
gpr-query--local-session))
- (goto-char search-start)
- ;; back up a line in case we got part of the line previously.
- (forward-line -1)
-
- (when (re-search-forward "element count \\([0-9]+\\)" (point-max) t)
- (setf (gpr-query--session-symbols-count-total
gpr-query--local-session)
- (string-to-number (match-string 1)))
- (when gpr-query--debug
- (message "gpr-query symbols: total count received %d"
- (gpr-query--session-symbols-count-total
gpr-query--local-session)))
- ))
- (t
- (goto-char search-start)
- ;; back up a line in case we got part of the line previously.
- (forward-line -1)
- ;; The gpr_query 'complete' command returns a fully qualified name
- ;; and declaration location for each name:
- ;;
- ;; Wisi.Ada.Ada_Indent_Aggregate.Args
C:\Projects\org.emacs.ada-mode\wisi-ada.ads:102:7
- ;;
- ;; For subprograms it includes the parameters (but not a function
result):
- ;;
- ;; Gpr_Query.Process_Command_Single(Args)
C:\Projects\org.emacs.ada-mode\gpr_query.adb:109:14
- ;;
- ;; Build a completion table as an alist of:
- ;;
- ;; (simple_name(args)<prefix<line>> . location).
- ;;
- ;; The car matches wisi-xref-completion-regexp.
- ;;
- ;; We include the line number to make each name unique. This
- ;; doesn't work for one-line parameter lists, variable
- ;; declaration lists and similar, but they should be
- ;; unique names anyway.
- (while (not (eobp))
- (cond
- ;; We don't use gpr-query-completion-regexp here because we need
finer groups.
- ((looking-at (concat "\\(" gpr-query--symbol-char "+\\)" ;; 1:
prefix
- "\\.\\(" gpr-query--symbol-char "+\\)" ;; 2:
simple name
- "\\((.*)\\)? " ;; 3:
args,
- wisi-file-line-col-regexp)) ;; 4,
5, 6 file:line:col
- ;; Process line. `cl-pushnew' would slow down the
- ;; processing too much; it noticeably ties up the Emacs
- ;; foreground process in large projects.
- (push (match-string-no-properties 2) (gpr-query--session-symbols
gpr-query--local-session))
- (push
- (cons (concat (match-string-no-properties 2)
- (match-string-no-properties 3)
- "<" (match-string-no-properties 1) "<"
(match-string-no-properties 5) ">>")
- (list (gpr-query--normalize-filename
(match-string-no-properties 4))
- (string-to-number (match-string 5))
- (1- (string-to-number (match-string 6)))))
- (gpr-query--session-symbol-locs gpr-query--local-session))
- )
-
- (t ;; ignore line
- nil)
- )
- (forward-line 1))
-
- (gpr-query--update-progress)
- ))
-
- ;; Wait for last command to finish.
- (goto-char search-start)
- (forward-line -1)
- (when (re-search-forward gpr-query-prompt (point-max) t)
- (cond
- ((null (gpr-query--session-symbols gpr-query--local-session))
- ;; startup complete; get symbols
- (when gpr-query--debug
- (message "gpr-query symbols: startup complete"))
- (gpr-query--check-startup)
- (erase-buffer)
- (set-marker (process-mark process) (point-min))
- (setf (gpr-query--session-symbols-count-total
gpr-query--local-session) nil)
- (process-send-string process "complete \"\"\n")
- (setq gpr-query--symbols-progress "0%"))
-
- (t
- ;; All symbols received; done
- (setf (gpr-query--session-symbols-valid gpr-query--local-session) t)
- (set-process-filter process nil)
- (process-send-string process "exit\n"))
-
- ))
- ))))
-
-(defun gpr-query--start-process (session command-type)
- "Start a session process running gpr_query. COMMAND-TYPE is xref or symbols."
- (unless (locate-file gpr-query-exec exec-path '("" ".exe"))
- (user-error "'%s' not found on PATH" gpr-query-exec))
-
- (when gpr-query--debug
- (message "gpr-query-start %s" command-type))
-
- ;; Reuse existing buffer if possible
- (let* ((gpr-file (gpr-query--session-gpr-file session))
- (process
- (cl-ecase command-type
- (xref (gpr-query--session-xref-process session))
- (symbols (gpr-query--session-symbols-process session))))
- (buffer (and process (process-buffer process)))
- (process-environment (gpr-query--session-process-env session)))
-
- (unless (buffer-live-p buffer)
- ;; User may have killed buffer, which kills process
- (let ((name (concat "*gpr-query-" (symbol-name command-type) "*-"
gpr-file)))
- (setq buffer (get-buffer-create name))
- (with-current-buffer buffer
- (setq default-directory (file-name-directory gpr-file))
- (compilation-mode) ;; kills all local variables, requires
default-directory
- (setq gpr-query--local-session session)
- (setq buffer-read-only nil))))
-
- (with-current-buffer buffer
- (erase-buffer); delete any previous messages, prompt
- (setf (gpr-query--session-symbol-locs session) nil)
- (setf (gpr-query--session-symbols session) nil)
- (setf (gpr-query--session-symbols-valid session) nil)
- (let ((args (cl-delete-if
- 'null
- (append
- (list
- (concat "--project=" (file-name-nondirectory gpr-file))
- (when gpr-query--debug
- "--tracefile=gpr_query.trace"
- ;; The file gpr_query.trace should contain: gpr_query=yes
- ))
- gpr-query-exec-opts))))
- (when gpr-query--debug
- (message "gpr-query process args: %s" args))
- (setq process
- (apply #'start-process
- (buffer-name)
- buffer
- gpr-query-exec
- args)))
- (cl-ecase command-type
- (xref
- (setf (gpr-query--session-xref-process session) process)
- (set-process-filter process #'gpr-query--xref-filter))
- (symbols
- (setf (gpr-query--session-symbols-process session) process)
- (set-process-filter process #'gpr-query--symbols-filter)))
-
- (set-process-query-on-exit-flag process nil)
- )))
-
-(defun gpr-query--make-session (project no-symbols)
- "Create and return a session for the current project file.
-If NO-SYMBOLS is non-nil, don't create the symbols process."
- (let ((session
- (make-gpr-query--session
- :gpr-file (gnat-compiler-gpr-file (wisi-prj-xref project))
- :no-symbols no-symbols
- :process-env (copy-sequence
- (append
- (wisi-prj-compile-env project)
- (wisi-prj-file-env project)
- gpr-query-env
- process-environment)))))
- (gpr-query--start-process session 'xref)
- session))
-
-(defvar gpr-query--sessions '()
- "Assoc list of sessions, indexed by absolute GNAT project file name.")
-
-(cl-defun gpr-query-cached-session (project &key no-symbols)
- "Return a session for PROJECT, creating it if necessary.
-If NO-SYMBOLS is non-nil, don't create the symbols process."
- (let* ((gpr-file (gnat-compiler-gpr-file (wisi-prj-xref project)))
- (session (cdr (assoc gpr-file gpr-query--sessions))))
- (if session
- (progn
- (setf (gpr-query--session-no-symbols session) (or no-symbols
gpr-query-no-symbols))
- (unless (process-live-p (gpr-query--session-xref-process session))
- (gpr-query--start-process session 'xref))
- session)
- ;; else
- (prog1
- (setq session (gpr-query--make-session project (or no-symbols
gpr-query-no-symbols)))
- (push (cons gpr-file session) gpr-query--sessions)))
- ))
-
-(defun gpr-query-session-wait (session command-type)
- "Wait for the current COMMAND-TYPE command to complete.
-COMMAND-TYPE is one of xref or symbols."
- (when (and
- (eq command-type 'symbols)
- (null (gpr-query--session-symbols-process session)))
- ;; The symbols process is not started until the xref process
- ;; returns its first prompt.
- (gpr-query-session-wait session 'xref))
-
- (let ((process
- (cl-ecase command-type
- (xref (gpr-query--session-xref-process session))
- (symbols (gpr-query--session-symbols-process session))))
- search-start
- (done nil)
- (wait-count 0))
-
- (when (and (eq command-type 'xref)
- (not (process-live-p process)))
- (gpr-query--show-buffer session command-type)
- (error "gpr-query process died"))
-
- (while (and (process-live-p process)
- (not done))
- (cl-ecase command-type
- (symbols
- ;; The process filter is reading symbols text in the process
- ;; buffer; don't move point or otherwise modify the buffer.
- (cond
- ((gpr-query--session-symbols-valid session)
- (setq done t))
-
- (t
- (message "gpr-query receiving symbols %s"
gpr-query--symbols-progress))))
-
- (xref
- (message (concat "running gpr_query ..." (make-string wait-count ?.)))
-
- ;; process output is inserted before point, so move back over it to
search it
- (with-current-buffer (process-buffer process)
- (setq search-start (point-min))
-
- (goto-char search-start)
- (if (re-search-forward gpr-query-prompt (point-max) 1)
- (setq done t))))
- )
-
- (when (not done);; wait for more input
- (unless (accept-process-output process 1.0)
- ;; accept-process returns non-nil when we got output, so we
- ;; did not wait for timeout.
- (setq wait-count (1+ wait-count))
- ))
- )
-
- (if (or (eq command-type 'symbols);; symbols process is supposed to die
- (process-live-p process))
- (cl-ecase command-type
- (symbols
- (message "gpr-query symbols done; symbols length %d"
- (length (gpr-query--session-symbols session)))
- )
- (xref
- (message (concat "running gpr_query ... done"))))
- (gpr-query--show-buffer session command-type)
- (error "gpr_query process died"))
- ))
-
-(defun gpr-query--session-send (session cmd wait)
- "Send CMD to SESSION gpr_query xref process.
-If WAIT is non-nil, wait for command to complete.
-Return buffer that holds output."
- ;; Always wait for previous command to complete; also checks for
- ;; dead process.
- (gpr-query-session-wait session 'xref)
- (when gpr-query--debug
- (message "gpr-query-send: %s" cmd))
- (with-current-buffer (process-buffer (gpr-query--session-xref-process
session))
- (erase-buffer)
- (process-send-string (gpr-query--session-xref-process session)
- (concat cmd "\n"))
- (when wait
- (gpr-query-session-wait session 'xref))
- (current-buffer)
- ))
-
-(defun gpr-query--kill-process (process)
- "Kill a gpr-query process nicely.
-Returns t if the process was live."
- (when (process-live-p process)
- (process-send-string process "exit\n")
- (while (process-live-p process)
- (accept-process-output process 1.0))
- t))
-
-(defun gpr-query-kill-session (session)
- "Kill the background processes of SESSION.
-Return t if either process was live."
- (setf (gpr-query--session-symbol-locs session) nil)
- (setf (gpr-query--session-symbols session) nil)
- (setf (gpr-query--session-symbols-valid session) nil)
- (let (result)
- (setq result (gpr-query--kill-process (gpr-query--session-xref-process
session)))
- (setq result (or (gpr-query--kill-process
(gpr-query--session-symbols-process session))
- result))
- result))
-
-(defun gpr-query-kill-all-sessions ()
- (interactive)
- (let ((count 0))
- (mapc (lambda (assoc)
- (when (gpr-query-kill-session (cdr assoc))
- (setq count (1+ count))))
- gpr-query--sessions)
- (message "Killed %d sessions" count)
- ))
-
-(defun gpr-query--show-buffer (session command-type)
- (cl-ecase command-type
- (xref (pop-to-buffer (process-buffer (gpr-query--session-xref-process
session))))
- (symbols (pop-to-buffer (process-buffer
(gpr-query--session-symbols-process session))))))
-
-;;;;; utils
-
-(defun gpr-query-get-src-dirs (project src-dirs)
- "Append list of source dirs in gpr project PROJECT to SRC-DIRS.
-Uses `gpr_query'. Returns new list."
-
- (let ((session (gpr-query-cached-session project)))
- (with-current-buffer (gpr-query--session-send session "source_dirs" t)
- (goto-char (point-min))
- (while (not (looking-at gpr-query-prompt))
- (cl-pushnew
- (expand-file-name ; Canonicalize path part.
- (directory-file-name
- (buffer-substring-no-properties (point) (point-at-eol))))
- src-dirs :test #'equal)
- (forward-line 1))
- ))
- src-dirs)
-
-(defun gpr-query-get-prj-dirs (project prj-dirs)
- "Append list of project dirs in gpr project PROJECT to PRJ-DIRS.
-Uses `gpr_query'. Returns new list."
-
- (let ((session (gpr-query-cached-session project)))
- (with-current-buffer (gpr-query--session-send session "project_path" t)
- (goto-char (point-min))
- (while (not (looking-at gpr-query-prompt))
- (cl-pushnew
- (let ((dir (buffer-substring-no-properties (point) (point-at-eol))))
- (if (string= dir ".")
- (directory-file-name default-directory)
- (expand-file-name dir))) ; Canonicalize path part.
- prj-dirs
- :test #'equal)
- (forward-line 1))
- ))
- prj-dirs)
-
-(defconst gpr-query-ident-file-regexp-alist
- (list (concat "^" wisi-file-line-col-regexp) 1 2 3)
- "For compilation-error-regexp-alist, matching gpr_query output")
-
-(defconst gpr-query-ident-file-type-regexp
- (concat wisi-file-line-col-regexp " (\\(.*\\))")
- "Regexp matching <file>:<line>:<column> (<type>)")
-
-(defun gpr-query-compilation (project identifier file line col cmd comp-err
&optional local_only append)
- "Run gpr_query CMD IDENTIFIER:FILE:LINE:COL,
-with compilation-error-regexp-alist set to COMP-ERR."
- ;; Useful when gpr_query will return a list of references; the user
- ;; can navigate to each result in turn via `next-error'.
-
- ;; Emacs column is 0-indexed, gpr_query is 1-indexed.
- (let* ((cmd-1 (concat (format "%s %s:%s:%d:%d"
- cmd identifier file line (1+ col))
- (when (member cmd '("refs"))
- (if local_only " local_only" " global"))
- (when (member cmd '("overriding" "overridden_by"
"parent_types" "refs"))
- (if wisi-xref-full-path " full_file_names" "
short_file_names"))))
- (session (gpr-query-cached-session project))
- (result-count 0)
- start-pos prev-content
- target-file target-line target-col)
-
- (when append
- (with-current-buffer (process-buffer (gpr-query--session-xref-process
session))
- ;; don't include trailing prompt in `prev-content'
- (goto-char (point-max))
- (forward-line 0)
- (setq prev-content (buffer-substring (point-min) (point)))))
-
- (with-current-buffer (gpr-query--session-send session cmd-1 t)
- ;; point is at EOB. gpr_query returns one line per result plus prompt,
warnings
- (setq result-count (- (line-number-at-pos) 1))
- (setq start-pos (point-min))
-
- (setq buffer-read-only nil)
- (when append
- (goto-char (point-min))
- (insert prev-content)
- (setq start-pos (point))
- (goto-char (point-max)))
-
- (set (make-local-variable 'compilation-error-regexp-alist) (list
comp-err))
-
- (compilation--flush-parse (point-min) (point-max))
- (compilation--ensure-parse (point-max))
-
- (goto-char start-pos)
-
- (cond
- ((looking-at "^warning: ")
- (setq result-count (1- result-count))
- (forward-line 1))
- ((looking-at "^Error: entity not found")
- (user-error (buffer-substring-no-properties (line-beginning-position)
(line-end-position))))
- )
-
- (cond
- ((and (not append)
- (= result-count 1))
- ;; just go there, don't display session-buffer. We have to
- ;; fetch the compilation-message while in the
- ;; session-buffer. and call wisi-goto-source outside the
- ;; with-current-buffer above.
- (let* ((msg (compilation-next-error 0))
- ;; IMPROVEME: '--' indicates internal-only. But we can't
- ;; use compile-goto-error, because that displays the
- ;; session-buffer.
- (loc (compilation--message->loc msg)))
- (setq target-file (caar (compilation--loc->file-struct loc))
- target-line (caar (cddr (compilation--loc->file-struct loc)))
- target-col (1- (compilation--loc->col loc))
- )
- ))
-
- ((= result-count 0)
- (user-error "gpr_query returned no results"))
-
- (t
- ;; for next-error, below
- (setq next-error-last-buffer (current-buffer)))
-
- ));; case, with-currrent-buffer
-
- (if (and (not append)
- (= result-count 1))
- (wisi-goto-source target-file target-line target-col)
-
- ;; more than one result; display session buffer, goto first ref
- ;;
- ;; compilation-next-error-function assumes there is not an error
- ;; at point-min; work around that by moving forward 0 errors for
- ;; the first one. Unless the first line contains "warning: ".
- (pop-to-buffer next-error-last-buffer)
- (goto-char start-pos)
- (unless append
- (if (looking-at "^warning: ")
- (next-error 1 t)
- (next-error 0 t)))
- )
- ))
-
-(defun gpr-query-dist (found-line line found-col col)
- "Return distance between FOUND-LINE FOUND-COL and LINE COL."
- (+ (abs (- found-col col))
- (* (abs (- found-line line)) 250)))
-
-(defvar gpr-query-map
- (let ((map (make-sparse-keymap)))
- ;; C-c C-i prefix for gpr-query minor mode
-
- (define-key map "\C-c\C-i\C-d" 'gpr-query-goto-declaration)
- (define-key map "\C-c\C-i\C-q" 'gpr-query-refresh)
- (define-key map "\C-c\C-i\C-r" 'gpr-query-show-references)
- ;; IMPROVEME: (define-key map "\C-c\M-d" 'gpr-query-parents)
- ;; IMPROVEME: overriding
- map
- ) "Local keymap used for gpr query minor mode.")
-
-(defvar gpr-query-menu (make-sparse-keymap "gpr-query"))
-(easy-menu-define gpr-query-menu gpr-query-map "Menu keymap for gpr-query
minor mode"
- '("gpr-query"
- ["Next xref" next-error t]
- ["Goto declaration/body" xref-find-definitions t]
- ["Show parent declarations" wisi-show-declaration-parents t]
- ["Show references" wisi-show-references t]
- ["Show overriding" wisi-show-overriding t]
- ["Show overridden" wisi-show-overridden t]
- ["Refresh cross reference cache" wisi-refresh-prj-cache t]
- ))
-
-(define-minor-mode gpr-query
- "Minor mode for navigating sources using GNAT cross reference tool.
-Enable mode if ARG is positive."
- :initial-value t
- :lighter " gpr-query" ;; mode line
-
- ;; just enable the menu and keymap
- )
-
-(defun gpr-query--normalize-filename (file)
- "Convert FILE from native format to Emacs standard.
-FILE is from gpr-query."
- ;; FILE must be abs
- (cond
- ((eq system-type 'windows-nt)
- ;; 'expand-file-name' converts Windows directory separators to
- ;; normal Emacs. Normally we would downcase here, but that
- ;; interferes with completion table matching (buffer-file-name) in
- ;; wisi-filter-table.
- (expand-file-name file))
-
- ((eq system-type 'darwin)
- file)
-
- (t ;; linux
- file))
- )
-
-;;;;; wisi-xref methods
-
-(cl-defstruct (gpr-query-xref (:include gnat-compiler))
- ;; no new slots
- )
-
-;;;###autoload
-(cl-defun create-gpr_query-xref (&key gpr-file)
- ;; See note on `create-ada-prj' for why this is not a defalias.
- (make-gpr-query-xref :gpr-file gpr-file))
-
-(cl-defmethod wisi-xref-parse-one ((xref gpr-query-xref) project name value)
- (wisi-compiler-parse-one xref project name value))
-
-(cl-defmethod wisi-xref-parse-final ((xref gpr-query-xref) _project
prj-file-name)
- (unless (gnat-compiler-gpr-file xref)
- (if (string= "gpr" (file-name-extension prj-file-name))
- (setf (gnat-compiler-gpr-file xref) prj-file-name)
- (user-error "using gpr-query xref, but no gpr file provided"))))
-
-(cl-defmethod wisi-xref-select-prj ((_xref gpr-query-xref) project)
- ;; Start the process if needed; it will read the db and return the
- ;; symbols in the background.
- (gpr-query-cached-session project)
- nil)
-
-(cl-defmethod wisi-xref-refresh-cache ((xref gpr-query-xref) project no-full)
- ;; Kill the current session and delete the database, to get changed
- ;; env vars etc when it restarts.
- ;;
- ;; We need to delete the database files if the compiler version
- ;; changed, or the database was built with an incorrect environment
- ;; variable, or something else screwed up. However, rebuilding after
- ;; that is a lot slower, so we only do that with permission.
- (let* ((gpr-file (gnat-compiler-gpr-file xref))
- (session (gpr-query-cached-session project :no-symbols t)) ;; we only
need the db file name.
- (db-filename
- (unless no-full
- (condition-case nil
- ;; gpr-query--session-send can fail if the .gpr file
- ;; contains errors, for example if GPR_PROJECT_PATH is
- ;; wrong.
- (with-current-buffer (gpr-query--session-send session "db_name"
t)
- (goto-char (point-min))
- (buffer-substring-no-properties (line-beginning-position)
(line-end-position)))
- (error
- nil)
- ))))
-
- ;; We have to kill the process to delete the database. If we are
- ;; not deleting the db, this is an easy way to refresh everything
- ;; else.
- (gpr-query-kill-session session)
- (when (and db-filename
- (file-exists-p db-filename))
- (delete-file db-filename))
-
- ;; recreate session from newly parsed project
- (setq gpr-query--sessions (delete (cons gpr-file session)
gpr-query--sessions))
-
- (setq session (gpr-query-cached-session project))
- (message "project cache refreshed")
- ))
-
-(defun gpr-query-refresh-lite ()
- "Send a refresh command to the current gpr-query process."
- (interactive)
- (let* ((project (project-current))
- (session (gpr-query-cached-session project))
- (process (gpr-query--session-xref-process session)))
-
- (process-send-string process "refresh\n")
- (gpr-query-session-wait session 'xref)
- (message "gpr_query refreshed")
- ))
-
-(defun gpr-query-tree-refs (project item op)
- "Run gpr_query tree command OP on ITEM (an xref-item), return list of
xref-items."
- ;; WORKAROUND: xref 1.3.2 xref-location changed from defclass to
- ;; cl-defstruct. If drop emacs 26, use 'with-suppressed-warnings'.
- (with-no-warnings ;; "unknown slot"
- (let ((summary (if (functionp 'xref-item-summary) (xref-item-summary item)
(oref item summary)))
- (location (if (functionp 'xref-item-location) (xref-item-location
item) (oref item location)))
- (eieio-skip-typecheck t)) ;; 'location' may have line, column nil
- (let ((file (if (functionp 'xref-file-location-file)
- (xref-file-location-file location)
- (oref location file)))
- (line (if (functionp 'xref-file-location-line)
- (xref-file-location-line location)
- (oref location line)))
- (column (if (functionp 'xref-file-location-column)
- (xref-file-location-column location)
- (oref location column))))
-
- (when (eq ?\" (aref summary 0))
- ;; gpr_query wants the quotes stripped
- (when column (setq column (+ 1 column)))
- (setq summary (substring summary 1 (1- (length summary)))))
-
- (let ((cmd (format "%s %s:%s:%s:%s full_file_names"
- op
- summary
- (file-name-nondirectory file)
- (or line "")
- (if column (1+ column) "")))
- (result nil)
- (session (gpr-query-cached-session project)))
-
- (with-current-buffer (gpr-query--session-send session cmd t)
- ;; 'gpr_query tree_*' returns a list containing the declarations,
- ;; bodies, and references (classwide), in no particular order.
- ;;
- ;; the format of each line is file:line:column (type)
- ;; 1 2 3 4
- ;;
- ;; 'type' includes the type name
-
- (goto-char (point-min))
-
- (while (not (eobp))
- (cond
- ((looking-at gpr-query-ident-file-type-regexp)
- ;; process line
- (let ((found-file (match-string 1))
- (found-line (string-to-number (match-string 2)))
- (found-col (1- (string-to-number (match-string 3))))
- (found-type (match-string 4))
- )
-
- (unless found-file
- ;; Can be nil if actual file is renamed but gpr-query
- ;; database not updated. We abort, rather than just
- ;; ignoring this entry, because it means other ref are
- ;; probably out of date as well.
- (user-error "file '%s' not found; refresh?" (match-string
1)))
-
- (setq found-file (gpr-query--normalize-filename found-file))
-
- (push (xref-make
- (cond
- ((string= op "tree_refs")
- (if found-type
- (if (string-match ";" found-type)
- ;; ref is to the identifier
- (concat summary " " found-type)
- ;; ref is to the controlling type of the
identifier
- found-type)
- summary))
-
- ((string= op "tree_defs")
- found-type)
- )
- (xref-make-file-location found-file found-line
found-col))
- result)
- ))
-
- (t ;; ignore line
- ;;
- ;; This skips GPR_PROJECT_PATH and echoed command at start of
buffer.
- ;;
- ;; It also skips warning lines.
- )
- )
- (forward-line 1)
- )
-
- (when (null result)
- (user-error "gpr_query did not return any references; refresh?"))
-
- (nreverse result) ;; root of tree first.
- ))))))
-
-(cl-defmethod wisi-xref-completion-table ((_xref gpr-query-xref) project)
- (let ((session (gpr-query-cached-session project)))
- (unless (consp (gpr-query--session-symbol-locs session))
- (gpr-query-session-wait session 'symbols));; ensure symbol-locs is ready
- (gpr-query--session-symbol-locs session)))
-
-(cl-defmethod wisi-xref-completion-delim-regex ((_xref gpr-query-xref))
- (concat "[_(.<>*]"))
-
-(cl-defmethod wisi-xref-completion-regexp ((_xref gpr-query-xref))
- gpr-query-completion-regexp)
-
-(cl-defmethod wisi-xref-completion-at-point-table ((_xref gpr-query-xref)
project)
- (let ((session (gpr-query-cached-session project)))
- ;; no wait for symbols to be ready; this is supposed to be fast
- (gpr-query--session-symbols session)))
-
-(cl-defmethod wisi-xref-definitions ((_xref gpr-query-xref) project item)
- (gpr-query-tree-refs project item "tree_defs"))
-
-(cl-defmethod wisi-xref-references ((_xref gpr-query-xref) project item)
- (gpr-query-tree-refs project item "tree_refs"))
-
-(cl-defmethod wisi-xref-other ((_xref gpr-query-xref) project &key identifier
filename line column)
- (when (eq ?\" (aref identifier 0))
- ;; gpr_query wants the quotes stripped
- (setq column (+ 1 column))
- (setq identifier (substring identifier 1 (1- (length identifier))))
- )
-
- (let ((temp filename))
-
- (unless (file-name-absolute-p temp)
- (setq temp (locate-file filename compilation-search-path)))
-
- (if temp
- (setq filename temp)
- (user-error "'%s' not found in current project - renamed?" filename)))
-
- (setq filename (gpr-query--normalize-filename filename))
-
- (let ((cmd (format "refs %s:%s:%s:%s global full_file_names"
- identifier
- (file-name-nondirectory filename)
- (or line "")
- (if column (1+ column) "")))
- (decl-loc nil)
- (body-loc nil)
- (search-type nil)
- (min-distance most-positive-fixnum)
- (result nil)
- (session (gpr-query-cached-session project)))
-
- (with-current-buffer (gpr-query--session-send session cmd t)
- ;; 'gpr_query refs' returns a list containing the declaration,
- ;; the body, and all the references, in no particular order.
- ;;
- ;; We search the list, looking for the input location,
- ;; declaration and body, then return the declaration or body as
- ;; appropriate.
- ;;
- ;; the format of each line is file:line:column (type)
- ;; 1 2 3 4
- ;;
- ;; 'type' can be:
- ;; body
- ;; declaration
- ;; full declaration (for a private type)
- ;; implicit reference
- ;; reference
- ;; static call
- ;;
- ;;
Module_Type:/home/Projects/GDS/work_stephe_2/common/1553/gds-hardware-bus_1553-wrapper.ads:171:9
(full declaration)
- ;;
- ;;
itc_assert:/home/Projects/GDS/work_stephe_2/common/itc/opsim/itc_dscovr_gdsi/Gds1553/src/Gds1553.cpp:830:9
(reference)
-
- (message "parsing result ...")
-
- (goto-char (point-min))
-
- (while (not (eobp))
- (cond
- ((looking-at gpr-query-ident-file-type-regexp)
- ;; process line
- (let* ((found-file (match-string 1))
- (found-line (string-to-number (match-string 2)))
- (found-col (string-to-number (match-string 3)))
- (found-type (match-string 4))
- (dist (if (and line column)
- (gpr-query-dist found-line line found-col
column)
- most-positive-fixnum))
- )
-
- (unless found-file
- ;; can be nil if actual file is renamed but gpr-query database
not updated
- (user-error "file '%s' not found; refresh?" (match-string 1)))
-
- (setq found-file (gpr-query--normalize-filename found-file))
-
- (cond
- ((string-equal found-type "declaration")
- (setq decl-loc (list found-file found-line (1- found-col))))
-
- ((or
- (string-equal found-type "body")
- (string-equal found-type "full declaration"))
- (setq body-loc (list found-file found-line (1- found-col))))
- )
-
- (when (and (equal found-file filename)
- (or
- (string-equal found-type "body")
- (string-equal found-type "full declaration")
- (string-equal found-type "declaration"))
- (<= dist min-distance))
- ;; The source may have changed since the xref database
- ;; was computed, so allow for fuzzy matches.
- (setq min-distance dist)
- (setq search-type found-type))
- ))
-
- (t ;; ignore line
- ;;
- ;; This skips GPR_PROJECT_PATH and echoed command at start of buffer.
- ;;
- ;; It also skips warning lines. For example,
- ;; gnatcoll-1.6w-20130902 can't handle the Auto_Text_IO
- ;; language, because it doesn't use the gprconfig
- ;; configuration project. That gives lines like:
- ;;
- ;; common_text_io.gpr:15:07: language unknown for
"gds-hardware-bus_1553-time_tone.ads"
- ;;
- ;; There are probably other warnings that might be reported as well.
- )
- )
- (forward-line 1)
- )
-
- (cond
- ((and
- line
- (string-equal search-type "declaration")
- body-loc)
- ;; We started the search on the declaration; find the body
- (setq result body-loc))
-
- ((and
- (not line)
- (string-equal search-type "declaration"))
- ;; We started in the spec file; find the declaration
- ;;
- ;; If the file has both declaration and body, this will go to
- ;; declaration. Then a search with line, column can go to body.
- (setq result decl-loc))
-
- ((and
- (not line)
- (or
- (string-equal search-type "body")
- (string-equal search-type "full declaration")))
- ;; We started n the body file; find the body
- (setq result body-loc))
-
- (decl-loc
- (setq result decl-loc))
- )
-
- (when (null result)
- (user-error "gpr_query did not return other item; refresh?"))
-
- (message "parsing result ... done")
- result)))
-
-(cl-defmethod wisi-xref-parents ((_xref gpr-query-xref) project &key
identifier filename line column)
- (gpr-query-compilation project identifier filename line column
"parent_types" 'gpr-query-ident-file))
-
-(cl-defmethod wisi-xref-all ((_xref gpr-query-xref) project &key identifier
filename line column local-only append)
- (gpr-query-compilation project identifier filename line column "refs"
'gpr-query-ident-file local-only append))
-
-(cl-defmethod wisi-xref-overriding ((_xref gpr-query-xref) project &key
identifier filename line column)
- (gpr-query-compilation project identifier filename line column "overriding"
'gpr-query-ident-file))
-
-(cl-defmethod wisi-xref-overridden ((_xref gpr-query-xref) project &key
identifier filename line column)
- (when (eq ?\" (aref identifier 0))
- ;; gpr_query wants the quotes stripped
- (setq column (+ 1 column))
- (setq identifier (substring identifier 1 (1- (length identifier))))
- )
-
- (let ((cmd (format "overridden %s:%s:%d:%d %s"
- identifier (file-name-nondirectory filename) line (1+
column)
- (if wisi-xref-full-path "full_file_names"
"short_file_names")))
- (session (gpr-query-cached-session project))
- result)
- (with-current-buffer (gpr-query--session-send session cmd t)
-
- (goto-char (point-min))
- (while (and (not result)
- (not (eobp)))
- (cond
- ((looking-at wisi-file-line-col-regexp)
- (setq result
- (list
- (match-string 1)
- (string-to-number (match-string 2))
- (string-to-number (match-string 3)))))
-
- (t
- (forward-line))
- ))
-
- (when (null result)
- (user-error "gpr_query did not return a result; refresh?"))
-
- (message "parsing result ... done")
- result)))
-
-(add-to-list 'compilation-error-regexp-alist-alist
- (cons 'gpr-query-ident-file gpr-query-ident-file-regexp-alist))
-
-(provide 'gpr-query)
-;;; end of file
diff --git a/gpr-skel.el b/gpr-skel.el
deleted file mode 100644
index 9a53364fcf..0000000000
--- a/gpr-skel.el
+++ /dev/null
@@ -1,137 +0,0 @@
-;; gpr-skel.el --- Extension to gpr-mode for inserting statement skeletons
-*- lexical-binding:t -*-
-
-;; Copyright (C) 2013-2015, 2018 - 2021 Free Software Foundation, Inc.
-
-;; Authors: Stephen Leake <stephen_leake@stephe-leake.org>
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-
-;;; Design:
-;;
-;; The primary user command is `wisi-skel-expand', which inserts the
-;; skeleton associated with the previous word (possibly skipping a
-;; name).
-;;
-;; We don't define skeletons that prompt for most of the content; it
-;; is easier just to type in the buffer.
-;;
-;; These skeletons are not intended to teach a novice the language,
-;; just to make it easier to write code that the gpr-wisi parser
-;; likes, and handle repeated names nicely.
-
-;;; History:
-
-;; Created Dec 2013
-
-(require 'skeleton)
-(require 'wisi-skel)
-
-;;;;; user variables, example skeletons intended to be overwritten
-
-(defgroup gpr nil
- "Major mode for editing GNAT project files in Emacs."
- :group 'languages)
-
-(defcustom gpr-skel-initial-string "{header}\n{project}"
- "String to insert in empty buffer.
-This could end in a token recognized by `gpr-skel-expand'."
- :type 'string
- :safe #'stringp)
-
-(define-skeleton gpr-skel-user-restricted
- "Example copyright/license skeleton, with automatic year and owner."
- ()
- "-- Copyright (C) " (format-time-string "%Y ") user-full-name " All Rights
Reserved.\n"
-)
-
-(define-skeleton gpr-skel-gpl
- "Example copyright/license skeleton, with automatic year and owner, GPLv3."
- ()
- "-- Copyright (C) " (format-time-string "%Y ") user-full-name " All Rights
Reserved.\n"
- "--\n"
- "-- This program is free software; you can redistribute it and/or\n"
- "-- modify it under terms of the GNU General Public License as\n"
- "-- published by the Free Software Foundation; either version 3, or (at\n"
- "-- your option) any later version. This program is distributed in the\n"
- "-- hope that it will be useful, but WITHOUT ANY WARRANTY; without even\n"
- "-- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n"
- "-- PURPOSE. See the GNU General Public License for more details. You\n"
- "-- should have received a copy of the GNU General Public License\n"
- "-- distributed with this program; see file COPYING. If not, write to\n"
- "-- the Free Software Foundation, 51 Franklin Street, Suite 500, Boston,\n"
- "-- MA 02110-1335, USA.\n"
-)
-
-;;;;; Gpr skeletons (alphabetical)
-
-(define-skeleton gpr-skel-case
- "Insert case statement."
- ()
- "case " str " is\n"
- "when " _ "=>\n"
- "end case;")
-
-(define-skeleton gpr-skel-header
- "Insert a file header comment, prompt for copyright owner/license.
-Each user will probably want to override this."
- ()
- "-- Abstract :\n"
- "--\n"
- "-- " _ "\n"
- "--\n"
- "{copyright_license}\n"
- )
-
-(define-skeleton gpr-skel-package
- "Insert a package with name from `str'."
- "Package name: "
- "package " str " is\n"
- _
- "end " str ";")
-
-(define-skeleton gpr-skel-project
- "Insert a project with name from `str'."
- "Project name: "
- "project " str " is\n"
- _
- "end " str ";")
-
-;;;;; token alist, setup
-
-(defconst gpr-skel-token-alist
- '(("case" . gpr-skel-case)
- ("copyright_license"
- ("GPL" . gpr-skel-gpl)
- ("restricted" . gpr-skel-user-restricted))
- ("header" . gpr-skel-header)
- ("package" . gpr-skel-package)
- ("project" . gpr-skel-project))
-"For `wisi-skel-token-alist', used by `wisi-skel-expand'.")
-
-(defun gpr-skel-setup ()
- "Setup a buffer for gpr-skel."
- (setq wisi-skel-token-alist gpr-skel-token-alist)
- (add-hook 'skeleton-end-hook #'wisi-skel-enable-parse t)
- (add-hook 'skeleton-end-hook #'wisi-indent-statement t)
- (when (and gpr-skel-initial-string
- (= (buffer-size) 0))
- (insert gpr-skel-initial-string))
- )
-
-(add-hook 'gpr-mode-hook #'gpr-skel-setup)
-
-(provide 'gpr-skel)
-;;; end of file
diff --git a/gpr.wy b/gpr.wy
deleted file mode 100644
index 80b0532a04..0000000000
--- a/gpr.wy
+++ /dev/null
@@ -1,384 +0,0 @@
-;;; WisiToken grammar for GNAT project files
-;;
-;; Author: Stephen Leake <stephe-leake@stephe-leake.org>
-;; Maintainer: Stephen Leake <stephe-leake@stephe-leake.org>
-;; Created: Jan 2013
-;; Keywords: syntax
-
-%code copyright_license %{
-;; Copyright (C) 2013 - 2022 Free Software Foundation, Inc.
-
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 3, or (at
-;; your option) any later version.
-;;
-;; This software is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-}%
-
-%code actions spec post %{
- Partial_Parse_Active : aliased Boolean := False;
- Partial_Parse_Byte_Goal : aliased WisiToken.Buffer_Pos :=
WisiToken.Buffer_Pos'Last;
-}%
-
-;;; Commentary:
-;;
-;; This is a wisi grammar file for the gpr language. It is derived
-;; from the gprbuild user guide, with the following substitutions:
-;;
-;; simple_name -> IDENTIFIER
-;;
-;; and some simplifications. Repeating constructs are implemented with
-;; extra productions. Optional constructs are implemented by repeated
-;; productions
-
-;; GNAT GPL 2017 (info "(gprbuild_ug) Configuration File Reference")
-
-%token <punctuation> AMPERSAND "&"
-%token <punctuation> COLON ":"
-%token <punctuation> COLON_EQUALS ":="
-%token <punctuation> COMMA ","
-%token <punctuation> DOT "."
-%token <punctuation> EQUAL_GREATER "=>"
-%token <punctuation> QUOTE "'"
-%token <punctuation> SEMICOLON ";"
-%token <punctuation> VERTICAL_BAR "|"
-
-%case_insensitive
-
-%keyword ABSTRACT "abstract"
-%keyword AT "at"
-%keyword AGGREGATE "aggregate"
-%keyword CASE "case"
-%keyword CONFIGURATION "configuration"
-%keyword END "end"
-%keyword EXTENDS "extends"
-%keyword EXTERNAL "external"
-%keyword EXTERNAL_AS_LIST "external_as_list"
-%keyword FOR "for"
-%keyword IS "is"
-%keyword LEFT_PAREN "("
-%keyword LIBRARY "library"
-%keyword NULL "null"
-%keyword OTHERS "others"
-%keyword PACKAGE "package"
-%keyword PROJECT "project"
-%keyword RENAMES "renames"
-%keyword RIGHT_PAREN ")"
-%keyword STANDARD "standard"
-%keyword TYPE "type"
-%keyword USE "use"
-%keyword WHEN "when"
-%keyword WITH "with"
-
-%non_grammar <non-reporting> WHITESPACE %[ [ \t] ]%
-
-;; handle DOS or Unix newline
-%non_grammar <new-line> NEW_LINE %[ [\x0a]|[\x0d][\x0a] ]%
-
-%non_grammar <comment-new-line> COMMENT "--"
-
-;; gnatprep preprocessor lines
-%non_grammar <comment-new-line> GNAT_PREP %[ ("#if"|"#elsif"|"#else"|"#end") ]%
-
-;; skeleton placeholders.
-%non_grammar <comment-one-line> PLACEHOLDER "{" "}"
-
-%token <number> NUMERIC_LITERAL
- %[ [0-9]+ ]%
- "1234567890"
-
-%token <symbol> IDENTIFIER
- %[ [a-zA-Z\x80-\U0010FFFF][0-9a-zA-Z_\x80-\U0010FFFF]* ]%
- "A_Bogus_Identifier"
-
-%token <string-double-one-line> STRING_LITERAL
- %[ (["][\x20-\x21\x23-\U0010FFFF]*["])+ ]%
- '""'
-
-%start compilation_unit
-
-%generate LR1 Ada_Emacs re2c Process
-;; LR1 gives better error correction performance.
-
-%elisp_face font-lock-function-name-face
-%elisp_face font-lock-keyword-face
-%elisp_face nil
-
-%mckenzie_cost_default 4 4 2 2
-%mckenzie_enqueue_limit 10_000
-%mckenzie_check_limit 3
-%mckenzie_check_delta_limit 200
-
-%end_names_optional_option End_Names_Optional
-
-%conflict SHIFT term | REDUCE identifier_opt on token RIGHT_PAREN
-%conflict SHIFT case_item | REDUCE case_items on token WHEN
-
-;; grammar rules, non-terminal alphabetical order
-
-aggregate_g
- : LEFT_PAREN string_list RIGHT_PAREN
- %((wisi-indent-action [nil (wisi-anchored 1 1) (wisi-anchored 1 0)]))%
- ;
-
-attribute_declaration
- : FOR IDENTIFIER USE expression SEMICOLON
- %((progn
- (wisi-statement-action [1 statement-start 5 statement-end])
- (wisi-name-action 2)
- (wisi-face-apply-action [2 nil font-lock-function-name-face])
- (wisi-indent-action [nil gpr-indent-broken nil gpr-indent-broken
nil])))%
- | FOR IDENTIFIER LEFT_PAREN discrete_choice RIGHT_PAREN USE expression
SEMICOLON
- %((progn
- (wisi-statement-action [1 statement-start 8 statement-end])
- (wisi-name-action 2)
- (wisi-face-apply-action [2 nil font-lock-function-name-face])
- (wisi-indent-action [nil gpr-indent-broken (- gpr-indent-broken 1)
gpr-indent-broken (- gpr-indent-broken 1) nil
- gpr-indent-broken nil])))%
- | FOR IDENTIFIER LEFT_PAREN discrete_choice RIGHT_PAREN USE expression AT
NUMERIC_LITERAL SEMICOLON
- %((progn
- (wisi-statement-action [1 statement-start 10 statement-end])
- (wisi-name-action 2)
- (wisi-face-apply-action [2 nil font-lock-function-name-face])
- (wisi-indent-action [nil gpr-indent-broken (- gpr-indent-broken 1)
gpr-indent-broken (- gpr-indent-broken 1) nil
- gpr-indent-broken nil nil nil])))%
- | FOR EXTERNAL LEFT_PAREN STRING_LITERAL RIGHT_PAREN USE expression SEMICOLON
- %((progn
- (wisi-statement-action [1 statement-start 8 statement-end])
- (wisi-indent-action [nil gpr-indent-broken (- gpr-indent-broken 1)
gpr-indent-broken (- gpr-indent-broken 1) nil
- gpr-indent-broken nil])))%
- ;
-
-;; (info "(gprbuild_ug)Attributes")
-attribute_prefix
- : PROJECT
- ;; not a keyword; no face
- | name
- ;
-
-attribute_reference
- : attribute_prefix QUOTE IDENTIFIER
- | attribute_prefix QUOTE IDENTIFIER LEFT_PAREN STRING_LITERAL RIGHT_PAREN
- ;
-
-;; (info "(gprbuild_ug)Case Statements")
-case_statement
- : CASE name IS case_items END CASE SEMICOLON
- %((progn
- (wisi-statement-action [1 statement-start 7 statement-end])
- (wisi-indent-action [nil gpr-indent-broken nil [(wisi-block
gpr-indent-when) gpr-indent-when] nil nil nil])))%
- ;
-
-;; declarations allowed in a case statement are a subset of
-;; declarative_items, but this simplifies the grammar.
-case_item
- : WHEN discrete_choice_list EQUAL_GREATER declarative_items_opt
- %((progn
- (wisi-statement-action [1 motion])
- (wisi-indent-action [nil gpr-indent-broken gpr-indent (wisi-block
gpr-indent)])))%
- ;
-
-case_items
- : ;; empty
- | case_item
- | case_items case_item
- ;
-
-;; Compute indent for trailing comments.
-compilation_unit
- : context_clause_opt project_qualifier_opt project_declaration_opt
- %((wisi-indent-action [0 0 [0 0]]))%
- ;
-
-context_clause
- : with_clause
- | context_clause with_clause
- ;
-
-context_clause_opt
- : ;; empty
- | context_clause
- ;
-
-;; (info "(gprbuild_ug)Declarations")
-declarative_item
- : simple_declarative_item
- | typed_string_declaration
- | package_declaration
- ;
-
-declarative_items
- : declarative_item
- | declarative_items declarative_item
- ;
-
-declarative_items_opt
- : ;; empty
- | declarative_items
- ;
-
-discrete_choice
- : ;; empty
- | STRING_LITERAL
- | OTHERS
- ;
-
-discrete_choice_list
- : discrete_choice
- | discrete_choice_list VERTICAL_BAR discrete_choice
- ;
-
-;; (info "(gprbuild_ug)Expressions")
-expression
- : term
- | expression AMPERSAND term
- ;
-
-external_value
- : EXTERNAL aggregate_g
- | EXTERNAL_AS_LIST aggregate_g
- ;
-
-identifier_opt
- : ;; empty
- | IDENTIFIER
- %()%
- %((wisi-propagate-name 1))%
- ;
-
-name
- : identifier_opt
- | name DOT IDENTIFIER
- ;
-
-;; (info "(gprbuild_ug)Packages")
-package_declaration
- : package_spec
- | package_extension
- | package_renaming
- ;
-
-package_spec
- : PACKAGE identifier_opt IS declarative_items_opt END identifier_opt
SEMICOLON
- %((progn
- (wisi-statement-action [1 statement-start 7 statement-end])
- (wisi-name-action 2)
- (wisi-face-apply-action [2 nil font-lock-function-name-face 6 nil
font-lock-function-name-face])
- (wisi-indent-action [nil gpr-indent-broken nil [(wisi-block
gpr-indent) gpr-indent] nil nil nil])))%
- %((wisi-match-names 2 6))%
- ;
-
-package_extension
- : PACKAGE identifier_opt EXTENDS name IS declarative_items_opt END
identifier_opt SEMICOLON
- %((progn
- (wisi-statement-action [1 statement-start 9 statement-end])
- (wisi-name-action 2)
- (wisi-face-apply-action [2 nil font-lock-function-name-face 8 nil
font-lock-function-name-face])
- (wisi-indent-action [nil gpr-indent-broken nil gpr-indent-broken nil
[(wisi-block gpr-indent) gpr-indent] nil nil nil])))%
- %((wisi-match-names 2 8))%
- ;
-
-package_renaming
- : PACKAGE identifier_opt RENAMES name SEMICOLON
- %((progn
- (wisi-statement-action [1 statement-start 5 statement-end])
- (wisi-face-apply-action [2 nil font-lock-function-name-face 4 nil
font-lock-function-name-face])))%
- ;
-
-project_declaration_opt
- : ;; empty
- | simple_project_declaration
- | project_extension
- ;
-
-project_extension
- : PROJECT identifier_opt EXTENDS STRING_LITERAL IS declarative_items_opt END
identifier_opt SEMICOLON
- %((progn
- (wisi-statement-action [1 statement-start 9 statement-end])
- (wisi-name-action 2)
- (wisi-face-apply-action [1 nil font-lock-keyword-face 2 nil
font-lock-function-name-face 8 nil font-lock-function-name-face])
- (wisi-indent-action [nil gpr-indent-broken nil gpr-indent-broken nil
[(wisi-block gpr-indent) gpr-indent] nil nil nil])))%
- %((wisi-match-names 2 8))%
- ;
-
-;; (info "(gprbuild_ug)Qualified Projects")
-project_qualifier_opt
- : ;; empty
- | ABSTRACT
- | STANDARD
- | AGGREGATE
- | AGGREGATE LIBRARY
- | LIBRARY
- | CONFIGURATION
- ;
-
-;; (info "(gprbuild_ug)Declarations" "*info gpr*")
-simple_declarative_item
- : IDENTIFIER COLON_EQUALS expression SEMICOLON ;; variable_declaration
- %((progn
- (wisi-statement-action [1 statement-start 4 statement-end])
- (wisi-indent-action [nil gpr-indent-broken gpr-indent-broken nil])))%
- | IDENTIFIER COLON IDENTIFIER COLON_EQUALS expression SEMICOLON ;;
typed_variable_declaration
- %((progn
- (wisi-statement-action [1 statement-start 6 statement-end])
- (wisi-indent-action [nil gpr-indent-broken gpr-indent-broken
gpr-indent-broken gpr-indent-broken nil])))%
- | attribute_declaration
- | case_statement
- | NULL SEMICOLON
- %((wisi-statement-action [1 statement-start 2 statement-end]))%
- ;
-
-simple_project_declaration
- : PROJECT identifier_opt IS declarative_items_opt END identifier_opt
SEMICOLON
- %((progn
- (wisi-statement-action [1 statement-start 7 statement-end])
- (wisi-name-action 2)
- (wisi-face-apply-action [1 nil font-lock-keyword-face
- 2 nil font-lock-function-name-face
- 6 nil font-lock-function-name-face])
- (wisi-indent-action [nil gpr-indent-broken nil [(wisi-block
gpr-indent) gpr-indent] nil nil nil])))%
- %((wisi-match-names 2 6))%
- ;
-
-;; (info "(gprbuild_ug)Expressions")
-string_primary
- : STRING_LITERAL
- | name;; variable_name
- | external_value
- | attribute_reference
- ;
-
-;; (info "(gprbuild_ug)Expressions")
-;; we merge that string_list into term, and use 'string_list' for
'string_expression {, string_expression}'
-string_list
- : expression
- | string_list COMMA expression
- ;
-
-;; see string_list for info reference
-;; string_variable_name covered by string_primary
-term
- : string_primary
- | LEFT_PAREN RIGHT_PAREN
- | aggregate_g
- ;
-
-typed_string_declaration
- : TYPE IDENTIFIER IS aggregate_g SEMICOLON
- %((progn
- (wisi-statement-action [1 statement-start 5 statement-end])
- (wisi-indent-action [nil gpr-indent-broken gpr-indent-broken
gpr-indent-broken nil])))%
- ;
-
-with_clause
- : WITH string_list SEMICOLON
- ;
-
-;;; end of file
diff --git a/gpr_mode_wisi_parse.ads b/gpr_mode_wisi_parse.ads
deleted file mode 100644
index 1dd4afcd28..0000000000
--- a/gpr_mode_wisi_parse.ads
+++ /dev/null
@@ -1,37 +0,0 @@
--- Abstract :
---
--- External process parser for gpr mode
---
--- Copyright (C) 2017 - 2020, 2022 Free Software Foundation, Inc.
---
--- This program is free software; you can redistribute it and/or
--- modify it under terms of the GNU General Public License as
--- published by the Free Software Foundation; either version 3, or (at
--- your option) any later version. This program is distributed in the
--- hope that it will be useful, but WITHOUT ANY WARRANTY; without even
--- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
--- PURPOSE. See the GNU General Public License for more details. You
--- should have received a copy of the GNU General Public License
--- distributed with this program; see file COPYING. If not, write to
--- the Free Software Foundation, 51 Franklin Street, Suite 500, Boston,
--- MA 02110-1335, USA.
-
-pragma License (GPL);
-
-with Gen_Emacs_Wisi_LR_Parse;
-with Gpr_Process_Actions;
-with Gpr_Process_Main;
-with Wisi.Gpr;
-procedure Gpr_Mode_Wisi_Parse is new Gen_Emacs_Wisi_LR_Parse
- (Parse_Data_Type => Wisi.Gpr.Parse_Data_Type,
- Name => "gpr_mode_wisi_parse",
- Language_Protocol_Version => Wisi.Gpr.Language_Protocol_Version,
- Descriptor => Gpr_Process_Actions.Descriptor'Access,
- Partial_Parse_Active =>
Gpr_Process_Actions.Partial_Parse_Active'Access,
- Partial_Parse_Byte_Goal =>
Gpr_Process_Actions.Partial_Parse_Byte_Goal'Access,
- Language_Fixes => null,
- Language_Matching_Begin_Tokens => null,
- Language_String_ID_Set => null,
- Create_Lexer => Gpr_Process_Main.Create_Lexer,
- Create_Parse_Table => Gpr_Process_Main.Create_Parse_Table,
- Create_Productions => Gpr_Process_Main.Create_Productions);
diff --git a/gpr_process_actions.adb b/gpr_process_actions.adb
deleted file mode 100644
index fb13f94ed1..0000000000
--- a/gpr_process_actions.adb
+++ /dev/null
@@ -1,418 +0,0 @@
--- generated parser support file. -*- buffer-read-only:t -*-
--- command line: wisitoken-bnf-generate.exe --generate LR1 Ada_Emacs re2c
PROCESS gpr.wy
---
-
--- Copyright (C) 2013 - 2022 Free Software Foundation, Inc.
-
--- This program is free software; you can redistribute it and/or
--- modify it under the terms of the GNU General Public License as
--- published by the Free Software Foundation; either version 3, or (at
--- your option) any later version.
---
--- This software is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- General Public License for more details.
---
--- You should have received a copy of the GNU General Public License
--- along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-
-with Wisi; use Wisi;
-with Wisi.Gpr; use Wisi.Gpr;
-with WisiToken.In_Parse_Actions; use WisiToken.In_Parse_Actions;
-package body Gpr_Process_Actions is
-
- use WisiToken.Syntax_Trees.In_Parse_Actions;
-
- procedure aggregate_g_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access)
- is
- Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type
(User_Data);
- begin
- case Parse_Data.Post_Parse_Action is
- when Navigate =>
- null;
- when Face =>
- null;
- when Indent =>
- Indent_Action_0 (Parse_Data, Tree, Nonterm, ((False, (Simple, (Label
=> None))), (False, (Simple, (Anchored_0,
- 1, 1))), (False, (Simple, (Anchored_0, 1, 0)))));
- end case;
- end aggregate_g_0;
-
- procedure attribute_declaration_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access)
- is
- Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type
(User_Data);
- begin
- case Parse_Data.Post_Parse_Action is
- when Navigate =>
- Statement_Action (Parse_Data, Tree, Nonterm, ((1, Statement_Start),
(5, Statement_End)));
- Name_Action (Parse_Data, Tree, Nonterm, 2);
- when Face =>
- Face_Apply_Action (Parse_Data, Tree, Nonterm, (1 => (2, 2, 0)));
- when Indent =>
- Indent_Action_0 (Parse_Data, Tree, Nonterm, ((False, (Simple, (Label
=> None))), (False, (Simple, (Int,
- Gpr_Indent_Broken))), (False, (Simple, (Label => None))), (False,
(Simple, (Int, Gpr_Indent_Broken))), (False,
- (Simple, (Label => None)))));
- end case;
- end attribute_declaration_0;
-
- procedure attribute_declaration_1
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access)
- is
- Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type
(User_Data);
- begin
- case Parse_Data.Post_Parse_Action is
- when Navigate =>
- Statement_Action (Parse_Data, Tree, Nonterm, ((1, Statement_Start),
(8, Statement_End)));
- Name_Action (Parse_Data, Tree, Nonterm, 2);
- when Face =>
- Face_Apply_Action (Parse_Data, Tree, Nonterm, (1 => (2, 2, 0)));
- when Indent =>
- Indent_Action_0 (Parse_Data, Tree, Nonterm, ((False, (Simple, (Label
=> None))), (False, (Simple, (Int,
- Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken -
1))), (False, (Simple, (Int,
- Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken -
1))), (False, (Simple, (Label => None))),
- (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Label
=> None)))));
- end case;
- end attribute_declaration_1;
-
- procedure attribute_declaration_2
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access)
- is
- Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type
(User_Data);
- begin
- case Parse_Data.Post_Parse_Action is
- when Navigate =>
- Statement_Action (Parse_Data, Tree, Nonterm, ((1, Statement_Start),
(10, Statement_End)));
- Name_Action (Parse_Data, Tree, Nonterm, 2);
- when Face =>
- Face_Apply_Action (Parse_Data, Tree, Nonterm, (1 => (2, 2, 0)));
- when Indent =>
- Indent_Action_0 (Parse_Data, Tree, Nonterm, ((False, (Simple, (Label
=> None))), (False, (Simple, (Int,
- Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken -
1))), (False, (Simple, (Int,
- Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken -
1))), (False, (Simple, (Label => None))),
- (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Label
=> None))), (False, (Simple, (Label =>
- None))), (False, (Simple, (Label => None)))));
- end case;
- end attribute_declaration_2;
-
- procedure attribute_declaration_3
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access)
- is
- Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type
(User_Data);
- begin
- case Parse_Data.Post_Parse_Action is
- when Navigate =>
- Statement_Action (Parse_Data, Tree, Nonterm, ((1, Statement_Start),
(8, Statement_End)));
- when Face =>
- null;
- when Indent =>
- Indent_Action_0 (Parse_Data, Tree, Nonterm, ((False, (Simple, (Label
=> None))), (False, (Simple, (Int,
- Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken -
1))), (False, (Simple, (Int,
- Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken -
1))), (False, (Simple, (Label => None))),
- (False, (Simple, (Int, Gpr_Indent_Broken))), (False, (Simple, (Label
=> None)))));
- end case;
- end attribute_declaration_3;
-
- procedure case_statement_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access)
- is
- Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type
(User_Data);
- begin
- case Parse_Data.Post_Parse_Action is
- when Navigate =>
- Statement_Action (Parse_Data, Tree, Nonterm, ((1, Statement_Start),
(7, Statement_End)));
- when Face =>
- null;
- when Indent =>
- Indent_Action_0 (Parse_Data, Tree, Nonterm, ((False, (Simple, (Label
=> None))), (False, (Simple, (Int,
- Gpr_Indent_Broken))), (False, (Simple, (Label => None))), (True,
(Simple, (Block, Gpr_Indent_When)), (Simple,
- (Int, Gpr_Indent_When))), (False, (Simple, (Label => None))), (False,
(Simple, (Label => None))), (False,
- (Simple, (Label => None)))));
- end case;
- end case_statement_0;
-
- procedure case_item_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access)
- is
- Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type
(User_Data);
- begin
- case Parse_Data.Post_Parse_Action is
- when Navigate =>
- Statement_Action (Parse_Data, Tree, Nonterm, (1 => (1, Motion)));
- when Face =>
- null;
- when Indent =>
- Indent_Action_0 (Parse_Data, Tree, Nonterm, ((False, (Simple, (Label
=> None))), (False, (Simple, (Int,
- Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent))), (False,
(Simple, (Block, Gpr_Indent)))));
- end case;
- end case_item_0;
-
- procedure compilation_unit_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access)
- is
- Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type
(User_Data);
- begin
- case Parse_Data.Post_Parse_Action is
- when Navigate =>
- null;
- when Face =>
- null;
- when Indent =>
- Indent_Action_0 (Parse_Data, Tree, Nonterm, ((False, (Simple, (Int,
0))), (False, (Simple, (Int, 0))), (True,
- (Simple, (Int, 0)), (Simple, (Int, 0)))));
- end case;
- end compilation_unit_0;
-
- function identifier_opt_1_check
- (Tree : in WisiToken.Syntax_Trees.Tree;
- Nonterm : in out WisiToken.Syntax_Trees.Recover_Token;
- Tokens : in WisiToken.Syntax_Trees.Recover_Token_Array;
- Recover_Active : in Boolean)
- return WisiToken.Syntax_Trees.In_Parse_Actions.Status
- is
- pragma Unreferenced (Recover_Active);
- begin
- return Propagate_Name (Tree, Nonterm, Tokens, 1);
- end identifier_opt_1_check;
-
- procedure package_spec_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access)
- is
- Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type
(User_Data);
- begin
- case Parse_Data.Post_Parse_Action is
- when Navigate =>
- Statement_Action (Parse_Data, Tree, Nonterm, ((1, Statement_Start),
(7, Statement_End)));
- Name_Action (Parse_Data, Tree, Nonterm, 2);
- when Face =>
- Face_Apply_Action (Parse_Data, Tree, Nonterm, ((2, 2, 0), (6, 2, 0)));
- when Indent =>
- Indent_Action_0 (Parse_Data, Tree, Nonterm, ((False, (Simple, (Label
=> None))), (False, (Simple, (Int,
- Gpr_Indent_Broken))), (False, (Simple, (Label => None))), (True,
(Simple, (Block, Gpr_Indent)), (Simple, (Int,
- Gpr_Indent))), (False, (Simple, (Label => None))), (False, (Simple,
(Label => None))), (False, (Simple, (Label
- => None)))));
- end case;
- end package_spec_0;
-
- function package_spec_0_check
- (Tree : in WisiToken.Syntax_Trees.Tree;
- Nonterm : in out WisiToken.Syntax_Trees.Recover_Token;
- Tokens : in WisiToken.Syntax_Trees.Recover_Token_Array;
- Recover_Active : in Boolean)
- return WisiToken.Syntax_Trees.In_Parse_Actions.Status
- is
- pragma Unreferenced (Nonterm, Recover_Active);
- begin
- return Match_Names (Tree, Tokens, 2, 6, End_Names_Optional);
- end package_spec_0_check;
-
- procedure package_extension_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access)
- is
- Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type
(User_Data);
- begin
- case Parse_Data.Post_Parse_Action is
- when Navigate =>
- Statement_Action (Parse_Data, Tree, Nonterm, ((1, Statement_Start),
(9, Statement_End)));
- Name_Action (Parse_Data, Tree, Nonterm, 2);
- when Face =>
- Face_Apply_Action (Parse_Data, Tree, Nonterm, ((2, 2, 0), (8, 2, 0)));
- when Indent =>
- Indent_Action_0 (Parse_Data, Tree, Nonterm, ((False, (Simple, (Label
=> None))), (False, (Simple, (Int,
- Gpr_Indent_Broken))), (False, (Simple, (Label => None))), (False,
(Simple, (Int, Gpr_Indent_Broken))), (False,
- (Simple, (Label => None))), (True, (Simple, (Block, Gpr_Indent)),
(Simple, (Int, Gpr_Indent))), (False,
- (Simple, (Label => None))), (False, (Simple, (Label => None))),
(False, (Simple, (Label => None)))));
- end case;
- end package_extension_0;
-
- function package_extension_0_check
- (Tree : in WisiToken.Syntax_Trees.Tree;
- Nonterm : in out WisiToken.Syntax_Trees.Recover_Token;
- Tokens : in WisiToken.Syntax_Trees.Recover_Token_Array;
- Recover_Active : in Boolean)
- return WisiToken.Syntax_Trees.In_Parse_Actions.Status
- is
- pragma Unreferenced (Nonterm, Recover_Active);
- begin
- return Match_Names (Tree, Tokens, 2, 8, End_Names_Optional);
- end package_extension_0_check;
-
- procedure package_renaming_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access)
- is
- Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type
(User_Data);
- begin
- case Parse_Data.Post_Parse_Action is
- when Navigate =>
- Statement_Action (Parse_Data, Tree, Nonterm, ((1, Statement_Start),
(5, Statement_End)));
- when Face =>
- Face_Apply_Action (Parse_Data, Tree, Nonterm, ((2, 2, 0), (4, 2, 0)));
- when Indent =>
- null;
- end case;
- end package_renaming_0;
-
- procedure project_extension_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access)
- is
- Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type
(User_Data);
- begin
- case Parse_Data.Post_Parse_Action is
- when Navigate =>
- Statement_Action (Parse_Data, Tree, Nonterm, ((1, Statement_Start),
(9, Statement_End)));
- Name_Action (Parse_Data, Tree, Nonterm, 2);
- when Face =>
- Face_Apply_Action (Parse_Data, Tree, Nonterm, ((1, 2, 1), (2, 2, 0),
(8, 2, 0)));
- when Indent =>
- Indent_Action_0 (Parse_Data, Tree, Nonterm, ((False, (Simple, (Label
=> None))), (False, (Simple, (Int,
- Gpr_Indent_Broken))), (False, (Simple, (Label => None))), (False,
(Simple, (Int, Gpr_Indent_Broken))), (False,
- (Simple, (Label => None))), (True, (Simple, (Block, Gpr_Indent)),
(Simple, (Int, Gpr_Indent))), (False,
- (Simple, (Label => None))), (False, (Simple, (Label => None))),
(False, (Simple, (Label => None)))));
- end case;
- end project_extension_0;
-
- function project_extension_0_check
- (Tree : in WisiToken.Syntax_Trees.Tree;
- Nonterm : in out WisiToken.Syntax_Trees.Recover_Token;
- Tokens : in WisiToken.Syntax_Trees.Recover_Token_Array;
- Recover_Active : in Boolean)
- return WisiToken.Syntax_Trees.In_Parse_Actions.Status
- is
- pragma Unreferenced (Nonterm, Recover_Active);
- begin
- return Match_Names (Tree, Tokens, 2, 8, End_Names_Optional);
- end project_extension_0_check;
-
- procedure simple_declarative_item_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access)
- is
- Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type
(User_Data);
- begin
- case Parse_Data.Post_Parse_Action is
- when Navigate =>
- Statement_Action (Parse_Data, Tree, Nonterm, ((1, Statement_Start),
(4, Statement_End)));
- when Face =>
- null;
- when Indent =>
- Indent_Action_0 (Parse_Data, Tree, Nonterm, ((False, (Simple, (Label
=> None))), (False, (Simple, (Int,
- Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken))),
(False, (Simple, (Label => None)))));
- end case;
- end simple_declarative_item_0;
-
- procedure simple_declarative_item_1
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access)
- is
- Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type
(User_Data);
- begin
- case Parse_Data.Post_Parse_Action is
- when Navigate =>
- Statement_Action (Parse_Data, Tree, Nonterm, ((1, Statement_Start),
(6, Statement_End)));
- when Face =>
- null;
- when Indent =>
- Indent_Action_0 (Parse_Data, Tree, Nonterm, ((False, (Simple, (Label
=> None))), (False, (Simple, (Int,
- Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken))),
(False, (Simple, (Int,
- Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken))),
(False, (Simple, (Label => None)))));
- end case;
- end simple_declarative_item_1;
-
- procedure simple_declarative_item_4
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access)
- is
- Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type
(User_Data);
- begin
- case Parse_Data.Post_Parse_Action is
- when Navigate =>
- Statement_Action (Parse_Data, Tree, Nonterm, ((1, Statement_Start),
(2, Statement_End)));
- when Face =>
- null;
- when Indent =>
- null;
- end case;
- end simple_declarative_item_4;
-
- procedure simple_project_declaration_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access)
- is
- Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type
(User_Data);
- begin
- case Parse_Data.Post_Parse_Action is
- when Navigate =>
- Statement_Action (Parse_Data, Tree, Nonterm, ((1, Statement_Start),
(7, Statement_End)));
- Name_Action (Parse_Data, Tree, Nonterm, 2);
- when Face =>
- Face_Apply_Action (Parse_Data, Tree, Nonterm, ((1, 2, 1), (2, 2, 0),
(6, 2, 0)));
- when Indent =>
- Indent_Action_0 (Parse_Data, Tree, Nonterm, ((False, (Simple, (Label
=> None))), (False, (Simple, (Int,
- Gpr_Indent_Broken))), (False, (Simple, (Label => None))), (True,
(Simple, (Block, Gpr_Indent)), (Simple, (Int,
- Gpr_Indent))), (False, (Simple, (Label => None))), (False, (Simple,
(Label => None))), (False, (Simple, (Label
- => None)))));
- end case;
- end simple_project_declaration_0;
-
- function simple_project_declaration_0_check
- (Tree : in WisiToken.Syntax_Trees.Tree;
- Nonterm : in out WisiToken.Syntax_Trees.Recover_Token;
- Tokens : in WisiToken.Syntax_Trees.Recover_Token_Array;
- Recover_Active : in Boolean)
- return WisiToken.Syntax_Trees.In_Parse_Actions.Status
- is
- pragma Unreferenced (Nonterm, Recover_Active);
- begin
- return Match_Names (Tree, Tokens, 2, 6, End_Names_Optional);
- end simple_project_declaration_0_check;
-
- procedure typed_string_declaration_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access)
- is
- Parse_Data : Wisi.Parse_Data_Type renames Wisi.Parse_Data_Type
(User_Data);
- begin
- case Parse_Data.Post_Parse_Action is
- when Navigate =>
- Statement_Action (Parse_Data, Tree, Nonterm, ((1, Statement_Start),
(5, Statement_End)));
- when Face =>
- null;
- when Indent =>
- Indent_Action_0 (Parse_Data, Tree, Nonterm, ((False, (Simple, (Label
=> None))), (False, (Simple, (Int,
- Gpr_Indent_Broken))), (False, (Simple, (Int, Gpr_Indent_Broken))),
(False, (Simple, (Int,
- Gpr_Indent_Broken))), (False, (Simple, (Label => None)))));
- end case;
- end typed_string_declaration_0;
-
-end Gpr_Process_Actions;
diff --git a/gpr_process_actions.ads b/gpr_process_actions.ads
deleted file mode 100644
index d3d2c5bc46..0000000000
--- a/gpr_process_actions.ads
+++ /dev/null
@@ -1,305 +0,0 @@
--- generated parser support file. -*- buffer-read-only:t -*-
--- command line: wisitoken-bnf-generate.exe --generate LR1 Ada_Emacs re2c
PROCESS gpr.wy
---
-
--- Copyright (C) 2013 - 2022 Free Software Foundation, Inc.
-
--- This program is free software; you can redistribute it and/or
--- modify it under the terms of the GNU General Public License as
--- published by the Free Software Foundation; either version 3, or (at
--- your option) any later version.
---
--- This software is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- General Public License for more details.
---
--- You should have received a copy of the GNU General Public License
--- along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-
-with WisiToken.Syntax_Trees;
-package Gpr_Process_Actions is
-
- Descriptor : aliased constant WisiToken.Descriptor :=
- (First_Terminal => 5,
- Last_Terminal => 41,
- First_Nonterminal => 42,
- Last_Nonterminal => 75,
- SOI_ID => 76,
- EOI_ID => 41,
- Accept_ID => 42,
- Case_Insensitive => True,
- New_Line_ID => 1,
- String_1_ID => 32767,
- String_2_ID => 40,
- Image =>
- (new String'("WHITESPACE"),
- new String'("NEW_LINE"),
- new String'("COMMENT"),
- new String'("GNAT_PREP"),
- new String'("PLACEHOLDER"),
- new String'("ABSTRACT"),
- new String'("AT"),
- new String'("AGGREGATE"),
- new String'("CASE"),
- new String'("CONFIGURATION"),
- new String'("END"),
- new String'("EXTENDS"),
- new String'("EXTERNAL"),
- new String'("EXTERNAL_AS_LIST"),
- new String'("FOR"),
- new String'("IS"),
- new String'("LEFT_PAREN"),
- new String'("LIBRARY"),
- new String'("NULL"),
- new String'("OTHERS"),
- new String'("PACKAGE"),
- new String'("PROJECT"),
- new String'("RENAMES"),
- new String'("RIGHT_PAREN"),
- new String'("STANDARD"),
- new String'("TYPE"),
- new String'("USE"),
- new String'("WHEN"),
- new String'("WITH"),
- new String'("AMPERSAND"),
- new String'("COLON"),
- new String'("COLON_EQUALS"),
- new String'("COMMA"),
- new String'("DOT"),
- new String'("EQUAL_GREATER"),
- new String'("QUOTE"),
- new String'("SEMICOLON"),
- new String'("VERTICAL_BAR"),
- new String'("NUMERIC_LITERAL"),
- new String'("IDENTIFIER"),
- new String'("STRING_LITERAL"),
- new String'("Wisi_EOI"),
- new String'("wisitoken_accept"),
- new String'("aggregate_g"),
- new String'("attribute_declaration"),
- new String'("attribute_prefix"),
- new String'("attribute_reference"),
- new String'("case_statement"),
- new String'("case_item"),
- new String'("case_items"),
- new String'("compilation_unit"),
- new String'("context_clause"),
- new String'("context_clause_opt"),
- new String'("declarative_item"),
- new String'("declarative_items"),
- new String'("declarative_items_opt"),
- new String'("discrete_choice"),
- new String'("discrete_choice_list"),
- new String'("expression"),
- new String'("external_value"),
- new String'("identifier_opt"),
- new String'("name"),
- new String'("package_declaration"),
- new String'("package_spec"),
- new String'("package_extension"),
- new String'("package_renaming"),
- new String'("project_declaration_opt"),
- new String'("project_extension"),
- new String'("project_qualifier_opt"),
- new String'("simple_declarative_item"),
- new String'("simple_project_declaration"),
- new String'("string_primary"),
- new String'("string_list"),
- new String'("term"),
- new String'("typed_string_declaration"),
- new String'("with_clause"),
- new String'("Wisi_SOI")),
- Terminal_Image_Width => 16,
- Image_Width => 26,
- Last_Lookahead => 41);
-
- type Token_Enum_ID is
- (WHITESPACE_ID,
- NEW_LINE_ID,
- COMMENT_ID,
- GNAT_PREP_ID,
- PLACEHOLDER_ID,
- ABSTRACT_ID,
- AT_ID,
- AGGREGATE_ID,
- CASE_ID,
- CONFIGURATION_ID,
- END_ID,
- EXTENDS_ID,
- EXTERNAL_ID,
- EXTERNAL_AS_LIST_ID,
- FOR_ID,
- IS_ID,
- LEFT_PAREN_ID,
- LIBRARY_ID,
- NULL_ID,
- OTHERS_ID,
- PACKAGE_ID,
- PROJECT_ID,
- RENAMES_ID,
- RIGHT_PAREN_ID,
- STANDARD_ID,
- TYPE_ID,
- USE_ID,
- WHEN_ID,
- WITH_ID,
- AMPERSAND_ID,
- COLON_ID,
- COLON_EQUALS_ID,
- COMMA_ID,
- DOT_ID,
- EQUAL_GREATER_ID,
- QUOTE_ID,
- SEMICOLON_ID,
- VERTICAL_BAR_ID,
- NUMERIC_LITERAL_ID,
- IDENTIFIER_ID,
- STRING_LITERAL_ID,
- Wisi_EOI_ID,
- wisitoken_accept_ID,
- aggregate_g_ID,
- attribute_declaration_ID,
- attribute_prefix_ID,
- attribute_reference_ID,
- case_statement_ID,
- case_item_ID,
- case_items_ID,
- compilation_unit_ID,
- context_clause_ID,
- context_clause_opt_ID,
- declarative_item_ID,
- declarative_items_ID,
- declarative_items_opt_ID,
- discrete_choice_ID,
- discrete_choice_list_ID,
- expression_ID,
- external_value_ID,
- identifier_opt_ID,
- name_ID,
- package_declaration_ID,
- package_spec_ID,
- package_extension_ID,
- package_renaming_ID,
- project_declaration_opt_ID,
- project_extension_ID,
- project_qualifier_opt_ID,
- simple_declarative_item_ID,
- simple_project_declaration_ID,
- string_primary_ID,
- string_list_ID,
- term_ID,
- typed_string_declaration_ID,
- with_clause_ID,
- Wisi_SOI_ID);
-
- type Token_Enum_ID_Array is array (Positive range <>) of Token_Enum_ID;
- use all type WisiToken.Token_ID;
- function "+" (Item : in Token_Enum_ID) return WisiToken.Token_ID
- is (WisiToken.Token_ID'First + Token_Enum_ID'Pos (Item));
- function To_Token_Enum (Item : in WisiToken.Token_ID) return Token_Enum_ID
- is (Token_Enum_ID'Val (Item - WisiToken.Token_ID'First));
- function "-" (Item : in WisiToken.Token_ID) return Token_Enum_ID renames
To_Token_Enum;
-
- procedure aggregate_g_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access);
- procedure attribute_declaration_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access);
- procedure attribute_declaration_1
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access);
- procedure attribute_declaration_2
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access);
- procedure attribute_declaration_3
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access);
- procedure case_statement_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access);
- procedure case_item_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access);
- procedure compilation_unit_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access);
- procedure package_spec_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access);
- procedure package_extension_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access);
- procedure package_renaming_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access);
- procedure project_extension_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access);
- procedure simple_declarative_item_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access);
- procedure simple_declarative_item_1
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access);
- procedure simple_declarative_item_4
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access);
- procedure simple_project_declaration_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access);
- procedure typed_string_declaration_0
- (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;
- Tree : in out WisiToken.Syntax_Trees.Tree;
- Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Access);
- function identifier_opt_1_check
- (Tree : in WisiToken.Syntax_Trees.Tree;
- Nonterm : in out WisiToken.Syntax_Trees.Recover_Token;
- Tokens : in WisiToken.Syntax_Trees.Recover_Token_Array;
- Recover_Active : in Boolean)
- return WisiToken.Syntax_Trees.In_Parse_Actions.Status;
- function package_spec_0_check
- (Tree : in WisiToken.Syntax_Trees.Tree;
- Nonterm : in out WisiToken.Syntax_Trees.Recover_Token;
- Tokens : in WisiToken.Syntax_Trees.Recover_Token_Array;
- Recover_Active : in Boolean)
- return WisiToken.Syntax_Trees.In_Parse_Actions.Status;
- function package_extension_0_check
- (Tree : in WisiToken.Syntax_Trees.Tree;
- Nonterm : in out WisiToken.Syntax_Trees.Recover_Token;
- Tokens : in WisiToken.Syntax_Trees.Recover_Token_Array;
- Recover_Active : in Boolean)
- return WisiToken.Syntax_Trees.In_Parse_Actions.Status;
- function project_extension_0_check
- (Tree : in WisiToken.Syntax_Trees.Tree;
- Nonterm : in out WisiToken.Syntax_Trees.Recover_Token;
- Tokens : in WisiToken.Syntax_Trees.Recover_Token_Array;
- Recover_Active : in Boolean)
- return WisiToken.Syntax_Trees.In_Parse_Actions.Status;
- function simple_project_declaration_0_check
- (Tree : in WisiToken.Syntax_Trees.Tree;
- Nonterm : in out WisiToken.Syntax_Trees.Recover_Token;
- Tokens : in WisiToken.Syntax_Trees.Recover_Token_Array;
- Recover_Active : in Boolean)
- return WisiToken.Syntax_Trees.In_Parse_Actions.Status;
-
- Partial_Parse_Active : aliased Boolean := False;
- Partial_Parse_Byte_Goal : aliased WisiToken.Buffer_Pos :=
WisiToken.Buffer_Pos'Last;
-end Gpr_Process_Actions;
diff --git a/gpr_process_main.adb b/gpr_process_main.adb
deleted file mode 100644
index ff4fe95db1..0000000000
--- a/gpr_process_main.adb
+++ /dev/null
@@ -1,2625 +0,0 @@
--- generated parser support file. -*- buffer-read-only:t -*-
--- command line: wisitoken-bnf-generate.exe --generate LR1 Ada_Emacs re2c
PROCESS gpr.wy
---
-
--- Copyright (C) 2013 - 2022 Free Software Foundation, Inc.
-
--- This program is free software; you can redistribute it and/or
--- modify it under the terms of the GNU General Public License as
--- published by the Free Software Foundation; either version 3, or (at
--- your option) any later version.
---
--- This software is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- General Public License for more details.
---
--- You should have received a copy of the GNU General Public License
--- along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-
-with Gpr_Process_Actions; use Gpr_Process_Actions;
-with SAL;
-with WisiToken.Lexer.re2c;
-with gpr_re2c_c;
-package body Gpr_Process_Main is
-
- function Is_Block_Delimited (ID : in WisiToken.Token_ID) return Boolean
- is begin
- case To_Token_Enum (ID) is
- when
- COMMENT_ID |
- GNAT_PREP_ID |
- PLACEHOLDER_ID |
- STRING_LITERAL_ID => return True;
- when others => return False;
- end case;
- end Is_Block_Delimited;
-
- function Same_Block_Delimiters (ID : in WisiToken.Token_ID) return Boolean
- is begin
- case To_Token_Enum (ID) is
- when COMMENT_ID => return False;
- when GNAT_PREP_ID => return False;
- when PLACEHOLDER_ID => return False;
- when STRING_LITERAL_ID => return True;
- when others => return False;
- end case;
- end Same_Block_Delimiters;
-
- function Escape_Delimiter_Doubled (ID : in WisiToken.Token_ID) return
Boolean
- is begin
- case To_Token_Enum (ID) is
- when others => return False;
- end case;
- end Escape_Delimiter_Doubled;
-
- function Start_Delimiter_Length (ID : in WisiToken.Token_ID) return Integer
- is begin
- case To_Token_Enum (ID) is
- when COMMENT_ID => return 2;
- when GNAT_PREP_ID => return 33;
- when PLACEHOLDER_ID => return 1;
- when STRING_LITERAL_ID => return 1;
- when others => raise SAL.Programmer_Error; return 0;
- end case;
- end Start_Delimiter_Length;
-
- function End_Delimiter_Length (ID : in WisiToken.Token_ID) return Integer
- is begin
- case To_Token_Enum (ID) is
- when
- COMMENT_ID |
- GNAT_PREP_ID |
- STRING_LITERAL_ID => return 1;
- when PLACEHOLDER_ID => return 1;
- when others => raise SAL.Programmer_Error; return 0;
- end case;
- end End_Delimiter_Length;
-
- function New_Line_Is_End_Delimiter (ID : in WisiToken.Token_ID) return
Boolean
- is begin
- return
- (case To_Token_Enum (ID) is
- when COMMENT_ID => True,
- when GNAT_PREP_ID => True,
- when PLACEHOLDER_ID => True,
- when STRING_LITERAL_ID => True,
- when others => raise SAL.Programmer_Error);
- end New_Line_Is_End_Delimiter;
-
- function Find_End_Delimiter
- (Source : in WisiToken.Lexer.Source;
- ID : in WisiToken.Token_ID;
- Token_Start : in WisiToken.Buffer_Pos)
- return WisiToken.Buffer_Pos
- is begin
- return
- (case To_Token_Enum (ID) is
- when COMMENT_ID => WisiToken.Lexer.Find_New_Line (Source,
Token_Start),
- when GNAT_PREP_ID => WisiToken.Lexer.Find_New_Line (Source,
Token_Start),
- when PLACEHOLDER_ID => WisiToken.Lexer.Find_String (Source,
Token_Start, "}"),
- when STRING_LITERAL_ID => WisiToken.Lexer.Find_String_Or_New_Line
(Source, Token_Start, """"),
- when others => raise SAL.Programmer_Error);
- end Find_End_Delimiter;
-
- function Find_Scan_End
- (Source : in WisiToken.Lexer.Source;
- ID : in WisiToken.Token_ID;
- Region : in WisiToken.Buffer_Region;
- Inserted : in Boolean;
- Start : in Boolean)
- return WisiToken.Buffer_Pos
- is
- use WisiToken;
- begin
- return
- (case To_Token_Enum (ID) is
- when COMMENT_ID =>
- (if Inserted then Region.Last
- elsif Start then Region.Last
- else Lexer.Find_New_Line (Source, Region.Last)),
- when GNAT_PREP_ID =>
- (if Inserted then Region.Last
- elsif Start then Region.Last
- else Lexer.Find_New_Line (Source, Region.Last)),
- when PLACEHOLDER_ID =>
- (if Inserted then Region.Last
- elsif Start then Region.Last
- else Lexer.Find_String_Or_New_Line (Source, Region.Last, "{")),
- when STRING_LITERAL_ID => Lexer.Find_New_Line (Source, Region.Last),
- when others => raise SAL.Programmer_Error);
- end Find_Scan_End;
-
- function Contains_End_Delimiter
- (Source : in WisiToken.Lexer.Source;
- ID : in WisiToken.Token_ID;
- Region : in WisiToken.Buffer_Region)
- return WisiToken.Base_Buffer_Pos
- is
- use WisiToken;
- begin
- return
- (case To_Token_Enum (ID) is
- when COMMENT_ID => Lexer.Find_New_Line (Source, Region),
- when GNAT_PREP_ID => Lexer.Find_New_Line (Source, Region),
- when PLACEHOLDER_ID => Lexer.Find_String_Or_New_Line (Source, Region,
"}"),
- when STRING_LITERAL_ID => Lexer.Find_String_Or_New_Line (Source,
Region, """"),
- when others => raise SAL.Programmer_Error);
- end Contains_End_Delimiter;
-
- function Line_Begin_Char_Pos
- (Source : in WisiToken.Lexer.Source;
- Token : in WisiToken.Lexer.Token;
- Line : in WisiToken.Line_Number_Type)
- return WisiToken.Buffer_Pos
- is
- pragma Unreferenced (Source, Line);
- use all type WisiToken.Base_Buffer_Pos;
- begin
- case To_Token_Enum (Token.ID) is
- when NEW_LINE_ID => return Token.Char_Region.Last + 1;
- when COMMENT_ID => return Token.Char_Region.Last + 1;
- when GNAT_PREP_ID => return Token.Char_Region.Last + 1;
- when others => raise SAL.Programmer_Error;
- end case;
- end Line_Begin_Char_Pos;
-
- function Can_Contain_New_Line (ID : in WisiToken.Token_ID) return Boolean
- is begin
- case To_Token_Enum (ID) is
- when NEW_LINE_ID => return True;
- when COMMENT_ID => return True;
- when GNAT_PREP_ID => return True;
- when others => return False;
- end case;
- end Can_Contain_New_Line;
-
- function Terminated_By_New_Line (ID : in WisiToken.Token_ID) return Boolean
- is begin
- case To_Token_Enum (ID) is
- when NEW_LINE_ID => return True;
- when COMMENT_ID => return True;
- when GNAT_PREP_ID => return True;
- when STRING_LITERAL_ID => return True;
- when others => return False;
- end case;
- end Terminated_By_New_Line;
-
- package Lexer is new WisiToken.Lexer.re2c
- (gpr_re2c_c.New_Lexer,
- gpr_re2c_c.Free_Lexer,
- gpr_re2c_c.Reset_Lexer,
- gpr_re2c_c.Set_Verbosity,
- gpr_re2c_c.Set_Position,
- gpr_re2c_c.Next_Token,
- Is_Block_Delimited,
- Same_Block_Delimiters,
- Escape_Delimiter_Doubled,
- Start_Delimiter_Length,
- End_Delimiter_Length,
- New_Line_Is_End_Delimiter,
- Find_End_Delimiter,
- Contains_End_Delimiter,
- Find_Scan_End,
- Line_Begin_Char_Pos,
- Can_Contain_New_Line,
- Terminated_By_New_Line);
-
- function Create_Parse_Table
- return WisiToken.Parse.LR.Parse_Table_Ptr
- is
- use WisiToken.Parse.LR;
- McKenzie_Param : constant McKenzie_Param_Type :=
- (First_Terminal => 5,
- Last_Terminal => 41,
- First_Nonterminal => 42,
- Last_Nonterminal => 75,
- Insert =>
- (4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4),
- Delete =>
- (4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4),
- Push_Back =>
- (2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2),
- Undo_Reduce =>
- (2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2),
- Minimal_Complete_Cost_Delta => -1,
- Fast_Forward => 0,
- Matching_Begin => 0,
- Ignore_Check_Fail => 2,
- Check_Limit => 3,
- Zombie_Limit => 4,
- Check_Delta_Limit => 200,
- Enqueue_Limit => 10000);
-
- Table : constant Parse_Table_Ptr := new Parse_Table
- (State_First => 0,
- State_Last => 322,
- First_Terminal => 5,
- Last_Terminal => 41,
- First_Nonterminal => 42,
- Last_Nonterminal => 75);
- begin
- declare
- procedure Subr_1
- is begin
- Table.States (0).Action_List.Set_Capacity (8);
- Add_Action (Table.States (0), 5, Reduce, (52, 0), 0);
- Add_Action (Table.States (0), 7, Reduce, (52, 0), 0);
- Add_Action (Table.States (0), 9, Reduce, (52, 0), 0);
- Add_Action (Table.States (0), 17, Reduce, (52, 0), 0);
- Add_Action (Table.States (0), 21, Reduce, (52, 0), 0);
- Add_Action (Table.States (0), 24, Reduce, (52, 0), 0);
- Add_Action (Table.States (0), 28, (75, 0), 1);
- Add_Action (Table.States (0), 41, Reduce, (52, 0), 0);
- Table.States (0).Goto_List.Set_Capacity (4);
- Add_Goto (Table.States (0), 50, 2);
- Add_Goto (Table.States (0), 51, 3);
- Add_Goto (Table.States (0), 52, 4);
- Add_Goto (Table.States (0), 75, 5);
- Table.States (1).Action_List.Set_Capacity (11);
- Add_Action (Table.States (1), 12, (59, 0), 6);
- Add_Action (Table.States (1), 13, (59, 1), 7);
- Add_Action (Table.States (1), 16, (43, 0), 8);
- Add_Action (Table.States (1), 21, (45, 0), 9);
- Add_Action (Table.States (1), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (1), 32, Reduce, (60, 0), 0);
- Add_Action (Table.States (1), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (1), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (1), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (1), 39, (60, 1), 10);
- Add_Action (Table.States (1), 40, (71, 0), 11);
- Table.States (1).Goto_List.Set_Capacity (10);
- Add_Goto (Table.States (1), 43, 12);
- Add_Goto (Table.States (1), 45, 13);
- Add_Goto (Table.States (1), 46, 14);
- Add_Goto (Table.States (1), 58, 15);
- Add_Goto (Table.States (1), 59, 16);
- Add_Goto (Table.States (1), 60, 17);
- Add_Goto (Table.States (1), 61, 18);
- Add_Goto (Table.States (1), 71, 19);
- Add_Goto (Table.States (1), 72, 20);
- Add_Goto (Table.States (1), 73, 21);
- Table.States (1).Kernel := To_Vector ((0 => ((75, 0), 28, 1,
(32767, 0), 0)));
- Table.States (1).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (72, 0), 0)));
- Table.States (2).Action_List.Set_Capacity (1);
- Add_Action (Table.States (2), 41, Accept_It, (42, 0), 1);
- Table.States (3).Action_List.Set_Capacity (8);
- Add_Action (Table.States (3), 5, Reduce, (52, 1), 1);
- Add_Action (Table.States (3), 7, Reduce, (52, 1), 1);
- Add_Action (Table.States (3), 9, Reduce, (52, 1), 1);
- Add_Action (Table.States (3), 17, Reduce, (52, 1), 1);
- Add_Action (Table.States (3), 21, Reduce, (52, 1), 1);
- Add_Action (Table.States (3), 24, Reduce, (52, 1), 1);
- Add_Action (Table.States (3), 28, (75, 0), 1);
- Add_Action (Table.States (3), 41, Reduce, (52, 1), 1);
- Table.States (3).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (3), 75, 22);
- Table.States (3).Kernel := To_Vector ((((51, 1), 51, 2, (32767,
0), 0), ((52, 1), 51, 0, (52, 1),
- 1)));
- Table.States (3).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (52, 1), 1)));
- Table.States (4).Action_List.Set_Capacity (7);
- Add_Action (Table.States (4), 5, (68, 1), 23);
- Add_Action (Table.States (4), 7, (68, 3), 24);
- Add_Action (Table.States (4), 9, (68, 6), 25);
- Add_Action (Table.States (4), 17, (68, 5), 26);
- Add_Action (Table.States (4), 21, Reduce, (68, 0), 0);
- Add_Action (Table.States (4), 24, (68, 2), 27);
- Add_Action (Table.States (4), 41, Reduce, (68, 0), 0);
- Table.States (4).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (4), 68, 28);
- Table.States (4).Kernel := To_Vector ((0 => ((50, 0), 52, 0,
(68, 0), 0)));
- Table.States (4).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (68, 0), 0)));
- Table.States (5).Action_List.Set_Capacity (8);
- Add_Action (Table.States (5), (5, 7, 9, 17, 21, 24, 28, 41), (51,
0), 1);
- Table.States (5).Kernel := To_Vector ((0 => ((51, 0), 75, 0,
(51, 0), 1)));
- Table.States (5).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (51, 0), 1)));
- Table.States (6).Action_List.Set_Capacity (1);
- Add_Action (Table.States (6), 16, (43, 0), 29);
- Table.States (6).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (6), 43, 30);
- Table.States (6).Kernel := To_Vector ((0 => ((59, 0), 12, 2,
(32767, 0), 0)));
- Table.States (6).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (43, 0), 16, 29)));
- Table.States (7).Action_List.Set_Capacity (1);
- Add_Action (Table.States (7), 16, (43, 0), 29);
- Table.States (7).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (7), 43, 31);
- Table.States (7).Kernel := To_Vector ((0 => ((59, 1), 13, 2,
(32767, 0), 0)));
- Table.States (7).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (43, 0), 16, 29)));
- Table.States (8).Action_List.Set_Capacity (11);
- Add_Action (Table.States (8), 12, (59, 0), 32);
- Add_Action (Table.States (8), 13, (59, 1), 33);
- Add_Action (Table.States (8), 16, (43, 0), 34);
- Add_Action (Table.States (8), 21, (45, 0), 9);
- Add_Action (Table.States (8), 23, (73, 1), 35);
- Add_Conflict (Table.States (8), 23, (60, 0), 0);
- Add_Action (Table.States (8), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (8), 32, Reduce, (60, 0), 0);
- Add_Action (Table.States (8), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (8), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (8), 39, (60, 1), 36);
- Add_Action (Table.States (8), 40, (71, 0), 37);
- Table.States (8).Goto_List.Set_Capacity (10);
- Add_Goto (Table.States (8), 43, 38);
- Add_Goto (Table.States (8), 45, 39);
- Add_Goto (Table.States (8), 46, 40);
- Add_Goto (Table.States (8), 58, 41);
- Add_Goto (Table.States (8), 59, 42);
- Add_Goto (Table.States (8), 60, 43);
- Add_Goto (Table.States (8), 61, 44);
- Add_Goto (Table.States (8), 71, 45);
- Add_Goto (Table.States (8), 72, 46);
- Add_Goto (Table.States (8), 73, 47);
- Table.States (8).Kernel := To_Vector ((((43, 0), 16, 1, (32767,
0), 0), ((73, 1), 16, 1, (32767, 0),
- 0)));
- Table.States (8).Minimal_Complete_Actions := To_Vector (((Reduce,
(72, 0), 0), (Shift, (73, 1), 23,
- 35)));
- Table.States (9).Action_List.Set_Capacity (1);
- Add_Action (Table.States (9), (1 => 35), (45, 0), 1);
- Table.States (9).Kernel := To_Vector ((0 => ((45, 0), 21, 0,
(45, 0), 1)));
- Table.States (9).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (45, 0), 1)));
- Table.States (10).Action_List.Set_Capacity (5);
- Add_Action (Table.States (10), (29, 32, 33, 35, 36), (60, 1), 1);
- Table.States (10).Kernel := To_Vector ((0 => ((60, 1), 39, 0,
(60, 1), 1)));
- Table.States (10).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (60, 1), 1)));
- Table.States (11).Action_List.Set_Capacity (3);
- Add_Action (Table.States (11), (29, 32, 36), (71, 0), 1);
- Table.States (11).Kernel := To_Vector ((0 => ((71, 0), 40, 0,
(71, 0), 1)));
- Table.States (11).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (71, 0), 1)));
- Table.States (12).Action_List.Set_Capacity (3);
- Add_Action (Table.States (12), (29, 32, 36), (73, 2), 1);
- Table.States (12).Kernel := To_Vector ((0 => ((73, 2), 43, 0,
(73, 2), 1)));
- Table.States (12).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (73, 2), 1)));
- Table.States (13).Action_List.Set_Capacity (1);
- Add_Action (Table.States (13), 35, (46, 0), 48);
- Table.States (13).Kernel := To_Vector ((((46, 0), 45, 2, (32767,
0), 0), ((46, 1), 45, 5, (32767, 0),
- 0)));
- Table.States (13).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (46, 0), 35, 48)));
- Table.States (14).Action_List.Set_Capacity (3);
- Add_Action (Table.States (14), (29, 32, 36), (71, 3), 1);
- Table.States (14).Kernel := To_Vector ((0 => ((71, 3), 46, 0,
(71, 3), 1)));
- Table.States (14).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (71, 3), 1)));
- Table.States (15).Action_List.Set_Capacity (3);
- Add_Action (Table.States (15), 29, (58, 1), 49);
- Add_Action (Table.States (15), 32, Reduce, (72, 0), 1);
- Add_Action (Table.States (15), 36, Reduce, (72, 0), 1);
- Table.States (15).Kernel := To_Vector ((((58, 1), 58, 1, (32767,
0), 0), ((72, 0), 58, 0, (72, 0),
- 1)));
- Table.States (15).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (72, 0), 1)));
- Table.States (16).Action_List.Set_Capacity (3);
- Add_Action (Table.States (16), (29, 32, 36), (71, 2), 1);
- Table.States (16).Kernel := To_Vector ((0 => ((71, 2), 59, 0,
(71, 2), 1)));
- Table.States (16).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (71, 2), 1)));
- Table.States (17).Action_List.Set_Capacity (5);
- Add_Action (Table.States (17), (29, 32, 33, 35, 36), (61, 0), 1);
- Table.States (17).Kernel := To_Vector ((0 => ((61, 0), 60, 0,
(61, 0), 1)));
- Table.States (17).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (61, 0), 1)));
- Table.States (18).Action_List.Set_Capacity (5);
- Add_Action (Table.States (18), 29, Reduce, (71, 1), 1);
- Add_Action (Table.States (18), 32, Reduce, (71, 1), 1);
- Add_Action (Table.States (18), 33, (61, 1), 50);
- Add_Action (Table.States (18), 35, Reduce, (45, 1), 1);
- Add_Action (Table.States (18), 36, Reduce, (71, 1), 1);
- Table.States (18).Kernel := To_Vector ((((45, 1), 61, 0, (45,
1), 1), ((61, 1), 61, 2, (32767, 0),
- 0), ((71, 1), 61, 0, (71, 1), 1)));
- Table.States (18).Minimal_Complete_Actions := To_Vector (((Reduce,
(45, 1), 1), (Reduce, (71, 1), 1)));
- Table.States (19).Action_List.Set_Capacity (3);
- Add_Action (Table.States (19), (29, 32, 36), (73, 0), 1);
- Table.States (19).Kernel := To_Vector ((0 => ((73, 0), 71, 0,
(73, 0), 1)));
- Table.States (19).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (73, 0), 1)));
- Table.States (20).Action_List.Set_Capacity (2);
- Add_Action (Table.States (20), 32, (72, 1), 51);
- Add_Action (Table.States (20), 36, (75, 0), 52);
- Table.States (20).Kernel := To_Vector ((((72, 1), 72, 1, (32767,
0), 0), ((75, 0), 72, 1, (32767, 0),
- 0)));
- Table.States (20).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (75, 0), 36, 52)));
- Table.States (21).Action_List.Set_Capacity (3);
- Add_Action (Table.States (21), (29, 32, 36), (58, 0), 1);
- Table.States (21).Kernel := To_Vector ((0 => ((58, 0), 73, 0,
(58, 0), 1)));
- Table.States (21).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (58, 0), 1)));
- Table.States (22).Action_List.Set_Capacity (8);
- Add_Action (Table.States (22), (5, 7, 9, 17, 21, 24, 28, 41), (51,
1), 2);
- Table.States (22).Kernel := To_Vector ((0 => ((51, 1), 75, 0,
(51, 1), 2)));
- Table.States (22).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (51, 1), 2)));
- Table.States (23).Action_List.Set_Capacity (2);
- Add_Action (Table.States (23), (21, 41), (68, 1), 1);
- Table.States (23).Kernel := To_Vector ((0 => ((68, 1), 5, 0,
(68, 1), 1)));
- Table.States (23).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (68, 1), 1)));
- Table.States (24).Action_List.Set_Capacity (3);
- Add_Action (Table.States (24), 17, (68, 4), 53);
- Add_Action (Table.States (24), 21, Reduce, (68, 3), 1);
- Add_Action (Table.States (24), 41, Reduce, (68, 3), 1);
- Table.States (24).Kernel := To_Vector ((((68, 3), 7, 0, (68, 3),
1), ((68, 4), 7, 1, (32767, 0),
- 0)));
- Table.States (24).Minimal_Complete_Actions := To_Vector (((Reduce,
(68, 3), 1), (Shift, (68, 4), 17,
- 53)));
- Table.States (25).Action_List.Set_Capacity (2);
- Add_Action (Table.States (25), (21, 41), (68, 6), 1);
- Table.States (25).Kernel := To_Vector ((0 => ((68, 6), 9, 0,
(68, 6), 1)));
- Table.States (25).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (68, 6), 1)));
- Table.States (26).Action_List.Set_Capacity (2);
- Add_Action (Table.States (26), (21, 41), (68, 5), 1);
- Table.States (26).Kernel := To_Vector ((0 => ((68, 5), 17, 0,
(68, 5), 1)));
- Table.States (26).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (68, 5), 1)));
- Table.States (27).Action_List.Set_Capacity (2);
- Add_Action (Table.States (27), (21, 41), (68, 2), 1);
- Table.States (27).Kernel := To_Vector ((0 => ((68, 2), 24, 0,
(68, 2), 1)));
- Table.States (27).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (68, 2), 1)));
- Table.States (28).Action_List.Set_Capacity (2);
- Add_Action (Table.States (28), 21, (67, 0), 54);
- Add_Action (Table.States (28), 41, Reduce, (66, 0), 0);
- Table.States (28).Goto_List.Set_Capacity (3);
- Add_Goto (Table.States (28), 66, 55);
- Add_Goto (Table.States (28), 67, 56);
- Add_Goto (Table.States (28), 70, 57);
- Table.States (28).Kernel := To_Vector ((0 => ((50, 0), 68, 0,
(66, 0), 0)));
- Table.States (28).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (66, 0), 0)));
- Table.States (29).Action_List.Set_Capacity (11);
- Add_Action (Table.States (29), 12, (59, 0), 32);
- Add_Action (Table.States (29), 13, (59, 1), 33);
- Add_Action (Table.States (29), 16, (43, 0), 34);
- Add_Action (Table.States (29), 21, (45, 0), 9);
- Add_Action (Table.States (29), 23, Reduce, (60, 0), 0);
- Add_Action (Table.States (29), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (29), 32, Reduce, (60, 0), 0);
- Add_Action (Table.States (29), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (29), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (29), 39, (60, 1), 36);
- Add_Action (Table.States (29), 40, (71, 0), 37);
- Table.States (29).Goto_List.Set_Capacity (10);
- Add_Goto (Table.States (29), 43, 38);
- Add_Goto (Table.States (29), 45, 39);
- Add_Goto (Table.States (29), 46, 40);
- Add_Goto (Table.States (29), 58, 41);
- Add_Goto (Table.States (29), 59, 42);
- Add_Goto (Table.States (29), 60, 43);
- Add_Goto (Table.States (29), 61, 44);
- Add_Goto (Table.States (29), 71, 45);
- Add_Goto (Table.States (29), 72, 46);
- Add_Goto (Table.States (29), 73, 47);
- Table.States (29).Kernel := To_Vector ((0 => ((43, 0), 16, 1,
(32767, 0), 0)));
- Table.States (29).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (72, 0), 0)));
- Table.States (30).Action_List.Set_Capacity (3);
- Add_Action (Table.States (30), (29, 32, 36), (59, 0), 2);
- Table.States (30).Kernel := To_Vector ((0 => ((59, 0), 43, 0,
(59, 0), 2)));
- Table.States (30).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (59, 0), 2)));
- Table.States (31).Action_List.Set_Capacity (3);
- Add_Action (Table.States (31), (29, 32, 36), (59, 1), 2);
- Table.States (31).Kernel := To_Vector ((0 => ((59, 1), 43, 0,
(59, 1), 2)));
- Table.States (31).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (59, 1), 2)));
- Table.States (32).Action_List.Set_Capacity (1);
- Add_Action (Table.States (32), 16, (43, 0), 58);
- Table.States (32).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (32), 43, 59);
- Table.States (32).Kernel := To_Vector ((0 => ((59, 0), 12, 2,
(32767, 0), 0)));
- Table.States (32).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (43, 0), 16, 58)));
- Table.States (33).Action_List.Set_Capacity (1);
- Add_Action (Table.States (33), 16, (43, 0), 58);
- Table.States (33).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (33), 43, 60);
- Table.States (33).Kernel := To_Vector ((0 => ((59, 1), 13, 2,
(32767, 0), 0)));
- Table.States (33).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (43, 0), 16, 58)));
- Table.States (34).Action_List.Set_Capacity (11);
- Add_Action (Table.States (34), 12, (59, 0), 32);
- Add_Action (Table.States (34), 13, (59, 1), 33);
- Add_Action (Table.States (34), 16, (43, 0), 34);
- Add_Action (Table.States (34), 21, (45, 0), 9);
- Add_Action (Table.States (34), 23, (73, 1), 61);
- Add_Conflict (Table.States (34), 23, (60, 0), 0);
- Add_Action (Table.States (34), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (34), 32, Reduce, (60, 0), 0);
- Add_Action (Table.States (34), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (34), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (34), 39, (60, 1), 36);
- Add_Action (Table.States (34), 40, (71, 0), 37);
- Table.States (34).Goto_List.Set_Capacity (10);
- Add_Goto (Table.States (34), 43, 38);
- Add_Goto (Table.States (34), 45, 39);
- Add_Goto (Table.States (34), 46, 40);
- Add_Goto (Table.States (34), 58, 41);
- Add_Goto (Table.States (34), 59, 42);
- Add_Goto (Table.States (34), 60, 43);
- Add_Goto (Table.States (34), 61, 44);
- Add_Goto (Table.States (34), 71, 45);
- Add_Goto (Table.States (34), 72, 62);
- Add_Goto (Table.States (34), 73, 47);
- Table.States (34).Kernel := To_Vector ((((43, 0), 16, 1, (32767,
0), 0), ((73, 1), 16, 1, (32767, 0),
- 0)));
- Table.States (34).Minimal_Complete_Actions := To_Vector (((Reduce,
(72, 0), 0), (Shift, (73, 1), 23,
- 61)));
- Table.States (35).Action_List.Set_Capacity (3);
- Add_Action (Table.States (35), (29, 32, 36), (73, 1), 2);
- Table.States (35).Kernel := To_Vector ((0 => ((73, 1), 23, 0,
(73, 1), 2)));
- Table.States (35).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (73, 1), 2)));
- Table.States (36).Action_List.Set_Capacity (5);
- Add_Action (Table.States (36), (23, 29, 32, 33, 35), (60, 1), 1);
- Table.States (36).Kernel := To_Vector ((0 => ((60, 1), 39, 0,
(60, 1), 1)));
- Table.States (36).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (60, 1), 1)));
- Table.States (37).Action_List.Set_Capacity (3);
- Add_Action (Table.States (37), (23, 29, 32), (71, 0), 1);
- Table.States (37).Kernel := To_Vector ((0 => ((71, 0), 40, 0,
(71, 0), 1)));
- Table.States (37).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (71, 0), 1)));
- Table.States (38).Action_List.Set_Capacity (3);
- Add_Action (Table.States (38), (23, 29, 32), (73, 2), 1);
- Table.States (38).Kernel := To_Vector ((0 => ((73, 2), 43, 0,
(73, 2), 1)));
- Table.States (38).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (73, 2), 1)));
- Table.States (39).Action_List.Set_Capacity (1);
- Add_Action (Table.States (39), 35, (46, 0), 63);
- Table.States (39).Kernel := To_Vector ((((46, 0), 45, 2, (32767,
0), 0), ((46, 1), 45, 5, (32767, 0),
- 0)));
- Table.States (39).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (46, 0), 35, 63)));
- Table.States (40).Action_List.Set_Capacity (3);
- Add_Action (Table.States (40), (23, 29, 32), (71, 3), 1);
- Table.States (40).Kernel := To_Vector ((0 => ((71, 3), 46, 0,
(71, 3), 1)));
- Table.States (40).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (71, 3), 1)));
- Table.States (41).Action_List.Set_Capacity (3);
- Add_Action (Table.States (41), 23, Reduce, (72, 0), 1);
- Add_Action (Table.States (41), 29, (58, 1), 64);
- Add_Action (Table.States (41), 32, Reduce, (72, 0), 1);
- Table.States (41).Kernel := To_Vector ((((58, 1), 58, 1, (32767,
0), 0), ((72, 0), 58, 0, (72, 0),
- 1)));
- Table.States (41).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (72, 0), 1)));
- Table.States (42).Action_List.Set_Capacity (3);
- Add_Action (Table.States (42), (23, 29, 32), (71, 2), 1);
- Table.States (42).Kernel := To_Vector ((0 => ((71, 2), 59, 0,
(71, 2), 1)));
- Table.States (42).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (71, 2), 1)));
- Table.States (43).Action_List.Set_Capacity (5);
- Add_Action (Table.States (43), (23, 29, 32, 33, 35), (61, 0), 1);
- Table.States (43).Kernel := To_Vector ((0 => ((61, 0), 60, 0,
(61, 0), 1)));
- Table.States (43).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (61, 0), 1)));
- Table.States (44).Action_List.Set_Capacity (5);
- Add_Action (Table.States (44), 23, Reduce, (71, 1), 1);
- Add_Action (Table.States (44), 29, Reduce, (71, 1), 1);
- Add_Action (Table.States (44), 32, Reduce, (71, 1), 1);
- Add_Action (Table.States (44), 33, (61, 1), 65);
- Add_Action (Table.States (44), 35, Reduce, (45, 1), 1);
- Table.States (44).Kernel := To_Vector ((((45, 1), 61, 0, (45,
1), 1), ((61, 1), 61, 2, (32767, 0),
- 0), ((71, 1), 61, 0, (71, 1), 1)));
- Table.States (44).Minimal_Complete_Actions := To_Vector (((Reduce,
(45, 1), 1), (Reduce, (71, 1), 1)));
- Table.States (45).Action_List.Set_Capacity (3);
- Add_Action (Table.States (45), (23, 29, 32), (73, 0), 1);
- Table.States (45).Kernel := To_Vector ((0 => ((73, 0), 71, 0,
(73, 0), 1)));
- Table.States (45).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (73, 0), 1)));
- Table.States (46).Action_List.Set_Capacity (2);
- Add_Action (Table.States (46), 23, (43, 0), 66);
- Add_Action (Table.States (46), 32, (72, 1), 67);
- Table.States (46).Kernel := To_Vector ((((43, 0), 72, 1, (32767,
0), 0), ((72, 1), 72, 1, (32767, 0),
- 0)));
- Table.States (46).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (43, 0), 23, 66)));
- Table.States (47).Action_List.Set_Capacity (3);
- Add_Action (Table.States (47), (23, 29, 32), (58, 0), 1);
- Table.States (47).Kernel := To_Vector ((0 => ((58, 0), 73, 0,
(58, 0), 1)));
- Table.States (47).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (58, 0), 1)));
- Table.States (48).Action_List.Set_Capacity (1);
- Add_Action (Table.States (48), 39, (46, 0), 68);
- Table.States (48).Kernel := To_Vector ((((46, 0), 35, 1, (32767,
0), 0), ((46, 1), 35, 4, (32767, 0),
- 0)));
- Table.States (48).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (46, 0), 39, 68)));
- Table.States (49).Action_List.Set_Capacity (11);
- Add_Action (Table.States (49), 12, (59, 0), 6);
- Add_Action (Table.States (49), 13, (59, 1), 7);
- Add_Action (Table.States (49), 16, (43, 0), 8);
- Add_Action (Table.States (49), 21, (45, 0), 9);
- Add_Action (Table.States (49), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (49), 32, Reduce, (60, 0), 0);
- Add_Action (Table.States (49), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (49), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (49), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (49), 39, (60, 1), 10);
- Add_Action (Table.States (49), 40, (71, 0), 11);
- Table.States (49).Goto_List.Set_Capacity (8);
- Add_Goto (Table.States (49), 43, 12);
- Add_Goto (Table.States (49), 45, 13);
- Add_Goto (Table.States (49), 46, 14);
- Add_Goto (Table.States (49), 59, 16);
- Add_Goto (Table.States (49), 60, 17);
- Add_Goto (Table.States (49), 61, 18);
- Add_Goto (Table.States (49), 71, 19);
- Add_Goto (Table.States (49), 73, 69);
- Table.States (49).Kernel := To_Vector ((0 => ((58, 1), 29, 0,
(73, 0), 0)));
- Table.States (49).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (73, 0), 0)));
- end Subr_1;
- procedure Subr_2
- is begin
- Table.States (50).Action_List.Set_Capacity (1);
- Add_Action (Table.States (50), 39, (61, 1), 70);
- Table.States (50).Kernel := To_Vector ((0 => ((61, 1), 33, 1,
(32767, 0), 0)));
- Table.States (50).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (61, 1), 39, 70)));
- Table.States (51).Action_List.Set_Capacity (11);
- Add_Action (Table.States (51), 12, (59, 0), 6);
- Add_Action (Table.States (51), 13, (59, 1), 7);
- Add_Action (Table.States (51), 16, (43, 0), 8);
- Add_Action (Table.States (51), 21, (45, 0), 9);
- Add_Action (Table.States (51), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (51), 32, Reduce, (60, 0), 0);
- Add_Action (Table.States (51), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (51), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (51), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (51), 39, (60, 1), 10);
- Add_Action (Table.States (51), 40, (71, 0), 11);
- Table.States (51).Goto_List.Set_Capacity (9);
- Add_Goto (Table.States (51), 43, 12);
- Add_Goto (Table.States (51), 45, 13);
- Add_Goto (Table.States (51), 46, 14);
- Add_Goto (Table.States (51), 58, 71);
- Add_Goto (Table.States (51), 59, 16);
- Add_Goto (Table.States (51), 60, 17);
- Add_Goto (Table.States (51), 61, 18);
- Add_Goto (Table.States (51), 71, 19);
- Add_Goto (Table.States (51), 73, 21);
- Table.States (51).Kernel := To_Vector ((0 => ((72, 1), 32, 0,
(58, 1), 0)));
- Table.States (51).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (58, 1), 0)));
- Table.States (52).Action_List.Set_Capacity (8);
- Add_Action (Table.States (52), (5, 7, 9, 17, 21, 24, 28, 41), (75,
0), 3);
- Table.States (52).Kernel := To_Vector ((0 => ((75, 0), 36, 0,
(75, 0), 3)));
- Table.States (52).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (75, 0), 3)));
- Table.States (53).Action_List.Set_Capacity (2);
- Add_Action (Table.States (53), (21, 41), (68, 4), 2);
- Table.States (53).Kernel := To_Vector ((0 => ((68, 4), 17, 0,
(68, 4), 2)));
- Table.States (53).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (68, 4), 2)));
- Table.States (54).Action_List.Set_Capacity (3);
- Add_Action (Table.States (54), 11, Reduce, (60, 0), 0);
- Add_Action (Table.States (54), 15, Reduce, (60, 0), 0);
- Add_Action (Table.States (54), 39, (60, 1), 72);
- Table.States (54).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (54), 60, 73);
- Table.States (54).Kernel := To_Vector ((((67, 0), 21, 5, (32767,
0), 0), ((70, 0), 21, 3, (32767, 0),
- 0)));
- Table.States (54).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (60, 0), 0)));
- Table.States (55).Action_List.Set_Capacity (1);
- Add_Action (Table.States (55), (1 => 41), (50, 0), 3);
- Table.States (55).Kernel := To_Vector ((0 => ((50, 0), 66, 0,
(50, 0), 3)));
- Table.States (55).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (50, 0), 3)));
- Table.States (56).Action_List.Set_Capacity (1);
- Add_Action (Table.States (56), (1 => 41), (66, 2), 1);
- Table.States (56).Kernel := To_Vector ((0 => ((66, 2), 67, 0,
(66, 2), 1)));
- Table.States (56).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (66, 2), 1)));
- Table.States (57).Action_List.Set_Capacity (1);
- Add_Action (Table.States (57), (1 => 41), (66, 1), 1);
- Table.States (57).Kernel := To_Vector ((0 => ((66, 1), 70, 0,
(66, 1), 1)));
- Table.States (57).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (66, 1), 1)));
- Table.States (58).Action_List.Set_Capacity (11);
- Add_Action (Table.States (58), 12, (59, 0), 32);
- Add_Action (Table.States (58), 13, (59, 1), 33);
- Add_Action (Table.States (58), 16, (43, 0), 34);
- Add_Action (Table.States (58), 21, (45, 0), 9);
- Add_Action (Table.States (58), 23, Reduce, (60, 0), 0);
- Add_Action (Table.States (58), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (58), 32, Reduce, (60, 0), 0);
- Add_Action (Table.States (58), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (58), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (58), 39, (60, 1), 36);
- Add_Action (Table.States (58), 40, (71, 0), 37);
- Table.States (58).Goto_List.Set_Capacity (10);
- Add_Goto (Table.States (58), 43, 38);
- Add_Goto (Table.States (58), 45, 39);
- Add_Goto (Table.States (58), 46, 40);
- Add_Goto (Table.States (58), 58, 41);
- Add_Goto (Table.States (58), 59, 42);
- Add_Goto (Table.States (58), 60, 43);
- Add_Goto (Table.States (58), 61, 44);
- Add_Goto (Table.States (58), 71, 45);
- Add_Goto (Table.States (58), 72, 62);
- Add_Goto (Table.States (58), 73, 47);
- Table.States (58).Kernel := To_Vector ((0 => ((43, 0), 16, 1,
(32767, 0), 0)));
- Table.States (58).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (72, 0), 0)));
- Table.States (59).Action_List.Set_Capacity (3);
- Add_Action (Table.States (59), (23, 29, 32), (59, 0), 2);
- Table.States (59).Kernel := To_Vector ((0 => ((59, 0), 43, 0,
(59, 0), 2)));
- Table.States (59).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (59, 0), 2)));
- Table.States (60).Action_List.Set_Capacity (3);
- Add_Action (Table.States (60), (23, 29, 32), (59, 1), 2);
- Table.States (60).Kernel := To_Vector ((0 => ((59, 1), 43, 0,
(59, 1), 2)));
- Table.States (60).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (59, 1), 2)));
- Table.States (61).Action_List.Set_Capacity (3);
- Add_Action (Table.States (61), (23, 29, 32), (73, 1), 2);
- Table.States (61).Kernel := To_Vector ((0 => ((73, 1), 23, 0,
(73, 1), 2)));
- Table.States (61).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (73, 1), 2)));
- Table.States (62).Action_List.Set_Capacity (2);
- Add_Action (Table.States (62), 23, (43, 0), 74);
- Add_Action (Table.States (62), 32, (72, 1), 67);
- Table.States (62).Kernel := To_Vector ((((43, 0), 72, 1, (32767,
0), 0), ((72, 1), 72, 1, (32767, 0),
- 0)));
- Table.States (62).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (43, 0), 23, 74)));
- Table.States (63).Action_List.Set_Capacity (1);
- Add_Action (Table.States (63), 39, (46, 0), 75);
- Table.States (63).Kernel := To_Vector ((((46, 0), 35, 1, (32767,
0), 0), ((46, 1), 35, 4, (32767, 0),
- 0)));
- Table.States (63).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (46, 0), 39, 75)));
- Table.States (64).Action_List.Set_Capacity (11);
- Add_Action (Table.States (64), 12, (59, 0), 32);
- Add_Action (Table.States (64), 13, (59, 1), 33);
- Add_Action (Table.States (64), 16, (43, 0), 34);
- Add_Action (Table.States (64), 21, (45, 0), 9);
- Add_Action (Table.States (64), 23, Reduce, (60, 0), 0);
- Add_Action (Table.States (64), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (64), 32, Reduce, (60, 0), 0);
- Add_Action (Table.States (64), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (64), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (64), 39, (60, 1), 36);
- Add_Action (Table.States (64), 40, (71, 0), 37);
- Table.States (64).Goto_List.Set_Capacity (8);
- Add_Goto (Table.States (64), 43, 38);
- Add_Goto (Table.States (64), 45, 39);
- Add_Goto (Table.States (64), 46, 40);
- Add_Goto (Table.States (64), 59, 42);
- Add_Goto (Table.States (64), 60, 43);
- Add_Goto (Table.States (64), 61, 44);
- Add_Goto (Table.States (64), 71, 45);
- Add_Goto (Table.States (64), 73, 76);
- Table.States (64).Kernel := To_Vector ((0 => ((58, 1), 29, 0,
(73, 0), 0)));
- Table.States (64).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (73, 0), 0)));
- Table.States (65).Action_List.Set_Capacity (1);
- Add_Action (Table.States (65), 39, (61, 1), 77);
- Table.States (65).Kernel := To_Vector ((0 => ((61, 1), 33, 1,
(32767, 0), 0)));
- Table.States (65).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (61, 1), 39, 77)));
- Table.States (66).Action_List.Set_Capacity (3);
- Add_Action (Table.States (66), (29, 32, 36), (43, 0), 3);
- Table.States (66).Kernel := To_Vector ((0 => ((43, 0), 23, 0,
(43, 0), 3)));
- Table.States (66).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (43, 0), 3)));
- Table.States (67).Action_List.Set_Capacity (11);
- Add_Action (Table.States (67), 12, (59, 0), 32);
- Add_Action (Table.States (67), 13, (59, 1), 33);
- Add_Action (Table.States (67), 16, (43, 0), 34);
- Add_Action (Table.States (67), 21, (45, 0), 9);
- Add_Action (Table.States (67), 23, Reduce, (60, 0), 0);
- Add_Action (Table.States (67), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (67), 32, Reduce, (60, 0), 0);
- Add_Action (Table.States (67), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (67), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (67), 39, (60, 1), 36);
- Add_Action (Table.States (67), 40, (71, 0), 37);
- Table.States (67).Goto_List.Set_Capacity (9);
- Add_Goto (Table.States (67), 43, 38);
- Add_Goto (Table.States (67), 45, 39);
- Add_Goto (Table.States (67), 46, 40);
- Add_Goto (Table.States (67), 58, 78);
- Add_Goto (Table.States (67), 59, 42);
- Add_Goto (Table.States (67), 60, 43);
- Add_Goto (Table.States (67), 61, 44);
- Add_Goto (Table.States (67), 71, 45);
- Add_Goto (Table.States (67), 73, 47);
- Table.States (67).Kernel := To_Vector ((0 => ((72, 1), 32, 0,
(58, 1), 0)));
- Table.States (67).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (58, 1), 0)));
- Table.States (68).Action_List.Set_Capacity (4);
- Add_Action (Table.States (68), 16, (46, 1), 79);
- Add_Action (Table.States (68), 29, Reduce, (46, 0), 3);
- Add_Action (Table.States (68), 32, Reduce, (46, 0), 3);
- Add_Action (Table.States (68), 36, Reduce, (46, 0), 3);
- Table.States (68).Kernel := To_Vector ((((46, 0), 39, 0, (46,
0), 3), ((46, 1), 39, 3, (32767, 0),
- 0)));
- Table.States (68).Minimal_Complete_Actions := To_Vector (((Reduce,
(46, 0), 3), (Shift, (46, 1), 16,
- 79)));
- Table.States (69).Action_List.Set_Capacity (3);
- Add_Action (Table.States (69), (29, 32, 36), (58, 1), 3);
- Table.States (69).Kernel := To_Vector ((0 => ((58, 1), 73, 0,
(58, 1), 3)));
- Table.States (69).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (58, 1), 3)));
- Table.States (70).Action_List.Set_Capacity (5);
- Add_Action (Table.States (70), (29, 32, 33, 35, 36), (61, 1), 3);
- Table.States (70).Kernel := To_Vector ((0 => ((61, 1), 39, 0,
(61, 1), 3)));
- Table.States (70).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (61, 1), 3)));
- Table.States (71).Action_List.Set_Capacity (3);
- Add_Action (Table.States (71), 29, (58, 1), 49);
- Add_Action (Table.States (71), 32, Reduce, (72, 1), 3);
- Add_Action (Table.States (71), 36, Reduce, (72, 1), 3);
- Table.States (71).Kernel := To_Vector ((((58, 1), 58, 1, (32767,
0), 0), ((72, 1), 58, 0, (72, 1),
- 3)));
- Table.States (71).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (72, 1), 3)));
- Table.States (72).Action_List.Set_Capacity (2);
- Add_Action (Table.States (72), (11, 15), (60, 1), 1);
- Table.States (72).Kernel := To_Vector ((0 => ((60, 1), 39, 0,
(60, 1), 1)));
- Table.States (72).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (60, 1), 1)));
- Table.States (73).Action_List.Set_Capacity (2);
- Add_Action (Table.States (73), 11, (67, 0), 80);
- Add_Action (Table.States (73), 15, (70, 0), 81);
- Table.States (73).Kernel := To_Vector ((((67, 0), 60, 5, (32767,
0), 0), ((70, 0), 60, 3, (32767, 0),
- 0)));
- Table.States (73).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (70, 0), 15, 81)));
- Table.States (74).Action_List.Set_Capacity (3);
- Add_Action (Table.States (74), (23, 29, 32), (43, 0), 3);
- Table.States (74).Kernel := To_Vector ((0 => ((43, 0), 23, 0,
(43, 0), 3)));
- Table.States (74).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (43, 0), 3)));
- Table.States (75).Action_List.Set_Capacity (4);
- Add_Action (Table.States (75), 16, (46, 1), 82);
- Add_Action (Table.States (75), 23, Reduce, (46, 0), 3);
- Add_Action (Table.States (75), 29, Reduce, (46, 0), 3);
- Add_Action (Table.States (75), 32, Reduce, (46, 0), 3);
- Table.States (75).Kernel := To_Vector ((((46, 0), 39, 0, (46,
0), 3), ((46, 1), 39, 3, (32767, 0),
- 0)));
- Table.States (75).Minimal_Complete_Actions := To_Vector (((Reduce,
(46, 0), 3), (Shift, (46, 1), 16,
- 82)));
- Table.States (76).Action_List.Set_Capacity (3);
- Add_Action (Table.States (76), (23, 29, 32), (58, 1), 3);
- Table.States (76).Kernel := To_Vector ((0 => ((58, 1), 73, 0,
(58, 1), 3)));
- Table.States (76).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (58, 1), 3)));
- Table.States (77).Action_List.Set_Capacity (5);
- Add_Action (Table.States (77), (23, 29, 32, 33, 35), (61, 1), 3);
- Table.States (77).Kernel := To_Vector ((0 => ((61, 1), 39, 0,
(61, 1), 3)));
- Table.States (77).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (61, 1), 3)));
- Table.States (78).Action_List.Set_Capacity (3);
- Add_Action (Table.States (78), 23, Reduce, (72, 1), 3);
- Add_Action (Table.States (78), 29, (58, 1), 64);
- Add_Action (Table.States (78), 32, Reduce, (72, 1), 3);
- Table.States (78).Kernel := To_Vector ((((58, 1), 58, 1, (32767,
0), 0), ((72, 1), 58, 0, (72, 1),
- 3)));
- Table.States (78).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (72, 1), 3)));
- Table.States (79).Action_List.Set_Capacity (1);
- Add_Action (Table.States (79), 40, (46, 1), 83);
- Table.States (79).Kernel := To_Vector ((0 => ((46, 1), 16, 2,
(32767, 0), 0)));
- Table.States (79).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (46, 1), 40, 83)));
- Table.States (80).Action_List.Set_Capacity (1);
- Add_Action (Table.States (80), 40, (67, 0), 84);
- Table.States (80).Kernel := To_Vector ((0 => ((67, 0), 11, 4,
(32767, 0), 0)));
- Table.States (80).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (67, 0), 40, 84)));
- Table.States (81).Action_List.Set_Capacity (7);
- Add_Action (Table.States (81), 8, (47, 0), 85);
- Add_Action (Table.States (81), 10, Reduce, (55, 0), 0);
- Add_Action (Table.States (81), 14, (44, 0), 86);
- Add_Action (Table.States (81), 18, (69, 4), 87);
- Add_Action (Table.States (81), 20, (63, 0), 88);
- Add_Action (Table.States (81), 25, (74, 0), 89);
- Add_Action (Table.States (81), 39, (69, 0), 90);
- Table.States (81).Goto_List.Set_Capacity (11);
- Add_Goto (Table.States (81), 44, 91);
- Add_Goto (Table.States (81), 47, 92);
- Add_Goto (Table.States (81), 53, 93);
- Add_Goto (Table.States (81), 54, 94);
- Add_Goto (Table.States (81), 55, 95);
- Add_Goto (Table.States (81), 62, 96);
- Add_Goto (Table.States (81), 63, 97);
- Add_Goto (Table.States (81), 64, 98);
- Add_Goto (Table.States (81), 65, 99);
- Add_Goto (Table.States (81), 69, 100);
- Add_Goto (Table.States (81), 74, 101);
- Table.States (81).Kernel := To_Vector ((0 => ((70, 0), 15, 2,
(32767, 0), 0)));
- Table.States (81).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (55, 0), 0)));
- Table.States (82).Action_List.Set_Capacity (1);
- Add_Action (Table.States (82), 40, (46, 1), 102);
- Table.States (82).Kernel := To_Vector ((0 => ((46, 1), 16, 2,
(32767, 0), 0)));
- Table.States (82).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (46, 1), 40, 102)));
- Table.States (83).Action_List.Set_Capacity (1);
- Add_Action (Table.States (83), 23, (46, 1), 103);
- Table.States (83).Kernel := To_Vector ((0 => ((46, 1), 40, 1,
(32767, 0), 0)));
- Table.States (83).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (46, 1), 23, 103)));
- Table.States (84).Action_List.Set_Capacity (1);
- Add_Action (Table.States (84), 15, (67, 0), 104);
- Table.States (84).Kernel := To_Vector ((0 => ((67, 0), 40, 3,
(32767, 0), 0)));
- Table.States (84).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (67, 0), 15, 104)));
- Table.States (85).Action_List.Set_Capacity (3);
- Add_Action (Table.States (85), 15, Reduce, (60, 0), 0);
- Add_Action (Table.States (85), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (85), 39, (60, 1), 105);
- Table.States (85).Goto_List.Set_Capacity (2);
- Add_Goto (Table.States (85), 60, 106);
- Add_Goto (Table.States (85), 61, 107);
- Table.States (85).Kernel := To_Vector ((0 => ((47, 0), 8, 4,
(32767, 0), 0)));
- Table.States (85).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (61, 0), 0)));
- Table.States (86).Action_List.Set_Capacity (2);
- Add_Action (Table.States (86), 12, (44, 3), 108);
- Add_Action (Table.States (86), 39, (44, 0), 109);
- Table.States (86).Kernel := To_Vector ((((44, 0), 14, 3, (32767,
0), 0), ((44, 1), 14, 5, (32767, 0),
- 0), ((44, 2), 14, 7, (32767, 0), 0), ((44, 3), 14, 6, (32767,
0), 0)));
- Table.States (86).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 0), 39, 109)));
- Table.States (87).Action_List.Set_Capacity (1);
- Add_Action (Table.States (87), 36, (69, 4), 110);
- Table.States (87).Kernel := To_Vector ((0 => ((69, 4), 18, 1,
(32767, 0), 0)));
- Table.States (87).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (69, 4), 36, 110)));
- Table.States (88).Action_List.Set_Capacity (4);
- Add_Action (Table.States (88), 11, Reduce, (60, 0), 0);
- Add_Action (Table.States (88), 15, Reduce, (60, 0), 0);
- Add_Action (Table.States (88), 22, Reduce, (60, 0), 0);
- Add_Action (Table.States (88), 39, (60, 1), 111);
- Table.States (88).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (88), 60, 112);
- Table.States (88).Kernel := To_Vector ((((63, 0), 20, 3, (32767,
0), 0), ((64, 0), 20, 4, (32767, 0),
- 0), ((65, 0), 20, 2, (32767, 0), 0)));
- Table.States (88).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (60, 0), 0)));
- Table.States (89).Action_List.Set_Capacity (1);
- Add_Action (Table.States (89), 39, (74, 0), 113);
- Table.States (89).Kernel := To_Vector ((0 => ((74, 0), 25, 5,
(32767, 0), 0)));
- Table.States (89).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (74, 0), 39, 113)));
- Table.States (90).Action_List.Set_Capacity (2);
- Add_Action (Table.States (90), 30, (69, 1), 114);
- Add_Action (Table.States (90), 31, (69, 0), 115);
- Table.States (90).Kernel := To_Vector ((((69, 0), 39, 2, (32767,
0), 0), ((69, 1), 39, 4, (32767, 0),
- 0)));
- Table.States (90).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (69, 0), 31, 115)));
- Table.States (91).Action_List.Set_Capacity (7);
- Add_Action (Table.States (91), (8, 10, 14, 18, 20, 25, 39), (69,
2), 1);
- Table.States (91).Kernel := To_Vector ((0 => ((69, 2), 44, 0,
(69, 2), 1)));
- Table.States (91).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (69, 2), 1)));
- Table.States (92).Action_List.Set_Capacity (7);
- Add_Action (Table.States (92), (8, 10, 14, 18, 20, 25, 39), (69,
3), 1);
- Table.States (92).Kernel := To_Vector ((0 => ((69, 3), 47, 0,
(69, 3), 1)));
- Table.States (92).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (69, 3), 1)));
- Table.States (93).Action_List.Set_Capacity (7);
- Add_Action (Table.States (93), (8, 10, 14, 18, 20, 25, 39), (54,
0), 1);
- Table.States (93).Kernel := To_Vector ((0 => ((54, 0), 53, 0,
(54, 0), 1)));
- Table.States (93).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (54, 0), 1)));
- Table.States (94).Action_List.Set_Capacity (7);
- Add_Action (Table.States (94), 8, (47, 0), 85);
- Add_Action (Table.States (94), 10, Reduce, (55, 1), 1);
- Add_Action (Table.States (94), 14, (44, 0), 86);
- Add_Action (Table.States (94), 18, (69, 4), 87);
- Add_Action (Table.States (94), 20, (63, 0), 88);
- Add_Action (Table.States (94), 25, (74, 0), 89);
- Add_Action (Table.States (94), 39, (69, 0), 90);
- Table.States (94).Goto_List.Set_Capacity (9);
- Add_Goto (Table.States (94), 44, 91);
- Add_Goto (Table.States (94), 47, 92);
- Add_Goto (Table.States (94), 53, 116);
- Add_Goto (Table.States (94), 62, 96);
- Add_Goto (Table.States (94), 63, 97);
- Add_Goto (Table.States (94), 64, 98);
- Add_Goto (Table.States (94), 65, 99);
- Add_Goto (Table.States (94), 69, 100);
- Add_Goto (Table.States (94), 74, 101);
- Table.States (94).Kernel := To_Vector ((((54, 1), 54, 2, (32767,
0), 0), ((55, 1), 54, 0, (55, 1),
- 1)));
- Table.States (94).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (55, 1), 1)));
- Table.States (95).Action_List.Set_Capacity (1);
- Add_Action (Table.States (95), 10, (70, 0), 117);
- Table.States (95).Kernel := To_Vector ((0 => ((70, 0), 55, 2,
(32767, 0), 0)));
- Table.States (95).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (70, 0), 10, 117)));
- Table.States (96).Action_List.Set_Capacity (7);
- Add_Action (Table.States (96), (8, 10, 14, 18, 20, 25, 39), (53,
2), 1);
- Table.States (96).Kernel := To_Vector ((0 => ((53, 2), 62, 0,
(53, 2), 1)));
- Table.States (96).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (53, 2), 1)));
- Table.States (97).Action_List.Set_Capacity (7);
- Add_Action (Table.States (97), (8, 10, 14, 18, 20, 25, 39), (62,
0), 1);
- Table.States (97).Kernel := To_Vector ((0 => ((62, 0), 63, 0,
(62, 0), 1)));
- Table.States (97).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (62, 0), 1)));
- Table.States (98).Action_List.Set_Capacity (7);
- Add_Action (Table.States (98), (8, 10, 14, 18, 20, 25, 39), (62,
1), 1);
- Table.States (98).Kernel := To_Vector ((0 => ((62, 1), 64, 0,
(62, 1), 1)));
- Table.States (98).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (62, 1), 1)));
- Table.States (99).Action_List.Set_Capacity (7);
- Add_Action (Table.States (99), (8, 10, 14, 18, 20, 25, 39), (62,
2), 1);
- Table.States (99).Kernel := To_Vector ((0 => ((62, 2), 65, 0,
(62, 2), 1)));
- Table.States (99).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (62, 2), 1)));
- Table.States (100).Action_List.Set_Capacity (7);
- Add_Action (Table.States (100), (8, 10, 14, 18, 20, 25, 39), (53,
0), 1);
- Table.States (100).Kernel := To_Vector ((0 => ((53, 0), 69, 0,
(53, 0), 1)));
- Table.States (100).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (53, 0), 1)));
- Table.States (101).Action_List.Set_Capacity (7);
- Add_Action (Table.States (101), (8, 10, 14, 18, 20, 25, 39), (53,
1), 1);
- Table.States (101).Kernel := To_Vector ((0 => ((53, 1), 74, 0,
(53, 1), 1)));
- Table.States (101).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (53, 1), 1)));
- Table.States (102).Action_List.Set_Capacity (1);
- Add_Action (Table.States (102), 23, (46, 1), 118);
- Table.States (102).Kernel := To_Vector ((0 => ((46, 1), 40, 1,
(32767, 0), 0)));
- Table.States (102).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (46, 1), 23, 118)));
- Table.States (103).Action_List.Set_Capacity (3);
- Add_Action (Table.States (103), (29, 32, 36), (46, 1), 6);
- Table.States (103).Kernel := To_Vector ((0 => ((46, 1), 23, 0,
(46, 1), 6)));
- Table.States (103).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (46, 1), 6)));
- end Subr_2;
- procedure Subr_3
- is begin
- Table.States (104).Action_List.Set_Capacity (7);
- Add_Action (Table.States (104), 8, (47, 0), 85);
- Add_Action (Table.States (104), 10, Reduce, (55, 0), 0);
- Add_Action (Table.States (104), 14, (44, 0), 86);
- Add_Action (Table.States (104), 18, (69, 4), 87);
- Add_Action (Table.States (104), 20, (63, 0), 88);
- Add_Action (Table.States (104), 25, (74, 0), 89);
- Add_Action (Table.States (104), 39, (69, 0), 90);
- Table.States (104).Goto_List.Set_Capacity (11);
- Add_Goto (Table.States (104), 44, 91);
- Add_Goto (Table.States (104), 47, 92);
- Add_Goto (Table.States (104), 53, 93);
- Add_Goto (Table.States (104), 54, 94);
- Add_Goto (Table.States (104), 55, 119);
- Add_Goto (Table.States (104), 62, 96);
- Add_Goto (Table.States (104), 63, 97);
- Add_Goto (Table.States (104), 64, 98);
- Add_Goto (Table.States (104), 65, 99);
- Add_Goto (Table.States (104), 69, 100);
- Add_Goto (Table.States (104), 74, 101);
- Table.States (104).Kernel := To_Vector ((0 => ((67, 0), 15, 2,
(32767, 0), 0)));
- Table.States (104).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (55, 0), 0)));
- Table.States (105).Action_List.Set_Capacity (2);
- Add_Action (Table.States (105), (15, 33), (60, 1), 1);
- Table.States (105).Kernel := To_Vector ((0 => ((60, 1), 39, 0,
(60, 1), 1)));
- Table.States (105).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (60, 1), 1)));
- Table.States (106).Action_List.Set_Capacity (2);
- Add_Action (Table.States (106), (15, 33), (61, 0), 1);
- Table.States (106).Kernel := To_Vector ((0 => ((61, 0), 60, 0,
(61, 0), 1)));
- Table.States (106).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (61, 0), 1)));
- Table.States (107).Action_List.Set_Capacity (2);
- Add_Action (Table.States (107), 15, (47, 0), 120);
- Add_Action (Table.States (107), 33, (61, 1), 121);
- Table.States (107).Kernel := To_Vector ((((47, 0), 61, 4,
(32767, 0), 0), ((61, 1), 61, 2, (32767, 0),
- 0)));
- Table.States (107).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (47, 0), 15, 120)));
- Table.States (108).Action_List.Set_Capacity (1);
- Add_Action (Table.States (108), 16, (44, 3), 122);
- Table.States (108).Kernel := To_Vector ((0 => ((44, 3), 12, 5,
(32767, 0), 0)));
- Table.States (108).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 3), 16, 122)));
- Table.States (109).Action_List.Set_Capacity (2);
- Add_Action (Table.States (109), 16, (44, 1), 123);
- Add_Action (Table.States (109), 26, (44, 0), 124);
- Table.States (109).Kernel := To_Vector ((((44, 0), 39, 2,
(32767, 0), 0), ((44, 1), 39, 4, (32767, 0),
- 0), ((44, 2), 39, 6, (32767, 0), 0)));
- Table.States (109).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 0), 26, 124)));
- Table.States (110).Action_List.Set_Capacity (7);
- Add_Action (Table.States (110), (8, 10, 14, 18, 20, 25, 39), (69,
4), 2);
- Table.States (110).Kernel := To_Vector ((0 => ((69, 4), 36, 0,
(69, 4), 2)));
- Table.States (110).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (69, 4), 2)));
- Table.States (111).Action_List.Set_Capacity (3);
- Add_Action (Table.States (111), (11, 15, 22), (60, 1), 1);
- Table.States (111).Kernel := To_Vector ((0 => ((60, 1), 39, 0,
(60, 1), 1)));
- Table.States (111).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (60, 1), 1)));
- Table.States (112).Action_List.Set_Capacity (3);
- Add_Action (Table.States (112), 11, (64, 0), 125);
- Add_Action (Table.States (112), 15, (63, 0), 126);
- Add_Action (Table.States (112), 22, (65, 0), 127);
- Table.States (112).Kernel := To_Vector ((((63, 0), 60, 3,
(32767, 0), 0), ((64, 0), 60, 4, (32767, 0),
- 0), ((65, 0), 60, 2, (32767, 0), 0)));
- Table.States (112).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (65, 0), 22, 127)));
- Table.States (113).Action_List.Set_Capacity (1);
- Add_Action (Table.States (113), 15, (74, 0), 128);
- Table.States (113).Kernel := To_Vector ((0 => ((74, 0), 39, 4,
(32767, 0), 0)));
- Table.States (113).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (74, 0), 15, 128)));
- Table.States (114).Action_List.Set_Capacity (1);
- Add_Action (Table.States (114), 39, (69, 1), 129);
- Table.States (114).Kernel := To_Vector ((0 => ((69, 1), 30, 3,
(32767, 0), 0)));
- Table.States (114).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (69, 1), 39, 129)));
- Table.States (115).Action_List.Set_Capacity (10);
- Add_Action (Table.States (115), 12, (59, 0), 130);
- Add_Action (Table.States (115), 13, (59, 1), 131);
- Add_Action (Table.States (115), 16, (43, 0), 132);
- Add_Action (Table.States (115), 21, (45, 0), 9);
- Add_Action (Table.States (115), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (115), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (115), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (115), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (115), 39, (60, 1), 133);
- Add_Action (Table.States (115), 40, (71, 0), 134);
- Table.States (115).Goto_List.Set_Capacity (9);
- Add_Goto (Table.States (115), 43, 135);
- Add_Goto (Table.States (115), 45, 136);
- Add_Goto (Table.States (115), 46, 137);
- Add_Goto (Table.States (115), 58, 138);
- Add_Goto (Table.States (115), 59, 139);
- Add_Goto (Table.States (115), 60, 140);
- Add_Goto (Table.States (115), 61, 141);
- Add_Goto (Table.States (115), 71, 142);
- Add_Goto (Table.States (115), 73, 143);
- Table.States (115).Kernel := To_Vector ((0 => ((69, 0), 31, 1,
(32767, 0), 0)));
- Table.States (115).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (58, 0), 0)));
- Table.States (116).Action_List.Set_Capacity (7);
- Add_Action (Table.States (116), (8, 10, 14, 18, 20, 25, 39), (54,
1), 2);
- Table.States (116).Kernel := To_Vector ((0 => ((54, 1), 53, 0,
(54, 1), 2)));
- Table.States (116).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (54, 1), 2)));
- Table.States (117).Action_List.Set_Capacity (2);
- Add_Action (Table.States (117), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (117), 39, (60, 1), 144);
- Table.States (117).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (117), 60, 145);
- Table.States (117).Kernel := To_Vector ((0 => ((70, 0), 10, 1,
(32767, 0), 0)));
- Table.States (117).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (60, 0), 0)));
- Table.States (118).Action_List.Set_Capacity (3);
- Add_Action (Table.States (118), (23, 29, 32), (46, 1), 6);
- Table.States (118).Kernel := To_Vector ((0 => ((46, 1), 23, 0,
(46, 1), 6)));
- Table.States (118).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (46, 1), 6)));
- Table.States (119).Action_List.Set_Capacity (1);
- Add_Action (Table.States (119), 10, (67, 0), 146);
- Table.States (119).Kernel := To_Vector ((0 => ((67, 0), 55, 2,
(32767, 0), 0)));
- Table.States (119).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (67, 0), 10, 146)));
- Table.States (120).Action_List.Set_Capacity (2);
- Add_Action (Table.States (120), 10, Reduce, (49, 0), 0);
- Add_Action (Table.States (120), 27, (48, 0), 147);
- Add_Conflict (Table.States (120), 27, (49, 0), 0);
- Table.States (120).Goto_List.Set_Capacity (2);
- Add_Goto (Table.States (120), 48, 148);
- Add_Goto (Table.States (120), 49, 149);
- Table.States (120).Kernel := To_Vector ((0 => ((47, 0), 15, 3,
(32767, 0), 0)));
- Table.States (120).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (49, 0), 0)));
- Table.States (121).Action_List.Set_Capacity (1);
- Add_Action (Table.States (121), 39, (61, 1), 150);
- Table.States (121).Kernel := To_Vector ((0 => ((61, 1), 33, 1,
(32767, 0), 0)));
- Table.States (121).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (61, 1), 39, 150)));
- Table.States (122).Action_List.Set_Capacity (1);
- Add_Action (Table.States (122), 40, (44, 3), 151);
- Table.States (122).Kernel := To_Vector ((0 => ((44, 3), 16, 4,
(32767, 0), 0)));
- Table.States (122).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 3), 40, 151)));
- Table.States (123).Action_List.Set_Capacity (3);
- Add_Action (Table.States (123), 19, (56, 2), 152);
- Add_Action (Table.States (123), 23, Reduce, (56, 0), 0);
- Add_Action (Table.States (123), 40, (56, 1), 153);
- Table.States (123).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (123), 56, 154);
- Table.States (123).Kernel := To_Vector ((((44, 1), 16, 3,
(32767, 0), 0), ((44, 2), 16, 5, (32767, 0),
- 0)));
- Table.States (123).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (56, 0), 0)));
- Table.States (124).Action_List.Set_Capacity (10);
- Add_Action (Table.States (124), 12, (59, 0), 130);
- Add_Action (Table.States (124), 13, (59, 1), 131);
- Add_Action (Table.States (124), 16, (43, 0), 132);
- Add_Action (Table.States (124), 21, (45, 0), 9);
- Add_Action (Table.States (124), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (124), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (124), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (124), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (124), 39, (60, 1), 133);
- Add_Action (Table.States (124), 40, (71, 0), 134);
- Table.States (124).Goto_List.Set_Capacity (9);
- Add_Goto (Table.States (124), 43, 135);
- Add_Goto (Table.States (124), 45, 136);
- Add_Goto (Table.States (124), 46, 137);
- Add_Goto (Table.States (124), 58, 155);
- Add_Goto (Table.States (124), 59, 139);
- Add_Goto (Table.States (124), 60, 140);
- Add_Goto (Table.States (124), 61, 141);
- Add_Goto (Table.States (124), 71, 142);
- Add_Goto (Table.States (124), 73, 143);
- Table.States (124).Kernel := To_Vector ((0 => ((44, 0), 26, 1,
(32767, 0), 0)));
- Table.States (124).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (58, 0), 0)));
- Table.States (125).Action_List.Set_Capacity (3);
- Add_Action (Table.States (125), 15, Reduce, (60, 0), 0);
- Add_Action (Table.States (125), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (125), 39, (60, 1), 105);
- Table.States (125).Goto_List.Set_Capacity (2);
- Add_Goto (Table.States (125), 60, 106);
- Add_Goto (Table.States (125), 61, 156);
- Table.States (125).Kernel := To_Vector ((0 => ((64, 0), 11, 3,
(32767, 0), 0)));
- Table.States (125).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (61, 0), 0)));
- Table.States (126).Action_List.Set_Capacity (7);
- Add_Action (Table.States (126), 8, (47, 0), 85);
- Add_Action (Table.States (126), 10, Reduce, (55, 0), 0);
- Add_Action (Table.States (126), 14, (44, 0), 86);
- Add_Action (Table.States (126), 18, (69, 4), 87);
- Add_Action (Table.States (126), 20, (63, 0), 88);
- Add_Action (Table.States (126), 25, (74, 0), 89);
- Add_Action (Table.States (126), 39, (69, 0), 90);
- Table.States (126).Goto_List.Set_Capacity (11);
- Add_Goto (Table.States (126), 44, 91);
- Add_Goto (Table.States (126), 47, 92);
- Add_Goto (Table.States (126), 53, 93);
- Add_Goto (Table.States (126), 54, 94);
- Add_Goto (Table.States (126), 55, 157);
- Add_Goto (Table.States (126), 62, 96);
- Add_Goto (Table.States (126), 63, 97);
- Add_Goto (Table.States (126), 64, 98);
- Add_Goto (Table.States (126), 65, 99);
- Add_Goto (Table.States (126), 69, 100);
- Add_Goto (Table.States (126), 74, 101);
- Table.States (126).Kernel := To_Vector ((0 => ((63, 0), 15, 2,
(32767, 0), 0)));
- Table.States (126).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (55, 0), 0)));
- Table.States (127).Action_List.Set_Capacity (3);
- Add_Action (Table.States (127), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (127), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (127), 39, (60, 1), 158);
- Table.States (127).Goto_List.Set_Capacity (2);
- Add_Goto (Table.States (127), 60, 159);
- Add_Goto (Table.States (127), 61, 160);
- Table.States (127).Kernel := To_Vector ((0 => ((65, 0), 22, 1,
(32767, 0), 0)));
- Table.States (127).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (61, 0), 0)));
- Table.States (128).Action_List.Set_Capacity (1);
- Add_Action (Table.States (128), 16, (43, 0), 161);
- Table.States (128).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (128), 43, 162);
- Table.States (128).Kernel := To_Vector ((0 => ((74, 0), 15, 3,
(32767, 0), 0)));
- Table.States (128).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (43, 0), 16, 161)));
- Table.States (129).Action_List.Set_Capacity (1);
- Add_Action (Table.States (129), 31, (69, 1), 163);
- Table.States (129).Kernel := To_Vector ((0 => ((69, 1), 39, 2,
(32767, 0), 0)));
- Table.States (129).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (69, 1), 31, 163)));
- Table.States (130).Action_List.Set_Capacity (1);
- Add_Action (Table.States (130), 16, (43, 0), 164);
- Table.States (130).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (130), 43, 165);
- Table.States (130).Kernel := To_Vector ((0 => ((59, 0), 12, 2,
(32767, 0), 0)));
- Table.States (130).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (43, 0), 16, 164)));
- Table.States (131).Action_List.Set_Capacity (1);
- Add_Action (Table.States (131), 16, (43, 0), 164);
- Table.States (131).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (131), 43, 166);
- Table.States (131).Kernel := To_Vector ((0 => ((59, 1), 13, 2,
(32767, 0), 0)));
- Table.States (131).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (43, 0), 16, 164)));
- Table.States (132).Action_List.Set_Capacity (11);
- Add_Action (Table.States (132), 12, (59, 0), 32);
- Add_Action (Table.States (132), 13, (59, 1), 33);
- Add_Action (Table.States (132), 16, (43, 0), 34);
- Add_Action (Table.States (132), 21, (45, 0), 9);
- Add_Action (Table.States (132), 23, (73, 1), 167);
- Add_Conflict (Table.States (132), 23, (60, 0), 0);
- Add_Action (Table.States (132), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (132), 32, Reduce, (60, 0), 0);
- Add_Action (Table.States (132), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (132), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (132), 39, (60, 1), 36);
- Add_Action (Table.States (132), 40, (71, 0), 37);
- Table.States (132).Goto_List.Set_Capacity (10);
- Add_Goto (Table.States (132), 43, 38);
- Add_Goto (Table.States (132), 45, 39);
- Add_Goto (Table.States (132), 46, 40);
- Add_Goto (Table.States (132), 58, 41);
- Add_Goto (Table.States (132), 59, 42);
- Add_Goto (Table.States (132), 60, 43);
- Add_Goto (Table.States (132), 61, 44);
- Add_Goto (Table.States (132), 71, 45);
- Add_Goto (Table.States (132), 72, 168);
- Add_Goto (Table.States (132), 73, 47);
- Table.States (132).Kernel := To_Vector ((((43, 0), 16, 1,
(32767, 0), 0), ((73, 1), 16, 1, (32767, 0),
- 0)));
- Table.States (132).Minimal_Complete_Actions := To_Vector
(((Reduce, (72, 0), 0), (Shift, (73, 1), 23,
- 167)));
- Table.States (133).Action_List.Set_Capacity (4);
- Add_Action (Table.States (133), (29, 33, 35, 36), (60, 1), 1);
- Table.States (133).Kernel := To_Vector ((0 => ((60, 1), 39, 0,
(60, 1), 1)));
- Table.States (133).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (60, 1), 1)));
- Table.States (134).Action_List.Set_Capacity (2);
- Add_Action (Table.States (134), (29, 36), (71, 0), 1);
- Table.States (134).Kernel := To_Vector ((0 => ((71, 0), 40, 0,
(71, 0), 1)));
- Table.States (134).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (71, 0), 1)));
- Table.States (135).Action_List.Set_Capacity (2);
- Add_Action (Table.States (135), (29, 36), (73, 2), 1);
- Table.States (135).Kernel := To_Vector ((0 => ((73, 2), 43, 0,
(73, 2), 1)));
- Table.States (135).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (73, 2), 1)));
- Table.States (136).Action_List.Set_Capacity (1);
- Add_Action (Table.States (136), 35, (46, 0), 169);
- Table.States (136).Kernel := To_Vector ((((46, 0), 45, 2,
(32767, 0), 0), ((46, 1), 45, 5, (32767, 0),
- 0)));
- Table.States (136).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (46, 0), 35, 169)));
- Table.States (137).Action_List.Set_Capacity (2);
- Add_Action (Table.States (137), (29, 36), (71, 3), 1);
- Table.States (137).Kernel := To_Vector ((0 => ((71, 3), 46, 0,
(71, 3), 1)));
- Table.States (137).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (71, 3), 1)));
- Table.States (138).Action_List.Set_Capacity (2);
- Add_Action (Table.States (138), 29, (58, 1), 170);
- Add_Action (Table.States (138), 36, (69, 0), 171);
- Table.States (138).Kernel := To_Vector ((((58, 1), 58, 1,
(32767, 0), 0), ((69, 0), 58, 1, (32767, 0),
- 0)));
- Table.States (138).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (69, 0), 36, 171)));
- Table.States (139).Action_List.Set_Capacity (2);
- Add_Action (Table.States (139), (29, 36), (71, 2), 1);
- Table.States (139).Kernel := To_Vector ((0 => ((71, 2), 59, 0,
(71, 2), 1)));
- Table.States (139).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (71, 2), 1)));
- Table.States (140).Action_List.Set_Capacity (4);
- Add_Action (Table.States (140), (29, 33, 35, 36), (61, 0), 1);
- Table.States (140).Kernel := To_Vector ((0 => ((61, 0), 60, 0,
(61, 0), 1)));
- Table.States (140).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (61, 0), 1)));
- Table.States (141).Action_List.Set_Capacity (4);
- Add_Action (Table.States (141), 29, Reduce, (71, 1), 1);
- Add_Action (Table.States (141), 33, (61, 1), 172);
- Add_Action (Table.States (141), 35, Reduce, (45, 1), 1);
- Add_Action (Table.States (141), 36, Reduce, (71, 1), 1);
- Table.States (141).Kernel := To_Vector ((((45, 1), 61, 0, (45,
1), 1), ((61, 1), 61, 2, (32767, 0),
- 0), ((71, 1), 61, 0, (71, 1), 1)));
- Table.States (141).Minimal_Complete_Actions := To_Vector
(((Reduce, (45, 1), 1), (Reduce, (71, 1), 1)));
- Table.States (142).Action_List.Set_Capacity (2);
- Add_Action (Table.States (142), (29, 36), (73, 0), 1);
- Table.States (142).Kernel := To_Vector ((0 => ((73, 0), 71, 0,
(73, 0), 1)));
- Table.States (142).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (73, 0), 1)));
- Table.States (143).Action_List.Set_Capacity (2);
- Add_Action (Table.States (143), (29, 36), (58, 0), 1);
- Table.States (143).Kernel := To_Vector ((0 => ((58, 0), 73, 0,
(58, 0), 1)));
- Table.States (143).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (58, 0), 1)));
- Table.States (144).Action_List.Set_Capacity (1);
- Add_Action (Table.States (144), (1 => 36), (60, 1), 1);
- Table.States (144).Kernel := To_Vector ((0 => ((60, 1), 39, 0,
(60, 1), 1)));
- Table.States (144).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (60, 1), 1)));
- Table.States (145).Action_List.Set_Capacity (1);
- Add_Action (Table.States (145), 36, (70, 0), 173);
- Table.States (145).Kernel := To_Vector ((0 => ((70, 0), 60, 1,
(32767, 0), 0)));
- Table.States (145).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (70, 0), 36, 173)));
- Table.States (146).Action_List.Set_Capacity (2);
- Add_Action (Table.States (146), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (146), 39, (60, 1), 144);
- Table.States (146).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (146), 60, 174);
- Table.States (146).Kernel := To_Vector ((0 => ((67, 0), 10, 1,
(32767, 0), 0)));
- Table.States (146).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (60, 0), 0)));
- Table.States (147).Action_List.Set_Capacity (4);
- Add_Action (Table.States (147), 19, (56, 2), 175);
- Add_Action (Table.States (147), 34, Reduce, (56, 0), 0);
- Add_Action (Table.States (147), 37, Reduce, (56, 0), 0);
- Add_Action (Table.States (147), 40, (56, 1), 176);
- Table.States (147).Goto_List.Set_Capacity (2);
- Add_Goto (Table.States (147), 56, 177);
- Add_Goto (Table.States (147), 57, 178);
- Table.States (147).Kernel := To_Vector ((0 => ((48, 0), 27, 1,
(32767, 0), 0)));
- Table.States (147).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (57, 0), 0)));
- Table.States (148).Action_List.Set_Capacity (2);
- Add_Action (Table.States (148), (10, 27), (49, 1), 1);
- Table.States (148).Kernel := To_Vector ((0 => ((49, 1), 48, 0,
(49, 1), 1)));
- Table.States (148).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (49, 1), 1)));
- Table.States (149).Action_List.Set_Capacity (2);
- Add_Action (Table.States (149), 10, (47, 0), 179);
- Add_Action (Table.States (149), 27, (48, 0), 147);
- Table.States (149).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (149), 48, 180);
- Table.States (149).Kernel := To_Vector ((((47, 0), 49, 3,
(32767, 0), 0), ((49, 2), 49, 2, (32767, 0),
- 0)));
- Table.States (149).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (47, 0), 10, 179)));
- Table.States (150).Action_List.Set_Capacity (2);
- Add_Action (Table.States (150), (15, 33), (61, 1), 3);
- Table.States (150).Kernel := To_Vector ((0 => ((61, 1), 39, 0,
(61, 1), 3)));
- Table.States (150).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (61, 1), 3)));
- Table.States (151).Action_List.Set_Capacity (1);
- Add_Action (Table.States (151), 23, (44, 3), 181);
- Table.States (151).Kernel := To_Vector ((0 => ((44, 3), 40, 3,
(32767, 0), 0)));
- Table.States (151).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 3), 23, 181)));
- Table.States (152).Action_List.Set_Capacity (1);
- Add_Action (Table.States (152), (1 => 23), (56, 2), 1);
- Table.States (152).Kernel := To_Vector ((0 => ((56, 2), 19, 0,
(56, 2), 1)));
- Table.States (152).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (56, 2), 1)));
- Table.States (153).Action_List.Set_Capacity (1);
- Add_Action (Table.States (153), (1 => 23), (56, 1), 1);
- Table.States (153).Kernel := To_Vector ((0 => ((56, 1), 40, 0,
(56, 1), 1)));
- Table.States (153).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (56, 1), 1)));
- Table.States (154).Action_List.Set_Capacity (1);
- Add_Action (Table.States (154), 23, (44, 1), 182);
- Table.States (154).Kernel := To_Vector ((((44, 1), 56, 3,
(32767, 0), 0), ((44, 2), 56, 5, (32767, 0),
- 0)));
- Table.States (154).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 1), 23, 182)));
- Table.States (155).Action_List.Set_Capacity (2);
- Add_Action (Table.States (155), 29, (58, 1), 170);
- Add_Action (Table.States (155), 36, (44, 0), 183);
- Table.States (155).Kernel := To_Vector ((((44, 0), 58, 1,
(32767, 0), 0), ((58, 1), 58, 1, (32767, 0),
- 0)));
- Table.States (155).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 0), 36, 183)));
- Table.States (156).Action_List.Set_Capacity (2);
- Add_Action (Table.States (156), 15, (64, 0), 184);
- Add_Action (Table.States (156), 33, (61, 1), 121);
- Table.States (156).Kernel := To_Vector ((((61, 1), 61, 2,
(32767, 0), 0), ((64, 0), 61, 3, (32767, 0),
- 0)));
- Table.States (156).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (64, 0), 15, 184)));
- Table.States (157).Action_List.Set_Capacity (1);
- Add_Action (Table.States (157), 10, (63, 0), 185);
- Table.States (157).Kernel := To_Vector ((0 => ((63, 0), 55, 2,
(32767, 0), 0)));
- Table.States (157).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (63, 0), 10, 185)));
- Table.States (158).Action_List.Set_Capacity (2);
- Add_Action (Table.States (158), (33, 36), (60, 1), 1);
- Table.States (158).Kernel := To_Vector ((0 => ((60, 1), 39, 0,
(60, 1), 1)));
- Table.States (158).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (60, 1), 1)));
- end Subr_3;
- procedure Subr_4
- is begin
- Table.States (159).Action_List.Set_Capacity (2);
- Add_Action (Table.States (159), (33, 36), (61, 0), 1);
- Table.States (159).Kernel := To_Vector ((0 => ((61, 0), 60, 0,
(61, 0), 1)));
- Table.States (159).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (61, 0), 1)));
- Table.States (160).Action_List.Set_Capacity (2);
- Add_Action (Table.States (160), 33, (61, 1), 186);
- Add_Action (Table.States (160), 36, (65, 0), 187);
- Table.States (160).Kernel := To_Vector ((((61, 1), 61, 2,
(32767, 0), 0), ((65, 0), 61, 1, (32767, 0),
- 0)));
- Table.States (160).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (65, 0), 36, 187)));
- Table.States (161).Action_List.Set_Capacity (11);
- Add_Action (Table.States (161), 12, (59, 0), 32);
- Add_Action (Table.States (161), 13, (59, 1), 33);
- Add_Action (Table.States (161), 16, (43, 0), 34);
- Add_Action (Table.States (161), 21, (45, 0), 9);
- Add_Action (Table.States (161), 23, Reduce, (60, 0), 0);
- Add_Action (Table.States (161), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (161), 32, Reduce, (60, 0), 0);
- Add_Action (Table.States (161), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (161), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (161), 39, (60, 1), 36);
- Add_Action (Table.States (161), 40, (71, 0), 37);
- Table.States (161).Goto_List.Set_Capacity (10);
- Add_Goto (Table.States (161), 43, 38);
- Add_Goto (Table.States (161), 45, 39);
- Add_Goto (Table.States (161), 46, 40);
- Add_Goto (Table.States (161), 58, 41);
- Add_Goto (Table.States (161), 59, 42);
- Add_Goto (Table.States (161), 60, 43);
- Add_Goto (Table.States (161), 61, 44);
- Add_Goto (Table.States (161), 71, 45);
- Add_Goto (Table.States (161), 72, 188);
- Add_Goto (Table.States (161), 73, 47);
- Table.States (161).Kernel := To_Vector ((0 => ((43, 0), 16, 1,
(32767, 0), 0)));
- Table.States (161).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (72, 0), 0)));
- Table.States (162).Action_List.Set_Capacity (1);
- Add_Action (Table.States (162), 36, (74, 0), 189);
- Table.States (162).Kernel := To_Vector ((0 => ((74, 0), 43, 1,
(32767, 0), 0)));
- Table.States (162).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (74, 0), 36, 189)));
- Table.States (163).Action_List.Set_Capacity (10);
- Add_Action (Table.States (163), 12, (59, 0), 130);
- Add_Action (Table.States (163), 13, (59, 1), 131);
- Add_Action (Table.States (163), 16, (43, 0), 132);
- Add_Action (Table.States (163), 21, (45, 0), 9);
- Add_Action (Table.States (163), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (163), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (163), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (163), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (163), 39, (60, 1), 133);
- Add_Action (Table.States (163), 40, (71, 0), 134);
- Table.States (163).Goto_List.Set_Capacity (9);
- Add_Goto (Table.States (163), 43, 135);
- Add_Goto (Table.States (163), 45, 136);
- Add_Goto (Table.States (163), 46, 137);
- Add_Goto (Table.States (163), 58, 190);
- Add_Goto (Table.States (163), 59, 139);
- Add_Goto (Table.States (163), 60, 140);
- Add_Goto (Table.States (163), 61, 141);
- Add_Goto (Table.States (163), 71, 142);
- Add_Goto (Table.States (163), 73, 143);
- Table.States (163).Kernel := To_Vector ((0 => ((69, 1), 31, 1,
(32767, 0), 0)));
- Table.States (163).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (58, 0), 0)));
- Table.States (164).Action_List.Set_Capacity (11);
- Add_Action (Table.States (164), 12, (59, 0), 32);
- Add_Action (Table.States (164), 13, (59, 1), 33);
- Add_Action (Table.States (164), 16, (43, 0), 34);
- Add_Action (Table.States (164), 21, (45, 0), 9);
- Add_Action (Table.States (164), 23, Reduce, (60, 0), 0);
- Add_Action (Table.States (164), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (164), 32, Reduce, (60, 0), 0);
- Add_Action (Table.States (164), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (164), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (164), 39, (60, 1), 36);
- Add_Action (Table.States (164), 40, (71, 0), 37);
- Table.States (164).Goto_List.Set_Capacity (10);
- Add_Goto (Table.States (164), 43, 38);
- Add_Goto (Table.States (164), 45, 39);
- Add_Goto (Table.States (164), 46, 40);
- Add_Goto (Table.States (164), 58, 41);
- Add_Goto (Table.States (164), 59, 42);
- Add_Goto (Table.States (164), 60, 43);
- Add_Goto (Table.States (164), 61, 44);
- Add_Goto (Table.States (164), 71, 45);
- Add_Goto (Table.States (164), 72, 168);
- Add_Goto (Table.States (164), 73, 47);
- Table.States (164).Kernel := To_Vector ((0 => ((43, 0), 16, 1,
(32767, 0), 0)));
- Table.States (164).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (72, 0), 0)));
- Table.States (165).Action_List.Set_Capacity (2);
- Add_Action (Table.States (165), (29, 36), (59, 0), 2);
- Table.States (165).Kernel := To_Vector ((0 => ((59, 0), 43, 0,
(59, 0), 2)));
- Table.States (165).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (59, 0), 2)));
- Table.States (166).Action_List.Set_Capacity (2);
- Add_Action (Table.States (166), (29, 36), (59, 1), 2);
- Table.States (166).Kernel := To_Vector ((0 => ((59, 1), 43, 0,
(59, 1), 2)));
- Table.States (166).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (59, 1), 2)));
- Table.States (167).Action_List.Set_Capacity (2);
- Add_Action (Table.States (167), (29, 36), (73, 1), 2);
- Table.States (167).Kernel := To_Vector ((0 => ((73, 1), 23, 0,
(73, 1), 2)));
- Table.States (167).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (73, 1), 2)));
- Table.States (168).Action_List.Set_Capacity (2);
- Add_Action (Table.States (168), 23, (43, 0), 191);
- Add_Action (Table.States (168), 32, (72, 1), 67);
- Table.States (168).Kernel := To_Vector ((((43, 0), 72, 1,
(32767, 0), 0), ((72, 1), 72, 1, (32767, 0),
- 0)));
- Table.States (168).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (43, 0), 23, 191)));
- Table.States (169).Action_List.Set_Capacity (1);
- Add_Action (Table.States (169), 39, (46, 0), 192);
- Table.States (169).Kernel := To_Vector ((((46, 0), 35, 1,
(32767, 0), 0), ((46, 1), 35, 4, (32767, 0),
- 0)));
- Table.States (169).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (46, 0), 39, 192)));
- Table.States (170).Action_List.Set_Capacity (10);
- Add_Action (Table.States (170), 12, (59, 0), 130);
- Add_Action (Table.States (170), 13, (59, 1), 131);
- Add_Action (Table.States (170), 16, (43, 0), 132);
- Add_Action (Table.States (170), 21, (45, 0), 9);
- Add_Action (Table.States (170), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (170), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (170), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (170), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (170), 39, (60, 1), 133);
- Add_Action (Table.States (170), 40, (71, 0), 134);
- Table.States (170).Goto_List.Set_Capacity (8);
- Add_Goto (Table.States (170), 43, 135);
- Add_Goto (Table.States (170), 45, 136);
- Add_Goto (Table.States (170), 46, 137);
- Add_Goto (Table.States (170), 59, 139);
- Add_Goto (Table.States (170), 60, 140);
- Add_Goto (Table.States (170), 61, 141);
- Add_Goto (Table.States (170), 71, 142);
- Add_Goto (Table.States (170), 73, 193);
- Table.States (170).Kernel := To_Vector ((0 => ((58, 1), 29, 0,
(73, 0), 0)));
- Table.States (170).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (73, 0), 0)));
- Table.States (171).Action_List.Set_Capacity (7);
- Add_Action (Table.States (171), (8, 10, 14, 18, 20, 25, 39), (69,
0), 4);
- Table.States (171).Kernel := To_Vector ((0 => ((69, 0), 36, 0,
(69, 0), 4)));
- Table.States (171).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (69, 0), 4)));
- Table.States (172).Action_List.Set_Capacity (1);
- Add_Action (Table.States (172), 39, (61, 1), 194);
- Table.States (172).Kernel := To_Vector ((0 => ((61, 1), 33, 1,
(32767, 0), 0)));
- Table.States (172).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (61, 1), 39, 194)));
- Table.States (173).Action_List.Set_Capacity (1);
- Add_Action (Table.States (173), (1 => 41), (70, 0), 7);
- Table.States (173).Kernel := To_Vector ((0 => ((70, 0), 36, 0,
(70, 0), 7)));
- Table.States (173).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (70, 0), 7)));
- Table.States (174).Action_List.Set_Capacity (1);
- Add_Action (Table.States (174), 36, (67, 0), 195);
- Table.States (174).Kernel := To_Vector ((0 => ((67, 0), 60, 1,
(32767, 0), 0)));
- Table.States (174).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (67, 0), 36, 195)));
- Table.States (175).Action_List.Set_Capacity (2);
- Add_Action (Table.States (175), (34, 37), (56, 2), 1);
- Table.States (175).Kernel := To_Vector ((0 => ((56, 2), 19, 0,
(56, 2), 1)));
- Table.States (175).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (56, 2), 1)));
- Table.States (176).Action_List.Set_Capacity (2);
- Add_Action (Table.States (176), (34, 37), (56, 1), 1);
- Table.States (176).Kernel := To_Vector ((0 => ((56, 1), 40, 0,
(56, 1), 1)));
- Table.States (176).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (56, 1), 1)));
- Table.States (177).Action_List.Set_Capacity (2);
- Add_Action (Table.States (177), (34, 37), (57, 0), 1);
- Table.States (177).Kernel := To_Vector ((0 => ((57, 0), 56, 0,
(57, 0), 1)));
- Table.States (177).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (57, 0), 1)));
- Table.States (178).Action_List.Set_Capacity (2);
- Add_Action (Table.States (178), 34, (48, 0), 196);
- Add_Action (Table.States (178), 37, (57, 1), 197);
- Table.States (178).Kernel := To_Vector ((((48, 0), 57, 1,
(32767, 0), 0), ((57, 1), 57, 1, (32767, 0),
- 0)));
- Table.States (178).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (48, 0), 34, 196)));
- Table.States (179).Action_List.Set_Capacity (1);
- Add_Action (Table.States (179), 8, (47, 0), 198);
- Table.States (179).Kernel := To_Vector ((0 => ((47, 0), 10, 2,
(32767, 0), 0)));
- Table.States (179).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (47, 0), 8, 198)));
- Table.States (180).Action_List.Set_Capacity (2);
- Add_Action (Table.States (180), (10, 27), (49, 2), 2);
- Table.States (180).Kernel := To_Vector ((0 => ((49, 2), 48, 0,
(49, 2), 2)));
- Table.States (180).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (49, 2), 2)));
- Table.States (181).Action_List.Set_Capacity (1);
- Add_Action (Table.States (181), 26, (44, 3), 199);
- Table.States (181).Kernel := To_Vector ((0 => ((44, 3), 23, 2,
(32767, 0), 0)));
- Table.States (181).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 3), 26, 199)));
- Table.States (182).Action_List.Set_Capacity (1);
- Add_Action (Table.States (182), 26, (44, 1), 200);
- Table.States (182).Kernel := To_Vector ((((44, 1), 23, 2,
(32767, 0), 0), ((44, 2), 23, 4, (32767, 0),
- 0)));
- Table.States (182).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 1), 26, 200)));
- Table.States (183).Action_List.Set_Capacity (7);
- Add_Action (Table.States (183), (8, 10, 14, 18, 20, 25, 39), (44,
0), 5);
- Table.States (183).Kernel := To_Vector ((0 => ((44, 0), 36, 0,
(44, 0), 5)));
- Table.States (183).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (44, 0), 5)));
- Table.States (184).Action_List.Set_Capacity (7);
- Add_Action (Table.States (184), 8, (47, 0), 85);
- Add_Action (Table.States (184), 10, Reduce, (55, 0), 0);
- Add_Action (Table.States (184), 14, (44, 0), 86);
- Add_Action (Table.States (184), 18, (69, 4), 87);
- Add_Action (Table.States (184), 20, (63, 0), 88);
- Add_Action (Table.States (184), 25, (74, 0), 89);
- Add_Action (Table.States (184), 39, (69, 0), 90);
- Table.States (184).Goto_List.Set_Capacity (11);
- Add_Goto (Table.States (184), 44, 91);
- Add_Goto (Table.States (184), 47, 92);
- Add_Goto (Table.States (184), 53, 93);
- Add_Goto (Table.States (184), 54, 94);
- Add_Goto (Table.States (184), 55, 201);
- Add_Goto (Table.States (184), 62, 96);
- Add_Goto (Table.States (184), 63, 97);
- Add_Goto (Table.States (184), 64, 98);
- Add_Goto (Table.States (184), 65, 99);
- Add_Goto (Table.States (184), 69, 100);
- Add_Goto (Table.States (184), 74, 101);
- Table.States (184).Kernel := To_Vector ((0 => ((64, 0), 15, 2,
(32767, 0), 0)));
- Table.States (184).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (55, 0), 0)));
- Table.States (185).Action_List.Set_Capacity (2);
- Add_Action (Table.States (185), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (185), 39, (60, 1), 144);
- Table.States (185).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (185), 60, 202);
- Table.States (185).Kernel := To_Vector ((0 => ((63, 0), 10, 1,
(32767, 0), 0)));
- Table.States (185).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (60, 0), 0)));
- Table.States (186).Action_List.Set_Capacity (1);
- Add_Action (Table.States (186), 39, (61, 1), 203);
- Table.States (186).Kernel := To_Vector ((0 => ((61, 1), 33, 1,
(32767, 0), 0)));
- Table.States (186).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (61, 1), 39, 203)));
- Table.States (187).Action_List.Set_Capacity (7);
- Add_Action (Table.States (187), (8, 10, 14, 18, 20, 25, 39), (65,
0), 5);
- Table.States (187).Kernel := To_Vector ((0 => ((65, 0), 36, 0,
(65, 0), 5)));
- Table.States (187).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (65, 0), 5)));
- Table.States (188).Action_List.Set_Capacity (2);
- Add_Action (Table.States (188), 23, (43, 0), 204);
- Add_Action (Table.States (188), 32, (72, 1), 67);
- Table.States (188).Kernel := To_Vector ((((43, 0), 72, 1,
(32767, 0), 0), ((72, 1), 72, 1, (32767, 0),
- 0)));
- Table.States (188).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (43, 0), 23, 204)));
- Table.States (189).Action_List.Set_Capacity (7);
- Add_Action (Table.States (189), (8, 10, 14, 18, 20, 25, 39), (74,
0), 5);
- Table.States (189).Kernel := To_Vector ((0 => ((74, 0), 36, 0,
(74, 0), 5)));
- Table.States (189).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (74, 0), 5)));
- Table.States (190).Action_List.Set_Capacity (2);
- Add_Action (Table.States (190), 29, (58, 1), 170);
- Add_Action (Table.States (190), 36, (69, 1), 205);
- Table.States (190).Kernel := To_Vector ((((58, 1), 58, 1,
(32767, 0), 0), ((69, 1), 58, 1, (32767, 0),
- 0)));
- Table.States (190).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (69, 1), 36, 205)));
- Table.States (191).Action_List.Set_Capacity (2);
- Add_Action (Table.States (191), (29, 36), (43, 0), 3);
- Table.States (191).Kernel := To_Vector ((0 => ((43, 0), 23, 0,
(43, 0), 3)));
- Table.States (191).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (43, 0), 3)));
- Table.States (192).Action_List.Set_Capacity (3);
- Add_Action (Table.States (192), 16, (46, 1), 206);
- Add_Action (Table.States (192), 29, Reduce, (46, 0), 3);
- Add_Action (Table.States (192), 36, Reduce, (46, 0), 3);
- Table.States (192).Kernel := To_Vector ((((46, 0), 39, 0, (46,
0), 3), ((46, 1), 39, 3, (32767, 0),
- 0)));
- Table.States (192).Minimal_Complete_Actions := To_Vector
(((Reduce, (46, 0), 3), (Shift, (46, 1), 16,
- 206)));
- Table.States (193).Action_List.Set_Capacity (2);
- Add_Action (Table.States (193), (29, 36), (58, 1), 3);
- Table.States (193).Kernel := To_Vector ((0 => ((58, 1), 73, 0,
(58, 1), 3)));
- Table.States (193).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (58, 1), 3)));
- Table.States (194).Action_List.Set_Capacity (4);
- Add_Action (Table.States (194), (29, 33, 35, 36), (61, 1), 3);
- Table.States (194).Kernel := To_Vector ((0 => ((61, 1), 39, 0,
(61, 1), 3)));
- Table.States (194).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (61, 1), 3)));
- Table.States (195).Action_List.Set_Capacity (1);
- Add_Action (Table.States (195), (1 => 41), (67, 0), 9);
- Table.States (195).Kernel := To_Vector ((0 => ((67, 0), 36, 0,
(67, 0), 9)));
- Table.States (195).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (67, 0), 9)));
- Table.States (196).Action_List.Set_Capacity (8);
- Add_Action (Table.States (196), 8, (47, 0), 207);
- Add_Action (Table.States (196), 10, Reduce, (55, 0), 0);
- Add_Action (Table.States (196), 14, (44, 0), 208);
- Add_Action (Table.States (196), 18, (69, 4), 209);
- Add_Action (Table.States (196), 20, (63, 0), 210);
- Add_Action (Table.States (196), 25, (74, 0), 211);
- Add_Action (Table.States (196), 27, Reduce, (55, 0), 0);
- Add_Action (Table.States (196), 39, (69, 0), 212);
- Table.States (196).Goto_List.Set_Capacity (11);
- Add_Goto (Table.States (196), 44, 213);
- Add_Goto (Table.States (196), 47, 214);
- Add_Goto (Table.States (196), 53, 215);
- Add_Goto (Table.States (196), 54, 216);
- Add_Goto (Table.States (196), 55, 217);
- Add_Goto (Table.States (196), 62, 218);
- Add_Goto (Table.States (196), 63, 219);
- Add_Goto (Table.States (196), 64, 220);
- Add_Goto (Table.States (196), 65, 221);
- Add_Goto (Table.States (196), 69, 222);
- Add_Goto (Table.States (196), 74, 223);
- Table.States (196).Kernel := To_Vector ((0 => ((48, 0), 34, 0,
(55, 0), 0)));
- Table.States (196).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (55, 0), 0)));
- Table.States (197).Action_List.Set_Capacity (4);
- Add_Action (Table.States (197), 19, (56, 2), 175);
- Add_Action (Table.States (197), 34, Reduce, (56, 0), 0);
- Add_Action (Table.States (197), 37, Reduce, (56, 0), 0);
- Add_Action (Table.States (197), 40, (56, 1), 176);
- Table.States (197).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (197), 56, 224);
- Table.States (197).Kernel := To_Vector ((0 => ((57, 1), 37, 0,
(56, 0), 0)));
- Table.States (197).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (56, 0), 0)));
- Table.States (198).Action_List.Set_Capacity (1);
- Add_Action (Table.States (198), 36, (47, 0), 225);
- Table.States (198).Kernel := To_Vector ((0 => ((47, 0), 8, 1,
(32767, 0), 0)));
- Table.States (198).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (47, 0), 36, 225)));
- Table.States (199).Action_List.Set_Capacity (10);
- Add_Action (Table.States (199), 12, (59, 0), 130);
- Add_Action (Table.States (199), 13, (59, 1), 131);
- Add_Action (Table.States (199), 16, (43, 0), 132);
- Add_Action (Table.States (199), 21, (45, 0), 9);
- Add_Action (Table.States (199), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (199), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (199), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (199), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (199), 39, (60, 1), 133);
- Add_Action (Table.States (199), 40, (71, 0), 134);
- Table.States (199).Goto_List.Set_Capacity (9);
- Add_Goto (Table.States (199), 43, 135);
- Add_Goto (Table.States (199), 45, 136);
- Add_Goto (Table.States (199), 46, 137);
- Add_Goto (Table.States (199), 58, 226);
- Add_Goto (Table.States (199), 59, 139);
- Add_Goto (Table.States (199), 60, 140);
- Add_Goto (Table.States (199), 61, 141);
- Add_Goto (Table.States (199), 71, 142);
- Add_Goto (Table.States (199), 73, 143);
- Table.States (199).Kernel := To_Vector ((0 => ((44, 3), 26, 1,
(32767, 0), 0)));
- Table.States (199).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (58, 0), 0)));
- Table.States (200).Action_List.Set_Capacity (11);
- Add_Action (Table.States (200), 6, Reduce, (60, 0), 0);
- Add_Action (Table.States (200), 12, (59, 0), 227);
- Add_Action (Table.States (200), 13, (59, 1), 228);
- Add_Action (Table.States (200), 16, (43, 0), 229);
- Add_Action (Table.States (200), 21, (45, 0), 9);
- Add_Action (Table.States (200), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (200), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (200), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (200), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (200), 39, (60, 1), 230);
- Add_Action (Table.States (200), 40, (71, 0), 231);
- Table.States (200).Goto_List.Set_Capacity (9);
- Add_Goto (Table.States (200), 43, 232);
- Add_Goto (Table.States (200), 45, 233);
- Add_Goto (Table.States (200), 46, 234);
- Add_Goto (Table.States (200), 58, 235);
- Add_Goto (Table.States (200), 59, 236);
- Add_Goto (Table.States (200), 60, 237);
- Add_Goto (Table.States (200), 61, 238);
- Add_Goto (Table.States (200), 71, 239);
- Add_Goto (Table.States (200), 73, 240);
- Table.States (200).Kernel := To_Vector ((((44, 1), 26, 1,
(32767, 0), 0), ((44, 2), 26, 3, (32767, 0),
- 0)));
- Table.States (200).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (58, 0), 0)));
- Table.States (201).Action_List.Set_Capacity (1);
- Add_Action (Table.States (201), 10, (64, 0), 241);
- Table.States (201).Kernel := To_Vector ((0 => ((64, 0), 55, 2,
(32767, 0), 0)));
- Table.States (201).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (64, 0), 10, 241)));
- Table.States (202).Action_List.Set_Capacity (1);
- Add_Action (Table.States (202), 36, (63, 0), 242);
- Table.States (202).Kernel := To_Vector ((0 => ((63, 0), 60, 1,
(32767, 0), 0)));
- Table.States (202).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (63, 0), 36, 242)));
- Table.States (203).Action_List.Set_Capacity (2);
- Add_Action (Table.States (203), (33, 36), (61, 1), 3);
- Table.States (203).Kernel := To_Vector ((0 => ((61, 1), 39, 0,
(61, 1), 3)));
- Table.States (203).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (61, 1), 3)));
- Table.States (204).Action_List.Set_Capacity (1);
- Add_Action (Table.States (204), (1 => 36), (43, 0), 3);
- Table.States (204).Kernel := To_Vector ((0 => ((43, 0), 23, 0,
(43, 0), 3)));
- Table.States (204).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (43, 0), 3)));
- Table.States (205).Action_List.Set_Capacity (7);
- Add_Action (Table.States (205), (8, 10, 14, 18, 20, 25, 39), (69,
1), 6);
- Table.States (205).Kernel := To_Vector ((0 => ((69, 1), 36, 0,
(69, 1), 6)));
- Table.States (205).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (69, 1), 6)));
- Table.States (206).Action_List.Set_Capacity (1);
- Add_Action (Table.States (206), 40, (46, 1), 243);
- Table.States (206).Kernel := To_Vector ((0 => ((46, 1), 16, 2,
(32767, 0), 0)));
- Table.States (206).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (46, 1), 40, 243)));
- end Subr_4;
- procedure Subr_5
- is begin
- Table.States (207).Action_List.Set_Capacity (3);
- Add_Action (Table.States (207), 15, Reduce, (60, 0), 0);
- Add_Action (Table.States (207), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (207), 39, (60, 1), 105);
- Table.States (207).Goto_List.Set_Capacity (2);
- Add_Goto (Table.States (207), 60, 106);
- Add_Goto (Table.States (207), 61, 244);
- Table.States (207).Kernel := To_Vector ((0 => ((47, 0), 8, 4,
(32767, 0), 0)));
- Table.States (207).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (61, 0), 0)));
- Table.States (208).Action_List.Set_Capacity (2);
- Add_Action (Table.States (208), 12, (44, 3), 245);
- Add_Action (Table.States (208), 39, (44, 0), 246);
- Table.States (208).Kernel := To_Vector ((((44, 0), 14, 3,
(32767, 0), 0), ((44, 1), 14, 5, (32767, 0),
- 0), ((44, 2), 14, 7, (32767, 0), 0), ((44, 3), 14, 6,
(32767, 0), 0)));
- Table.States (208).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 0), 39, 246)));
- Table.States (209).Action_List.Set_Capacity (1);
- Add_Action (Table.States (209), 36, (69, 4), 247);
- Table.States (209).Kernel := To_Vector ((0 => ((69, 4), 18, 1,
(32767, 0), 0)));
- Table.States (209).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (69, 4), 36, 247)));
- Table.States (210).Action_List.Set_Capacity (4);
- Add_Action (Table.States (210), 11, Reduce, (60, 0), 0);
- Add_Action (Table.States (210), 15, Reduce, (60, 0), 0);
- Add_Action (Table.States (210), 22, Reduce, (60, 0), 0);
- Add_Action (Table.States (210), 39, (60, 1), 111);
- Table.States (210).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (210), 60, 248);
- Table.States (210).Kernel := To_Vector ((((63, 0), 20, 3,
(32767, 0), 0), ((64, 0), 20, 4, (32767, 0),
- 0), ((65, 0), 20, 2, (32767, 0), 0)));
- Table.States (210).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (60, 0), 0)));
- Table.States (211).Action_List.Set_Capacity (1);
- Add_Action (Table.States (211), 39, (74, 0), 249);
- Table.States (211).Kernel := To_Vector ((0 => ((74, 0), 25, 5,
(32767, 0), 0)));
- Table.States (211).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (74, 0), 39, 249)));
- Table.States (212).Action_List.Set_Capacity (2);
- Add_Action (Table.States (212), 30, (69, 1), 250);
- Add_Action (Table.States (212), 31, (69, 0), 251);
- Table.States (212).Kernel := To_Vector ((((69, 0), 39, 2,
(32767, 0), 0), ((69, 1), 39, 4, (32767, 0),
- 0)));
- Table.States (212).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (69, 0), 31, 251)));
- Table.States (213).Action_List.Set_Capacity (8);
- Add_Action (Table.States (213), (8, 10, 14, 18, 20, 25, 27, 39),
(69, 2), 1);
- Table.States (213).Kernel := To_Vector ((0 => ((69, 2), 44, 0,
(69, 2), 1)));
- Table.States (213).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (69, 2), 1)));
- Table.States (214).Action_List.Set_Capacity (8);
- Add_Action (Table.States (214), (8, 10, 14, 18, 20, 25, 27, 39),
(69, 3), 1);
- Table.States (214).Kernel := To_Vector ((0 => ((69, 3), 47, 0,
(69, 3), 1)));
- Table.States (214).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (69, 3), 1)));
- Table.States (215).Action_List.Set_Capacity (8);
- Add_Action (Table.States (215), (8, 10, 14, 18, 20, 25, 27, 39),
(54, 0), 1);
- Table.States (215).Kernel := To_Vector ((0 => ((54, 0), 53, 0,
(54, 0), 1)));
- Table.States (215).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (54, 0), 1)));
- Table.States (216).Action_List.Set_Capacity (8);
- Add_Action (Table.States (216), 8, (47, 0), 207);
- Add_Action (Table.States (216), 10, Reduce, (55, 1), 1);
- Add_Action (Table.States (216), 14, (44, 0), 208);
- Add_Action (Table.States (216), 18, (69, 4), 209);
- Add_Action (Table.States (216), 20, (63, 0), 210);
- Add_Action (Table.States (216), 25, (74, 0), 211);
- Add_Action (Table.States (216), 27, Reduce, (55, 1), 1);
- Add_Action (Table.States (216), 39, (69, 0), 212);
- Table.States (216).Goto_List.Set_Capacity (9);
- Add_Goto (Table.States (216), 44, 213);
- Add_Goto (Table.States (216), 47, 214);
- Add_Goto (Table.States (216), 53, 252);
- Add_Goto (Table.States (216), 62, 218);
- Add_Goto (Table.States (216), 63, 219);
- Add_Goto (Table.States (216), 64, 220);
- Add_Goto (Table.States (216), 65, 221);
- Add_Goto (Table.States (216), 69, 222);
- Add_Goto (Table.States (216), 74, 223);
- Table.States (216).Kernel := To_Vector ((((54, 1), 54, 2,
(32767, 0), 0), ((55, 1), 54, 0, (55, 1),
- 1)));
- Table.States (216).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (55, 1), 1)));
- Table.States (217).Action_List.Set_Capacity (2);
- Add_Action (Table.States (217), (10, 27), (48, 0), 4);
- Table.States (217).Kernel := To_Vector ((0 => ((48, 0), 55, 0,
(48, 0), 4)));
- Table.States (217).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (48, 0), 4)));
- Table.States (218).Action_List.Set_Capacity (8);
- Add_Action (Table.States (218), (8, 10, 14, 18, 20, 25, 27, 39),
(53, 2), 1);
- Table.States (218).Kernel := To_Vector ((0 => ((53, 2), 62, 0,
(53, 2), 1)));
- Table.States (218).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (53, 2), 1)));
- Table.States (219).Action_List.Set_Capacity (8);
- Add_Action (Table.States (219), (8, 10, 14, 18, 20, 25, 27, 39),
(62, 0), 1);
- Table.States (219).Kernel := To_Vector ((0 => ((62, 0), 63, 0,
(62, 0), 1)));
- Table.States (219).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (62, 0), 1)));
- Table.States (220).Action_List.Set_Capacity (8);
- Add_Action (Table.States (220), (8, 10, 14, 18, 20, 25, 27, 39),
(62, 1), 1);
- Table.States (220).Kernel := To_Vector ((0 => ((62, 1), 64, 0,
(62, 1), 1)));
- Table.States (220).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (62, 1), 1)));
- Table.States (221).Action_List.Set_Capacity (8);
- Add_Action (Table.States (221), (8, 10, 14, 18, 20, 25, 27, 39),
(62, 2), 1);
- Table.States (221).Kernel := To_Vector ((0 => ((62, 2), 65, 0,
(62, 2), 1)));
- Table.States (221).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (62, 2), 1)));
- Table.States (222).Action_List.Set_Capacity (8);
- Add_Action (Table.States (222), (8, 10, 14, 18, 20, 25, 27, 39),
(53, 0), 1);
- Table.States (222).Kernel := To_Vector ((0 => ((53, 0), 69, 0,
(53, 0), 1)));
- Table.States (222).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (53, 0), 1)));
- Table.States (223).Action_List.Set_Capacity (8);
- Add_Action (Table.States (223), (8, 10, 14, 18, 20, 25, 27, 39),
(53, 1), 1);
- Table.States (223).Kernel := To_Vector ((0 => ((53, 1), 74, 0,
(53, 1), 1)));
- Table.States (223).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (53, 1), 1)));
- Table.States (224).Action_List.Set_Capacity (2);
- Add_Action (Table.States (224), (34, 37), (57, 1), 3);
- Table.States (224).Kernel := To_Vector ((0 => ((57, 1), 56, 0,
(57, 1), 3)));
- Table.States (224).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (57, 1), 3)));
- Table.States (225).Action_List.Set_Capacity (7);
- Add_Action (Table.States (225), (8, 10, 14, 18, 20, 25, 39), (47,
0), 7);
- Table.States (225).Kernel := To_Vector ((0 => ((47, 0), 36, 0,
(47, 0), 7)));
- Table.States (225).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (47, 0), 7)));
- Table.States (226).Action_List.Set_Capacity (2);
- Add_Action (Table.States (226), 29, (58, 1), 170);
- Add_Action (Table.States (226), 36, (44, 3), 253);
- Table.States (226).Kernel := To_Vector ((((44, 3), 58, 1,
(32767, 0), 0), ((58, 1), 58, 1, (32767, 0),
- 0)));
- Table.States (226).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 3), 36, 253)));
- Table.States (227).Action_List.Set_Capacity (1);
- Add_Action (Table.States (227), 16, (43, 0), 254);
- Table.States (227).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (227), 43, 255);
- Table.States (227).Kernel := To_Vector ((0 => ((59, 0), 12, 2,
(32767, 0), 0)));
- Table.States (227).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (43, 0), 16, 254)));
- Table.States (228).Action_List.Set_Capacity (1);
- Add_Action (Table.States (228), 16, (43, 0), 254);
- Table.States (228).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (228), 43, 256);
- Table.States (228).Kernel := To_Vector ((0 => ((59, 1), 13, 2,
(32767, 0), 0)));
- Table.States (228).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (43, 0), 16, 254)));
- Table.States (229).Action_List.Set_Capacity (11);
- Add_Action (Table.States (229), 12, (59, 0), 32);
- Add_Action (Table.States (229), 13, (59, 1), 33);
- Add_Action (Table.States (229), 16, (43, 0), 34);
- Add_Action (Table.States (229), 21, (45, 0), 9);
- Add_Action (Table.States (229), 23, (73, 1), 257);
- Add_Conflict (Table.States (229), 23, (60, 0), 0);
- Add_Action (Table.States (229), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (229), 32, Reduce, (60, 0), 0);
- Add_Action (Table.States (229), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (229), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (229), 39, (60, 1), 36);
- Add_Action (Table.States (229), 40, (71, 0), 37);
- Table.States (229).Goto_List.Set_Capacity (10);
- Add_Goto (Table.States (229), 43, 38);
- Add_Goto (Table.States (229), 45, 39);
- Add_Goto (Table.States (229), 46, 40);
- Add_Goto (Table.States (229), 58, 41);
- Add_Goto (Table.States (229), 59, 42);
- Add_Goto (Table.States (229), 60, 43);
- Add_Goto (Table.States (229), 61, 44);
- Add_Goto (Table.States (229), 71, 45);
- Add_Goto (Table.States (229), 72, 258);
- Add_Goto (Table.States (229), 73, 47);
- Table.States (229).Kernel := To_Vector ((((43, 0), 16, 1,
(32767, 0), 0), ((73, 1), 16, 1, (32767, 0),
- 0)));
- Table.States (229).Minimal_Complete_Actions := To_Vector
(((Reduce, (72, 0), 0), (Shift, (73, 1), 23,
- 257)));
- Table.States (230).Action_List.Set_Capacity (5);
- Add_Action (Table.States (230), (6, 29, 33, 35, 36), (60, 1), 1);
- Table.States (230).Kernel := To_Vector ((0 => ((60, 1), 39, 0,
(60, 1), 1)));
- Table.States (230).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (60, 1), 1)));
- Table.States (231).Action_List.Set_Capacity (3);
- Add_Action (Table.States (231), (6, 29, 36), (71, 0), 1);
- Table.States (231).Kernel := To_Vector ((0 => ((71, 0), 40, 0,
(71, 0), 1)));
- Table.States (231).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (71, 0), 1)));
- Table.States (232).Action_List.Set_Capacity (3);
- Add_Action (Table.States (232), (6, 29, 36), (73, 2), 1);
- Table.States (232).Kernel := To_Vector ((0 => ((73, 2), 43, 0,
(73, 2), 1)));
- Table.States (232).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (73, 2), 1)));
- Table.States (233).Action_List.Set_Capacity (1);
- Add_Action (Table.States (233), 35, (46, 0), 259);
- Table.States (233).Kernel := To_Vector ((((46, 0), 45, 2,
(32767, 0), 0), ((46, 1), 45, 5, (32767, 0),
- 0)));
- Table.States (233).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (46, 0), 35, 259)));
- Table.States (234).Action_List.Set_Capacity (3);
- Add_Action (Table.States (234), (6, 29, 36), (71, 3), 1);
- Table.States (234).Kernel := To_Vector ((0 => ((71, 3), 46, 0,
(71, 3), 1)));
- Table.States (234).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (71, 3), 1)));
- Table.States (235).Action_List.Set_Capacity (3);
- Add_Action (Table.States (235), 6, (44, 2), 260);
- Add_Action (Table.States (235), 29, (58, 1), 261);
- Add_Action (Table.States (235), 36, (44, 1), 262);
- Table.States (235).Kernel := To_Vector ((((44, 1), 58, 1,
(32767, 0), 0), ((44, 2), 58, 3, (32767, 0),
- 0), ((58, 1), 58, 1, (32767, 0), 0)));
- Table.States (235).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 1), 36, 262)));
- Table.States (236).Action_List.Set_Capacity (3);
- Add_Action (Table.States (236), (6, 29, 36), (71, 2), 1);
- Table.States (236).Kernel := To_Vector ((0 => ((71, 2), 59, 0,
(71, 2), 1)));
- Table.States (236).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (71, 2), 1)));
- Table.States (237).Action_List.Set_Capacity (5);
- Add_Action (Table.States (237), (6, 29, 33, 35, 36), (61, 0), 1);
- Table.States (237).Kernel := To_Vector ((0 => ((61, 0), 60, 0,
(61, 0), 1)));
- Table.States (237).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (61, 0), 1)));
- Table.States (238).Action_List.Set_Capacity (5);
- Add_Action (Table.States (238), 6, Reduce, (71, 1), 1);
- Add_Action (Table.States (238), 29, Reduce, (71, 1), 1);
- Add_Action (Table.States (238), 33, (61, 1), 263);
- Add_Action (Table.States (238), 35, Reduce, (45, 1), 1);
- Add_Action (Table.States (238), 36, Reduce, (71, 1), 1);
- Table.States (238).Kernel := To_Vector ((((45, 1), 61, 0, (45,
1), 1), ((61, 1), 61, 2, (32767, 0),
- 0), ((71, 1), 61, 0, (71, 1), 1)));
- Table.States (238).Minimal_Complete_Actions := To_Vector
(((Reduce, (45, 1), 1), (Reduce, (71, 1), 1)));
- Table.States (239).Action_List.Set_Capacity (3);
- Add_Action (Table.States (239), (6, 29, 36), (73, 0), 1);
- Table.States (239).Kernel := To_Vector ((0 => ((73, 0), 71, 0,
(73, 0), 1)));
- Table.States (239).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (73, 0), 1)));
- Table.States (240).Action_List.Set_Capacity (3);
- Add_Action (Table.States (240), (6, 29, 36), (58, 0), 1);
- Table.States (240).Kernel := To_Vector ((0 => ((58, 0), 73, 0,
(58, 0), 1)));
- Table.States (240).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (58, 0), 1)));
- Table.States (241).Action_List.Set_Capacity (2);
- Add_Action (Table.States (241), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (241), 39, (60, 1), 144);
- Table.States (241).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (241), 60, 264);
- Table.States (241).Kernel := To_Vector ((0 => ((64, 0), 10, 1,
(32767, 0), 0)));
- Table.States (241).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (60, 0), 0)));
- Table.States (242).Action_List.Set_Capacity (7);
- Add_Action (Table.States (242), (8, 10, 14, 18, 20, 25, 39), (63,
0), 7);
- Table.States (242).Kernel := To_Vector ((0 => ((63, 0), 36, 0,
(63, 0), 7)));
- Table.States (242).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (63, 0), 7)));
- Table.States (243).Action_List.Set_Capacity (1);
- Add_Action (Table.States (243), 23, (46, 1), 265);
- Table.States (243).Kernel := To_Vector ((0 => ((46, 1), 40, 1,
(32767, 0), 0)));
- Table.States (243).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (46, 1), 23, 265)));
- Table.States (244).Action_List.Set_Capacity (2);
- Add_Action (Table.States (244), 15, (47, 0), 266);
- Add_Action (Table.States (244), 33, (61, 1), 121);
- Table.States (244).Kernel := To_Vector ((((47, 0), 61, 4,
(32767, 0), 0), ((61, 1), 61, 2, (32767, 0),
- 0)));
- Table.States (244).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (47, 0), 15, 266)));
- Table.States (245).Action_List.Set_Capacity (1);
- Add_Action (Table.States (245), 16, (44, 3), 267);
- Table.States (245).Kernel := To_Vector ((0 => ((44, 3), 12, 5,
(32767, 0), 0)));
- Table.States (245).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 3), 16, 267)));
- Table.States (246).Action_List.Set_Capacity (2);
- Add_Action (Table.States (246), 16, (44, 1), 268);
- Add_Action (Table.States (246), 26, (44, 0), 269);
- Table.States (246).Kernel := To_Vector ((((44, 0), 39, 2,
(32767, 0), 0), ((44, 1), 39, 4, (32767, 0),
- 0), ((44, 2), 39, 6, (32767, 0), 0)));
- Table.States (246).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 0), 26, 269)));
- Table.States (247).Action_List.Set_Capacity (8);
- Add_Action (Table.States (247), (8, 10, 14, 18, 20, 25, 27, 39),
(69, 4), 2);
- Table.States (247).Kernel := To_Vector ((0 => ((69, 4), 36, 0,
(69, 4), 2)));
- Table.States (247).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (69, 4), 2)));
- Table.States (248).Action_List.Set_Capacity (3);
- Add_Action (Table.States (248), 11, (64, 0), 270);
- Add_Action (Table.States (248), 15, (63, 0), 271);
- Add_Action (Table.States (248), 22, (65, 0), 272);
- Table.States (248).Kernel := To_Vector ((((63, 0), 60, 3,
(32767, 0), 0), ((64, 0), 60, 4, (32767, 0),
- 0), ((65, 0), 60, 2, (32767, 0), 0)));
- Table.States (248).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (65, 0), 22, 272)));
- Table.States (249).Action_List.Set_Capacity (1);
- Add_Action (Table.States (249), 15, (74, 0), 273);
- Table.States (249).Kernel := To_Vector ((0 => ((74, 0), 39, 4,
(32767, 0), 0)));
- Table.States (249).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (74, 0), 15, 273)));
- Table.States (250).Action_List.Set_Capacity (1);
- Add_Action (Table.States (250), 39, (69, 1), 274);
- Table.States (250).Kernel := To_Vector ((0 => ((69, 1), 30, 3,
(32767, 0), 0)));
- Table.States (250).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (69, 1), 39, 274)));
- Table.States (251).Action_List.Set_Capacity (10);
- Add_Action (Table.States (251), 12, (59, 0), 130);
- Add_Action (Table.States (251), 13, (59, 1), 131);
- Add_Action (Table.States (251), 16, (43, 0), 132);
- Add_Action (Table.States (251), 21, (45, 0), 9);
- Add_Action (Table.States (251), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (251), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (251), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (251), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (251), 39, (60, 1), 133);
- Add_Action (Table.States (251), 40, (71, 0), 134);
- Table.States (251).Goto_List.Set_Capacity (9);
- Add_Goto (Table.States (251), 43, 135);
- Add_Goto (Table.States (251), 45, 136);
- Add_Goto (Table.States (251), 46, 137);
- Add_Goto (Table.States (251), 58, 275);
- Add_Goto (Table.States (251), 59, 139);
- Add_Goto (Table.States (251), 60, 140);
- Add_Goto (Table.States (251), 61, 141);
- Add_Goto (Table.States (251), 71, 142);
- Add_Goto (Table.States (251), 73, 143);
- Table.States (251).Kernel := To_Vector ((0 => ((69, 0), 31, 1,
(32767, 0), 0)));
- Table.States (251).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (58, 0), 0)));
- Table.States (252).Action_List.Set_Capacity (8);
- Add_Action (Table.States (252), (8, 10, 14, 18, 20, 25, 27, 39),
(54, 1), 2);
- Table.States (252).Kernel := To_Vector ((0 => ((54, 1), 53, 0,
(54, 1), 2)));
- Table.States (252).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (54, 1), 2)));
- Table.States (253).Action_List.Set_Capacity (7);
- Add_Action (Table.States (253), (8, 10, 14, 18, 20, 25, 39), (44,
3), 8);
- Table.States (253).Kernel := To_Vector ((0 => ((44, 3), 36, 0,
(44, 3), 8)));
- Table.States (253).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (44, 3), 8)));
- Table.States (254).Action_List.Set_Capacity (11);
- Add_Action (Table.States (254), 12, (59, 0), 32);
- Add_Action (Table.States (254), 13, (59, 1), 33);
- Add_Action (Table.States (254), 16, (43, 0), 34);
- Add_Action (Table.States (254), 21, (45, 0), 9);
- Add_Action (Table.States (254), 23, Reduce, (60, 0), 0);
- Add_Action (Table.States (254), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (254), 32, Reduce, (60, 0), 0);
- Add_Action (Table.States (254), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (254), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (254), 39, (60, 1), 36);
- Add_Action (Table.States (254), 40, (71, 0), 37);
- Table.States (254).Goto_List.Set_Capacity (10);
- Add_Goto (Table.States (254), 43, 38);
- Add_Goto (Table.States (254), 45, 39);
- Add_Goto (Table.States (254), 46, 40);
- Add_Goto (Table.States (254), 58, 41);
- Add_Goto (Table.States (254), 59, 42);
- Add_Goto (Table.States (254), 60, 43);
- Add_Goto (Table.States (254), 61, 44);
- Add_Goto (Table.States (254), 71, 45);
- Add_Goto (Table.States (254), 72, 258);
- Add_Goto (Table.States (254), 73, 47);
- Table.States (254).Kernel := To_Vector ((0 => ((43, 0), 16, 1,
(32767, 0), 0)));
- Table.States (254).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (72, 0), 0)));
- Table.States (255).Action_List.Set_Capacity (3);
- Add_Action (Table.States (255), (6, 29, 36), (59, 0), 2);
- Table.States (255).Kernel := To_Vector ((0 => ((59, 0), 43, 0,
(59, 0), 2)));
- Table.States (255).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (59, 0), 2)));
- Table.States (256).Action_List.Set_Capacity (3);
- Add_Action (Table.States (256), (6, 29, 36), (59, 1), 2);
- Table.States (256).Kernel := To_Vector ((0 => ((59, 1), 43, 0,
(59, 1), 2)));
- Table.States (256).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (59, 1), 2)));
- Table.States (257).Action_List.Set_Capacity (3);
- Add_Action (Table.States (257), (6, 29, 36), (73, 1), 2);
- Table.States (257).Kernel := To_Vector ((0 => ((73, 1), 23, 0,
(73, 1), 2)));
- Table.States (257).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (73, 1), 2)));
- Table.States (258).Action_List.Set_Capacity (2);
- Add_Action (Table.States (258), 23, (43, 0), 276);
- Add_Action (Table.States (258), 32, (72, 1), 67);
- Table.States (258).Kernel := To_Vector ((((43, 0), 72, 1,
(32767, 0), 0), ((72, 1), 72, 1, (32767, 0),
- 0)));
- Table.States (258).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (43, 0), 23, 276)));
- Table.States (259).Action_List.Set_Capacity (1);
- Add_Action (Table.States (259), 39, (46, 0), 277);
- Table.States (259).Kernel := To_Vector ((((46, 0), 35, 1,
(32767, 0), 0), ((46, 1), 35, 4, (32767, 0),
- 0)));
- Table.States (259).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (46, 0), 39, 277)));
- Table.States (260).Action_List.Set_Capacity (1);
- Add_Action (Table.States (260), 38, (44, 2), 278);
- Table.States (260).Kernel := To_Vector ((0 => ((44, 2), 6, 2,
(32767, 0), 0)));
- Table.States (260).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 2), 38, 278)));
- Table.States (261).Action_List.Set_Capacity (11);
- Add_Action (Table.States (261), 6, Reduce, (60, 0), 0);
- Add_Action (Table.States (261), 12, (59, 0), 227);
- Add_Action (Table.States (261), 13, (59, 1), 228);
- Add_Action (Table.States (261), 16, (43, 0), 229);
- Add_Action (Table.States (261), 21, (45, 0), 9);
- Add_Action (Table.States (261), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (261), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (261), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (261), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (261), 39, (60, 1), 230);
- Add_Action (Table.States (261), 40, (71, 0), 231);
- Table.States (261).Goto_List.Set_Capacity (8);
- Add_Goto (Table.States (261), 43, 232);
- Add_Goto (Table.States (261), 45, 233);
- Add_Goto (Table.States (261), 46, 234);
- Add_Goto (Table.States (261), 59, 236);
- Add_Goto (Table.States (261), 60, 237);
- Add_Goto (Table.States (261), 61, 238);
- Add_Goto (Table.States (261), 71, 239);
- Add_Goto (Table.States (261), 73, 279);
- Table.States (261).Kernel := To_Vector ((0 => ((58, 1), 29, 0,
(73, 0), 0)));
- Table.States (261).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (73, 0), 0)));
- Table.States (262).Action_List.Set_Capacity (7);
- Add_Action (Table.States (262), (8, 10, 14, 18, 20, 25, 39), (44,
1), 8);
- Table.States (262).Kernel := To_Vector ((0 => ((44, 1), 36, 0,
(44, 1), 8)));
- Table.States (262).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (44, 1), 8)));
- Table.States (263).Action_List.Set_Capacity (1);
- Add_Action (Table.States (263), 39, (61, 1), 280);
- Table.States (263).Kernel := To_Vector ((0 => ((61, 1), 33, 1,
(32767, 0), 0)));
- Table.States (263).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (61, 1), 39, 280)));
- Table.States (264).Action_List.Set_Capacity (1);
- Add_Action (Table.States (264), 36, (64, 0), 281);
- Table.States (264).Kernel := To_Vector ((0 => ((64, 0), 60, 1,
(32767, 0), 0)));
- Table.States (264).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (64, 0), 36, 281)));
- end Subr_5;
- procedure Subr_6
- is begin
- Table.States (265).Action_List.Set_Capacity (2);
- Add_Action (Table.States (265), (29, 36), (46, 1), 6);
- Table.States (265).Kernel := To_Vector ((0 => ((46, 1), 23, 0,
(46, 1), 6)));
- Table.States (265).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (46, 1), 6)));
- Table.States (266).Action_List.Set_Capacity (2);
- Add_Action (Table.States (266), 10, Reduce, (49, 0), 0);
- Add_Action (Table.States (266), 27, (48, 0), 147);
- Add_Conflict (Table.States (266), 27, (49, 0), 0);
- Table.States (266).Goto_List.Set_Capacity (2);
- Add_Goto (Table.States (266), 48, 148);
- Add_Goto (Table.States (266), 49, 282);
- Table.States (266).Kernel := To_Vector ((0 => ((47, 0), 15, 3,
(32767, 0), 0)));
- Table.States (266).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (49, 0), 0)));
- Table.States (267).Action_List.Set_Capacity (1);
- Add_Action (Table.States (267), 40, (44, 3), 283);
- Table.States (267).Kernel := To_Vector ((0 => ((44, 3), 16, 4,
(32767, 0), 0)));
- Table.States (267).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 3), 40, 283)));
- Table.States (268).Action_List.Set_Capacity (3);
- Add_Action (Table.States (268), 19, (56, 2), 152);
- Add_Action (Table.States (268), 23, Reduce, (56, 0), 0);
- Add_Action (Table.States (268), 40, (56, 1), 153);
- Table.States (268).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (268), 56, 284);
- Table.States (268).Kernel := To_Vector ((((44, 1), 16, 3,
(32767, 0), 0), ((44, 2), 16, 5, (32767, 0),
- 0)));
- Table.States (268).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (56, 0), 0)));
- Table.States (269).Action_List.Set_Capacity (10);
- Add_Action (Table.States (269), 12, (59, 0), 130);
- Add_Action (Table.States (269), 13, (59, 1), 131);
- Add_Action (Table.States (269), 16, (43, 0), 132);
- Add_Action (Table.States (269), 21, (45, 0), 9);
- Add_Action (Table.States (269), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (269), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (269), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (269), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (269), 39, (60, 1), 133);
- Add_Action (Table.States (269), 40, (71, 0), 134);
- Table.States (269).Goto_List.Set_Capacity (9);
- Add_Goto (Table.States (269), 43, 135);
- Add_Goto (Table.States (269), 45, 136);
- Add_Goto (Table.States (269), 46, 137);
- Add_Goto (Table.States (269), 58, 285);
- Add_Goto (Table.States (269), 59, 139);
- Add_Goto (Table.States (269), 60, 140);
- Add_Goto (Table.States (269), 61, 141);
- Add_Goto (Table.States (269), 71, 142);
- Add_Goto (Table.States (269), 73, 143);
- Table.States (269).Kernel := To_Vector ((0 => ((44, 0), 26, 1,
(32767, 0), 0)));
- Table.States (269).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (58, 0), 0)));
- Table.States (270).Action_List.Set_Capacity (3);
- Add_Action (Table.States (270), 15, Reduce, (60, 0), 0);
- Add_Action (Table.States (270), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (270), 39, (60, 1), 105);
- Table.States (270).Goto_List.Set_Capacity (2);
- Add_Goto (Table.States (270), 60, 106);
- Add_Goto (Table.States (270), 61, 286);
- Table.States (270).Kernel := To_Vector ((0 => ((64, 0), 11, 3,
(32767, 0), 0)));
- Table.States (270).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (61, 0), 0)));
- Table.States (271).Action_List.Set_Capacity (7);
- Add_Action (Table.States (271), 8, (47, 0), 85);
- Add_Action (Table.States (271), 10, Reduce, (55, 0), 0);
- Add_Action (Table.States (271), 14, (44, 0), 86);
- Add_Action (Table.States (271), 18, (69, 4), 87);
- Add_Action (Table.States (271), 20, (63, 0), 88);
- Add_Action (Table.States (271), 25, (74, 0), 89);
- Add_Action (Table.States (271), 39, (69, 0), 90);
- Table.States (271).Goto_List.Set_Capacity (11);
- Add_Goto (Table.States (271), 44, 91);
- Add_Goto (Table.States (271), 47, 92);
- Add_Goto (Table.States (271), 53, 93);
- Add_Goto (Table.States (271), 54, 94);
- Add_Goto (Table.States (271), 55, 287);
- Add_Goto (Table.States (271), 62, 96);
- Add_Goto (Table.States (271), 63, 97);
- Add_Goto (Table.States (271), 64, 98);
- Add_Goto (Table.States (271), 65, 99);
- Add_Goto (Table.States (271), 69, 100);
- Add_Goto (Table.States (271), 74, 101);
- Table.States (271).Kernel := To_Vector ((0 => ((63, 0), 15, 2,
(32767, 0), 0)));
- Table.States (271).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (55, 0), 0)));
- Table.States (272).Action_List.Set_Capacity (3);
- Add_Action (Table.States (272), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (272), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (272), 39, (60, 1), 158);
- Table.States (272).Goto_List.Set_Capacity (2);
- Add_Goto (Table.States (272), 60, 159);
- Add_Goto (Table.States (272), 61, 288);
- Table.States (272).Kernel := To_Vector ((0 => ((65, 0), 22, 1,
(32767, 0), 0)));
- Table.States (272).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (61, 0), 0)));
- Table.States (273).Action_List.Set_Capacity (1);
- Add_Action (Table.States (273), 16, (43, 0), 161);
- Table.States (273).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (273), 43, 289);
- Table.States (273).Kernel := To_Vector ((0 => ((74, 0), 15, 3,
(32767, 0), 0)));
- Table.States (273).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (43, 0), 16, 161)));
- Table.States (274).Action_List.Set_Capacity (1);
- Add_Action (Table.States (274), 31, (69, 1), 290);
- Table.States (274).Kernel := To_Vector ((0 => ((69, 1), 39, 2,
(32767, 0), 0)));
- Table.States (274).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (69, 1), 31, 290)));
- Table.States (275).Action_List.Set_Capacity (2);
- Add_Action (Table.States (275), 29, (58, 1), 170);
- Add_Action (Table.States (275), 36, (69, 0), 291);
- Table.States (275).Kernel := To_Vector ((((58, 1), 58, 1,
(32767, 0), 0), ((69, 0), 58, 1, (32767, 0),
- 0)));
- Table.States (275).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (69, 0), 36, 291)));
- Table.States (276).Action_List.Set_Capacity (3);
- Add_Action (Table.States (276), (6, 29, 36), (43, 0), 3);
- Table.States (276).Kernel := To_Vector ((0 => ((43, 0), 23, 0,
(43, 0), 3)));
- Table.States (276).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (43, 0), 3)));
- Table.States (277).Action_List.Set_Capacity (4);
- Add_Action (Table.States (277), 6, Reduce, (46, 0), 3);
- Add_Action (Table.States (277), 16, (46, 1), 292);
- Add_Action (Table.States (277), 29, Reduce, (46, 0), 3);
- Add_Action (Table.States (277), 36, Reduce, (46, 0), 3);
- Table.States (277).Kernel := To_Vector ((((46, 0), 39, 0, (46,
0), 3), ((46, 1), 39, 3, (32767, 0),
- 0)));
- Table.States (277).Minimal_Complete_Actions := To_Vector
(((Reduce, (46, 0), 3), (Shift, (46, 1), 16,
- 292)));
- Table.States (278).Action_List.Set_Capacity (1);
- Add_Action (Table.States (278), 36, (44, 2), 293);
- Table.States (278).Kernel := To_Vector ((0 => ((44, 2), 38, 1,
(32767, 0), 0)));
- Table.States (278).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 2), 36, 293)));
- Table.States (279).Action_List.Set_Capacity (3);
- Add_Action (Table.States (279), (6, 29, 36), (58, 1), 3);
- Table.States (279).Kernel := To_Vector ((0 => ((58, 1), 73, 0,
(58, 1), 3)));
- Table.States (279).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (58, 1), 3)));
- Table.States (280).Action_List.Set_Capacity (5);
- Add_Action (Table.States (280), (6, 29, 33, 35, 36), (61, 1), 3);
- Table.States (280).Kernel := To_Vector ((0 => ((61, 1), 39, 0,
(61, 1), 3)));
- Table.States (280).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (61, 1), 3)));
- Table.States (281).Action_List.Set_Capacity (7);
- Add_Action (Table.States (281), (8, 10, 14, 18, 20, 25, 39), (64,
0), 9);
- Table.States (281).Kernel := To_Vector ((0 => ((64, 0), 36, 0,
(64, 0), 9)));
- Table.States (281).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (64, 0), 9)));
- Table.States (282).Action_List.Set_Capacity (2);
- Add_Action (Table.States (282), 10, (47, 0), 294);
- Add_Action (Table.States (282), 27, (48, 0), 147);
- Table.States (282).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (282), 48, 180);
- Table.States (282).Kernel := To_Vector ((((47, 0), 49, 3,
(32767, 0), 0), ((49, 2), 49, 2, (32767, 0),
- 0)));
- Table.States (282).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (47, 0), 10, 294)));
- Table.States (283).Action_List.Set_Capacity (1);
- Add_Action (Table.States (283), 23, (44, 3), 295);
- Table.States (283).Kernel := To_Vector ((0 => ((44, 3), 40, 3,
(32767, 0), 0)));
- Table.States (283).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 3), 23, 295)));
- Table.States (284).Action_List.Set_Capacity (1);
- Add_Action (Table.States (284), 23, (44, 1), 296);
- Table.States (284).Kernel := To_Vector ((((44, 1), 56, 3,
(32767, 0), 0), ((44, 2), 56, 5, (32767, 0),
- 0)));
- Table.States (284).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 1), 23, 296)));
- Table.States (285).Action_List.Set_Capacity (2);
- Add_Action (Table.States (285), 29, (58, 1), 170);
- Add_Action (Table.States (285), 36, (44, 0), 297);
- Table.States (285).Kernel := To_Vector ((((44, 0), 58, 1,
(32767, 0), 0), ((58, 1), 58, 1, (32767, 0),
- 0)));
- Table.States (285).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 0), 36, 297)));
- Table.States (286).Action_List.Set_Capacity (2);
- Add_Action (Table.States (286), 15, (64, 0), 298);
- Add_Action (Table.States (286), 33, (61, 1), 121);
- Table.States (286).Kernel := To_Vector ((((61, 1), 61, 2,
(32767, 0), 0), ((64, 0), 61, 3, (32767, 0),
- 0)));
- Table.States (286).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (64, 0), 15, 298)));
- Table.States (287).Action_List.Set_Capacity (1);
- Add_Action (Table.States (287), 10, (63, 0), 299);
- Table.States (287).Kernel := To_Vector ((0 => ((63, 0), 55, 2,
(32767, 0), 0)));
- Table.States (287).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (63, 0), 10, 299)));
- Table.States (288).Action_List.Set_Capacity (2);
- Add_Action (Table.States (288), 33, (61, 1), 186);
- Add_Action (Table.States (288), 36, (65, 0), 300);
- Table.States (288).Kernel := To_Vector ((((61, 1), 61, 2,
(32767, 0), 0), ((65, 0), 61, 1, (32767, 0),
- 0)));
- Table.States (288).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (65, 0), 36, 300)));
- Table.States (289).Action_List.Set_Capacity (1);
- Add_Action (Table.States (289), 36, (74, 0), 301);
- Table.States (289).Kernel := To_Vector ((0 => ((74, 0), 43, 1,
(32767, 0), 0)));
- Table.States (289).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (74, 0), 36, 301)));
- Table.States (290).Action_List.Set_Capacity (10);
- Add_Action (Table.States (290), 12, (59, 0), 130);
- Add_Action (Table.States (290), 13, (59, 1), 131);
- Add_Action (Table.States (290), 16, (43, 0), 132);
- Add_Action (Table.States (290), 21, (45, 0), 9);
- Add_Action (Table.States (290), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (290), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (290), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (290), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (290), 39, (60, 1), 133);
- Add_Action (Table.States (290), 40, (71, 0), 134);
- Table.States (290).Goto_List.Set_Capacity (9);
- Add_Goto (Table.States (290), 43, 135);
- Add_Goto (Table.States (290), 45, 136);
- Add_Goto (Table.States (290), 46, 137);
- Add_Goto (Table.States (290), 58, 302);
- Add_Goto (Table.States (290), 59, 139);
- Add_Goto (Table.States (290), 60, 140);
- Add_Goto (Table.States (290), 61, 141);
- Add_Goto (Table.States (290), 71, 142);
- Add_Goto (Table.States (290), 73, 143);
- Table.States (290).Kernel := To_Vector ((0 => ((69, 1), 31, 1,
(32767, 0), 0)));
- Table.States (290).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (58, 0), 0)));
- Table.States (291).Action_List.Set_Capacity (8);
- Add_Action (Table.States (291), (8, 10, 14, 18, 20, 25, 27, 39),
(69, 0), 4);
- Table.States (291).Kernel := To_Vector ((0 => ((69, 0), 36, 0,
(69, 0), 4)));
- Table.States (291).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (69, 0), 4)));
- Table.States (292).Action_List.Set_Capacity (1);
- Add_Action (Table.States (292), 40, (46, 1), 303);
- Table.States (292).Kernel := To_Vector ((0 => ((46, 1), 16, 2,
(32767, 0), 0)));
- Table.States (292).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (46, 1), 40, 303)));
- Table.States (293).Action_List.Set_Capacity (7);
- Add_Action (Table.States (293), (8, 10, 14, 18, 20, 25, 39), (44,
2), 10);
- Table.States (293).Kernel := To_Vector ((0 => ((44, 2), 36, 0,
(44, 2), 10)));
- Table.States (293).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (44, 2), 10)));
- Table.States (294).Action_List.Set_Capacity (1);
- Add_Action (Table.States (294), 8, (47, 0), 304);
- Table.States (294).Kernel := To_Vector ((0 => ((47, 0), 10, 2,
(32767, 0), 0)));
- Table.States (294).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (47, 0), 8, 304)));
- Table.States (295).Action_List.Set_Capacity (1);
- Add_Action (Table.States (295), 26, (44, 3), 305);
- Table.States (295).Kernel := To_Vector ((0 => ((44, 3), 23, 2,
(32767, 0), 0)));
- Table.States (295).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 3), 26, 305)));
- Table.States (296).Action_List.Set_Capacity (1);
- Add_Action (Table.States (296), 26, (44, 1), 306);
- Table.States (296).Kernel := To_Vector ((((44, 1), 23, 2,
(32767, 0), 0), ((44, 2), 23, 4, (32767, 0),
- 0)));
- Table.States (296).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 1), 26, 306)));
- Table.States (297).Action_List.Set_Capacity (8);
- Add_Action (Table.States (297), (8, 10, 14, 18, 20, 25, 27, 39),
(44, 0), 5);
- Table.States (297).Kernel := To_Vector ((0 => ((44, 0), 36, 0,
(44, 0), 5)));
- Table.States (297).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (44, 0), 5)));
- Table.States (298).Action_List.Set_Capacity (7);
- Add_Action (Table.States (298), 8, (47, 0), 85);
- Add_Action (Table.States (298), 10, Reduce, (55, 0), 0);
- Add_Action (Table.States (298), 14, (44, 0), 86);
- Add_Action (Table.States (298), 18, (69, 4), 87);
- Add_Action (Table.States (298), 20, (63, 0), 88);
- Add_Action (Table.States (298), 25, (74, 0), 89);
- Add_Action (Table.States (298), 39, (69, 0), 90);
- Table.States (298).Goto_List.Set_Capacity (11);
- Add_Goto (Table.States (298), 44, 91);
- Add_Goto (Table.States (298), 47, 92);
- Add_Goto (Table.States (298), 53, 93);
- Add_Goto (Table.States (298), 54, 94);
- Add_Goto (Table.States (298), 55, 307);
- Add_Goto (Table.States (298), 62, 96);
- Add_Goto (Table.States (298), 63, 97);
- Add_Goto (Table.States (298), 64, 98);
- Add_Goto (Table.States (298), 65, 99);
- Add_Goto (Table.States (298), 69, 100);
- Add_Goto (Table.States (298), 74, 101);
- Table.States (298).Kernel := To_Vector ((0 => ((64, 0), 15, 2,
(32767, 0), 0)));
- Table.States (298).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (55, 0), 0)));
- Table.States (299).Action_List.Set_Capacity (2);
- Add_Action (Table.States (299), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (299), 39, (60, 1), 144);
- Table.States (299).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (299), 60, 308);
- Table.States (299).Kernel := To_Vector ((0 => ((63, 0), 10, 1,
(32767, 0), 0)));
- Table.States (299).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (60, 0), 0)));
- Table.States (300).Action_List.Set_Capacity (8);
- Add_Action (Table.States (300), (8, 10, 14, 18, 20, 25, 27, 39),
(65, 0), 5);
- Table.States (300).Kernel := To_Vector ((0 => ((65, 0), 36, 0,
(65, 0), 5)));
- Table.States (300).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (65, 0), 5)));
- Table.States (301).Action_List.Set_Capacity (8);
- Add_Action (Table.States (301), (8, 10, 14, 18, 20, 25, 27, 39),
(74, 0), 5);
- Table.States (301).Kernel := To_Vector ((0 => ((74, 0), 36, 0,
(74, 0), 5)));
- Table.States (301).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (74, 0), 5)));
- Table.States (302).Action_List.Set_Capacity (2);
- Add_Action (Table.States (302), 29, (58, 1), 170);
- Add_Action (Table.States (302), 36, (69, 1), 309);
- Table.States (302).Kernel := To_Vector ((((58, 1), 58, 1,
(32767, 0), 0), ((69, 1), 58, 1, (32767, 0),
- 0)));
- Table.States (302).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (69, 1), 36, 309)));
- Table.States (303).Action_List.Set_Capacity (1);
- Add_Action (Table.States (303), 23, (46, 1), 310);
- Table.States (303).Kernel := To_Vector ((0 => ((46, 1), 40, 1,
(32767, 0), 0)));
- Table.States (303).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (46, 1), 23, 310)));
- Table.States (304).Action_List.Set_Capacity (1);
- Add_Action (Table.States (304), 36, (47, 0), 311);
- Table.States (304).Kernel := To_Vector ((0 => ((47, 0), 8, 1,
(32767, 0), 0)));
- Table.States (304).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (47, 0), 36, 311)));
- Table.States (305).Action_List.Set_Capacity (10);
- Add_Action (Table.States (305), 12, (59, 0), 130);
- Add_Action (Table.States (305), 13, (59, 1), 131);
- Add_Action (Table.States (305), 16, (43, 0), 132);
- Add_Action (Table.States (305), 21, (45, 0), 9);
- Add_Action (Table.States (305), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (305), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (305), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (305), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (305), 39, (60, 1), 133);
- Add_Action (Table.States (305), 40, (71, 0), 134);
- Table.States (305).Goto_List.Set_Capacity (9);
- Add_Goto (Table.States (305), 43, 135);
- Add_Goto (Table.States (305), 45, 136);
- Add_Goto (Table.States (305), 46, 137);
- Add_Goto (Table.States (305), 58, 312);
- Add_Goto (Table.States (305), 59, 139);
- Add_Goto (Table.States (305), 60, 140);
- Add_Goto (Table.States (305), 61, 141);
- Add_Goto (Table.States (305), 71, 142);
- Add_Goto (Table.States (305), 73, 143);
- Table.States (305).Kernel := To_Vector ((0 => ((44, 3), 26, 1,
(32767, 0), 0)));
- Table.States (305).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (58, 0), 0)));
- Table.States (306).Action_List.Set_Capacity (11);
- Add_Action (Table.States (306), 6, Reduce, (60, 0), 0);
- Add_Action (Table.States (306), 12, (59, 0), 227);
- Add_Action (Table.States (306), 13, (59, 1), 228);
- Add_Action (Table.States (306), 16, (43, 0), 229);
- Add_Action (Table.States (306), 21, (45, 0), 9);
- Add_Action (Table.States (306), 29, Reduce, (60, 0), 0);
- Add_Action (Table.States (306), 33, Reduce, (60, 0), 0);
- Add_Action (Table.States (306), 35, Reduce, (60, 0), 0);
- Add_Action (Table.States (306), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (306), 39, (60, 1), 230);
- Add_Action (Table.States (306), 40, (71, 0), 231);
- Table.States (306).Goto_List.Set_Capacity (9);
- Add_Goto (Table.States (306), 43, 232);
- Add_Goto (Table.States (306), 45, 233);
- Add_Goto (Table.States (306), 46, 234);
- Add_Goto (Table.States (306), 58, 313);
- Add_Goto (Table.States (306), 59, 236);
- Add_Goto (Table.States (306), 60, 237);
- Add_Goto (Table.States (306), 61, 238);
- Add_Goto (Table.States (306), 71, 239);
- Add_Goto (Table.States (306), 73, 240);
- Table.States (306).Kernel := To_Vector ((((44, 1), 26, 1,
(32767, 0), 0), ((44, 2), 26, 3, (32767, 0),
- 0)));
- Table.States (306).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (58, 0), 0)));
- Table.States (307).Action_List.Set_Capacity (1);
- Add_Action (Table.States (307), 10, (64, 0), 314);
- Table.States (307).Kernel := To_Vector ((0 => ((64, 0), 55, 2,
(32767, 0), 0)));
- Table.States (307).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (64, 0), 10, 314)));
- Table.States (308).Action_List.Set_Capacity (1);
- Add_Action (Table.States (308), 36, (63, 0), 315);
- Table.States (308).Kernel := To_Vector ((0 => ((63, 0), 60, 1,
(32767, 0), 0)));
- Table.States (308).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (63, 0), 36, 315)));
- Table.States (309).Action_List.Set_Capacity (8);
- Add_Action (Table.States (309), (8, 10, 14, 18, 20, 25, 27, 39),
(69, 1), 6);
- Table.States (309).Kernel := To_Vector ((0 => ((69, 1), 36, 0,
(69, 1), 6)));
- Table.States (309).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (69, 1), 6)));
- Table.States (310).Action_List.Set_Capacity (3);
- Add_Action (Table.States (310), (6, 29, 36), (46, 1), 6);
- Table.States (310).Kernel := To_Vector ((0 => ((46, 1), 23, 0,
(46, 1), 6)));
- Table.States (310).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (46, 1), 6)));
- Table.States (311).Action_List.Set_Capacity (8);
- Add_Action (Table.States (311), (8, 10, 14, 18, 20, 25, 27, 39),
(47, 0), 7);
- Table.States (311).Kernel := To_Vector ((0 => ((47, 0), 36, 0,
(47, 0), 7)));
- Table.States (311).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (47, 0), 7)));
- Table.States (312).Action_List.Set_Capacity (2);
- Add_Action (Table.States (312), 29, (58, 1), 170);
- Add_Action (Table.States (312), 36, (44, 3), 316);
- Table.States (312).Kernel := To_Vector ((((44, 3), 58, 1,
(32767, 0), 0), ((58, 1), 58, 1, (32767, 0),
- 0)));
- Table.States (312).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 3), 36, 316)));
- Table.States (313).Action_List.Set_Capacity (3);
- Add_Action (Table.States (313), 6, (44, 2), 317);
- Add_Action (Table.States (313), 29, (58, 1), 261);
- Add_Action (Table.States (313), 36, (44, 1), 318);
- Table.States (313).Kernel := To_Vector ((((44, 1), 58, 1,
(32767, 0), 0), ((44, 2), 58, 3, (32767, 0),
- 0), ((58, 1), 58, 1, (32767, 0), 0)));
- Table.States (313).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 1), 36, 318)));
- Table.States (314).Action_List.Set_Capacity (2);
- Add_Action (Table.States (314), 36, Reduce, (60, 0), 0);
- Add_Action (Table.States (314), 39, (60, 1), 144);
- Table.States (314).Goto_List.Set_Capacity (1);
- Add_Goto (Table.States (314), 60, 319);
- Table.States (314).Kernel := To_Vector ((0 => ((64, 0), 10, 1,
(32767, 0), 0)));
- Table.States (314).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (60, 0), 0)));
- Table.States (315).Action_List.Set_Capacity (8);
- Add_Action (Table.States (315), (8, 10, 14, 18, 20, 25, 27, 39),
(63, 0), 7);
- Table.States (315).Kernel := To_Vector ((0 => ((63, 0), 36, 0,
(63, 0), 7)));
- Table.States (315).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (63, 0), 7)));
- Table.States (316).Action_List.Set_Capacity (8);
- Add_Action (Table.States (316), (8, 10, 14, 18, 20, 25, 27, 39),
(44, 3), 8);
- Table.States (316).Kernel := To_Vector ((0 => ((44, 3), 36, 0,
(44, 3), 8)));
- Table.States (316).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (44, 3), 8)));
- end Subr_6;
- procedure Subr_7
- is begin
- Table.States (317).Action_List.Set_Capacity (1);
- Add_Action (Table.States (317), 38, (44, 2), 320);
- Table.States (317).Kernel := To_Vector ((0 => ((44, 2), 6, 2,
(32767, 0), 0)));
- Table.States (317).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 2), 38, 320)));
- Table.States (318).Action_List.Set_Capacity (8);
- Add_Action (Table.States (318), (8, 10, 14, 18, 20, 25, 27, 39),
(44, 1), 8);
- Table.States (318).Kernel := To_Vector ((0 => ((44, 1), 36, 0,
(44, 1), 8)));
- Table.States (318).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (44, 1), 8)));
- Table.States (319).Action_List.Set_Capacity (1);
- Add_Action (Table.States (319), 36, (64, 0), 321);
- Table.States (319).Kernel := To_Vector ((0 => ((64, 0), 60, 1,
(32767, 0), 0)));
- Table.States (319).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (64, 0), 36, 321)));
- Table.States (320).Action_List.Set_Capacity (1);
- Add_Action (Table.States (320), 36, (44, 2), 322);
- Table.States (320).Kernel := To_Vector ((0 => ((44, 2), 38, 1,
(32767, 0), 0)));
- Table.States (320).Minimal_Complete_Actions := To_Vector ((0 =>
(Shift, (44, 2), 36, 322)));
- Table.States (321).Action_List.Set_Capacity (8);
- Add_Action (Table.States (321), (8, 10, 14, 18, 20, 25, 27, 39),
(64, 0), 9);
- Table.States (321).Kernel := To_Vector ((0 => ((64, 0), 36, 0,
(64, 0), 9)));
- Table.States (321).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (64, 0), 9)));
- Table.States (322).Action_List.Set_Capacity (8);
- Add_Action (Table.States (322), (8, 10, 14, 18, 20, 25, 27, 39),
(44, 2), 10);
- Table.States (322).Kernel := To_Vector ((0 => ((44, 2), 36, 0,
(44, 2), 10)));
- Table.States (322).Minimal_Complete_Actions := To_Vector ((0 =>
(Reduce, (44, 2), 10)));
- end Subr_7;
- begin
- Subr_1;
- Subr_2;
- Subr_3;
- Subr_4;
- Subr_5;
- Subr_6;
- Subr_7;
- Table.Error_Action := new Parse_Action_Node'((Verb => Error, others
=> <>), null);
- end;
-
- Table.Error_Recover_Enabled := True;
- Table.McKenzie_Param := McKenzie_Param;
- Table.Max_Parallel := 15;
- return Table;
- end Create_Parse_Table;
-
- function Create_Lexer (Trace : in WisiToken.Trace_Access) return
WisiToken.Lexer.Handle
- is begin
- return Lexer.New_Lexer (Trace, Gpr_Process_Actions.Descriptor'Access);
- end Create_Lexer;
-
- function Create_Productions return
WisiToken.Syntax_Trees.Production_Info_Trees.Vector
- is begin
- return Result : WisiToken.Syntax_Trees.Production_Info_Trees.Vector do
- Result.Set_First_Last (42, 75);
- Result (43).RHSs.Set_First_Last (0, 0);
- Result (43).RHSs (0).In_Parse_Action := null;
- Result (43).RHSs (0).Post_Parse_Action := aggregate_g_0'Access;
- Result (44).RHSs.Set_First_Last (0, 3);
- Result (44).RHSs (0).In_Parse_Action := null;
- Result (44).RHSs (0).Post_Parse_Action :=
attribute_declaration_0'Access;
- Result (44).RHSs (1).In_Parse_Action := null;
- Result (44).RHSs (1).Post_Parse_Action :=
attribute_declaration_1'Access;
- Result (44).RHSs (2).In_Parse_Action := null;
- Result (44).RHSs (2).Post_Parse_Action :=
attribute_declaration_2'Access;
- Result (44).RHSs (3).In_Parse_Action := null;
- Result (44).RHSs (3).Post_Parse_Action :=
attribute_declaration_3'Access;
- Result (47).RHSs.Set_First_Last (0, 0);
- Result (47).RHSs (0).In_Parse_Action := null;
- Result (47).RHSs (0).Post_Parse_Action := case_statement_0'Access;
- Result (48).RHSs.Set_First_Last (0, 0);
- Result (48).RHSs (0).In_Parse_Action := null;
- Result (48).RHSs (0).Post_Parse_Action := case_item_0'Access;
- Result (50).RHSs.Set_First_Last (0, 0);
- Result (50).RHSs (0).In_Parse_Action := null;
- Result (50).RHSs (0).Post_Parse_Action := compilation_unit_0'Access;
- Result (60).RHSs.Set_First_Last (0, 1);
- Result (60).RHSs (0).In_Parse_Action := null;
- Result (60).RHSs (0).Post_Parse_Action := null;
- Result (60).RHSs (1).In_Parse_Action := identifier_opt_1_check'Access;
- Result (60).RHSs (1).Post_Parse_Action := null;
- Result (63).RHSs.Set_First_Last (0, 0);
- Result (63).RHSs (0).In_Parse_Action := package_spec_0_check'Access;
- Result (63).RHSs (0).Post_Parse_Action := package_spec_0'Access;
- Result (64).RHSs.Set_First_Last (0, 0);
- Result (64).RHSs (0).In_Parse_Action :=
package_extension_0_check'Access;
- Result (64).RHSs (0).Post_Parse_Action := package_extension_0'Access;
- Result (65).RHSs.Set_First_Last (0, 0);
- Result (65).RHSs (0).In_Parse_Action := null;
- Result (65).RHSs (0).Post_Parse_Action := package_renaming_0'Access;
- Result (67).RHSs.Set_First_Last (0, 0);
- Result (67).RHSs (0).In_Parse_Action :=
project_extension_0_check'Access;
- Result (67).RHSs (0).Post_Parse_Action := project_extension_0'Access;
- Result (69).RHSs.Set_First_Last (0, 4);
- Result (69).RHSs (0).In_Parse_Action := null;
- Result (69).RHSs (0).Post_Parse_Action :=
simple_declarative_item_0'Access;
- Result (69).RHSs (1).In_Parse_Action := null;
- Result (69).RHSs (1).Post_Parse_Action :=
simple_declarative_item_1'Access;
- Result (69).RHSs (2).In_Parse_Action := null;
- Result (69).RHSs (2).Post_Parse_Action := null;
- Result (69).RHSs (3).In_Parse_Action := null;
- Result (69).RHSs (3).Post_Parse_Action := null;
- Result (69).RHSs (4).In_Parse_Action := null;
- Result (69).RHSs (4).Post_Parse_Action :=
simple_declarative_item_4'Access;
- Result (70).RHSs.Set_First_Last (0, 0);
- Result (70).RHSs (0).In_Parse_Action :=
simple_project_declaration_0_check'Access;
- Result (70).RHSs (0).Post_Parse_Action :=
simple_project_declaration_0'Access;
- Result (74).RHSs.Set_First_Last (0, 0);
- Result (74).RHSs (0).In_Parse_Action := null;
- Result (74).RHSs (0).Post_Parse_Action :=
typed_string_declaration_0'Access;
- end return;
- end Create_Productions;
-
-end Gpr_Process_Main;
diff --git a/gpr_process_main.ads b/gpr_process_main.ads
deleted file mode 100644
index 477df66e23..0000000000
--- a/gpr_process_main.ads
+++ /dev/null
@@ -1,31 +0,0 @@
--- generated parser support file. -*- buffer-read-only:t -*-
--- command line: wisitoken-bnf-generate.exe --generate LR1 Ada_Emacs re2c
PROCESS gpr.wy
---
-
--- Copyright (C) 2013 - 2022 Free Software Foundation, Inc.
-
--- This program is free software; you can redistribute it and/or
--- modify it under the terms of the GNU General Public License as
--- published by the Free Software Foundation; either version 3, or (at
--- your option) any later version.
---
--- This software is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- General Public License for more details.
---
--- You should have received a copy of the GNU General Public License
--- along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-
-with WisiToken.Syntax_Trees;
-with WisiToken.Lexer;
-with WisiToken.Parse.LR;
-package Gpr_Process_Main is
-
- function Create_Parse_Table
- return WisiToken.Parse.LR.Parse_Table_Ptr;
-
- function Create_Productions return
WisiToken.Syntax_Trees.Production_Info_Trees.Vector;
-
- function Create_Lexer (Trace : in WisiToken.Trace_Access) return
WisiToken.Lexer.Handle;
-end Gpr_Process_Main;
diff --git a/gpr_query.adb b/gpr_query.adb
deleted file mode 100644
index 589055c04a..0000000000
--- a/gpr_query.adb
+++ /dev/null
@@ -1,1379 +0,0 @@
--- Abstract :
---
--- Support Emacs Ada mode and gpr-query minor mode queries about
--- GNAT projects and cross reference data
---
--- Copyright (C) 2014 - 2022 Free Software Foundation All Rights Reserved.
---
--- This program is free software; you can redistribute it and/or
--- modify it under terms of the GNU General Public License as
--- published by the Free Software Foundation; either version 3, or (at
--- your option) any later version. This program is distributed in the
--- hope that it will be useful, but WITHOUT ANY WARRANTY; without even
--- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
--- PURPOSE. See the GNU General Public License for more details. You
--- should have received a copy of the GNU General Public License
--- distributed with this program; see file COPYING. If not, write to
--- the Free Software Foundation, 51 Franklin Street, Suite 500, Boston,
--- MA 02110-1335, USA.
-
-pragma License (GPL);
-
-with Ada.Characters.Handling;
-with Ada.Command_Line;
-with Ada.Directories;
-with Ada.Environment_Variables;
-with Ada.Exceptions.Traceback;
-with Ada.IO_Exceptions;
-with Ada.Strings.Fixed;
-with Ada.Strings.Unbounded;
-with Ada.Text_IO;
-with GNAT.Command_Line;
-with GNAT.Directory_Operations;
-with GNAT.OS_Lib;
-with GNAT.Strings;
-with GNAT.Traceback.Symbolic;
-with GNATCOLL.Arg_Lists;
-with GNATCOLL.Paragraph_Filling;
-with GNATCOLL.Projects;
-with GNATCOLL.SQL.Exec;
-with GNATCOLL.SQL.Sqlite;
-with GNATCOLL.Traces;
-with GNATCOLL.Utils;
-with GNATCOLL.VFS;
-with GNATCOLL.VFS_Utils;
-with GNATCOLL.Xref;
-procedure Gpr_Query is
- use all type GNATCOLL.VFS.File_Array;
- use GNATCOLL;
-
- Version : constant String := "3";
- -- Changes once per release when the API (commands and responses)
- -- changes; must match gpr-query.el gpr-query-protocol-version
-
- Me : constant GNATCOLL.Traces.Trace_Handle := GNATCOLL.Traces.Create
("gpr_query");
- -- See gnatcoll-xref.adb for xref traces.
-
- DB_Error : exception;
- Invalid_Command : exception;
-
- function "+" (Item : in Ada.Strings.Unbounded.Unbounded_String) return
String
- renames Ada.Strings.Unbounded.To_String;
-
- function "+" (Item : in String) return
Ada.Strings.Unbounded.Unbounded_String
- renames Ada.Strings.Unbounded.To_Unbounded_String;
-
- function "+" (Item : in GNATCOLL.VFS.Filesystem_String) return String
- is begin
- return String (Item);
- end "+";
-
- procedure Process_Line (Line : String);
- -- Process a full line of commands.
- -- Raise Invalid_Command when the command is invalid.
-
- function Get_Entity (Arg : String) return GNATCOLL.Xref.Entity_Information;
- -- Return the entity matching the "name:file:line[:column]" argument
-
- type My_Xref_Database is new GNATCOLL.Xref.Xref_Database with null record;
- -- Derived so we can override Image to output full paths
-
- Short_File_Names : Boolean; -- set by each command that calls Image
- -- Full_File_Names_Arg : constant String := "full_file_names";
- Short_File_Names_Arg : constant String := "short_file_names";
-
- overriding function Image (Self : My_Xref_Database; File :
GNATCOLL.VFS.Virtual_File) return String;
- function Image (Self : GNATCOLL.Xref.Entity_Information) return String;
- -- Return a display version of the argument
-
- Xref : aliased My_Xref_Database;
- Env : GNATCOLL.Projects.Project_Environment_Access;
- Tree : aliased GNATCOLL.Projects.Project_Tree;
- Source_Search_Path : GNATCOLL.VFS.File_Array_Access;
-
- Previous_Progress : Natural := 0;
- Progress_Reporter : access procedure (Current, Total : Integer) := null;
-
- -- Subprogram specs for subprograms used before bodies
- procedure Check_Arg_Count (Args : in GNATCOLL.Arg_Lists.Arg_List; Expected
: in Integer);
- procedure Dump (Curs : in out GNATCOLL.Xref.Entities_Cursor'Class);
- procedure Dump (Refs : in out GNATCOLL.Xref.References_Cursor'Class;
Controlling_Type_Name : in String := "");
- procedure Dump_Local (Refs : in out GNATCOLL.Xref.References_Cursor'Class;
Local_File_Name : in String);
- -- Display the results of a query
-
- procedure Put (Item : GNATCOLL.VFS.File_Array);
-
- generic
- with function Compute
- (Self : in GNATCOLL.Xref.Xref_Database'Class;
- Entity : in GNATCOLL.Xref.Entity_Information)
- return GNATCOLL.Xref.Entity_Information;
- procedure Process_Command_Single (Args : GNATCOLL.Arg_Lists.Arg_List);
- -- Get the entity identified by Args, which must contain a single
- -- argument. Then call Compute, and output the result.
- --
- -- Appropriate for queries that return a single entity result.
-
- procedure Process_Command_Single (Args : GNATCOLL.Arg_Lists.Arg_List)
- is
- use GNATCOLL.Arg_Lists;
- use GNATCOLL.Xref;
-
- Entity : Entity_Information;
- Comp : Entity_Information;
- begin
- Check_Arg_Count (Args, 2);
-
- Short_File_Names := Nth_Arg (Args, 2) = Short_File_Names_Arg;
-
- Entity := Get_Entity (Nth_Arg (Args, 1));
- Comp := Compute (Xref, Entity);
- if Comp /= No_Entity then
- Ada.Text_IO.Put_Line (Image (Comp));
- end if;
- end Process_Command_Single;
-
- generic
- with procedure Compute
- (Self : in GNATCOLL.Xref.Xref_Database'Class;
- Entity : in GNATCOLL.Xref.Entity_Information;
- Cursor : out GNATCOLL.Xref.Entities_Cursor'Class);
- procedure Process_Command_Multiple (Args : GNATCOLL.Arg_Lists.Arg_List);
-
- procedure Process_Command_Multiple (Args : GNATCOLL.Arg_Lists.Arg_List)
- is
- use GNATCOLL.Arg_Lists;
- use GNATCOLL.Xref;
-
- Entity : Entity_Information;
- Descendants : Recursive_Entities_Cursor;
-
- -- Apparently a generic formal parameter cannot match a subprogram
access type, so we need this:
- procedure Do_Compute
- (Self : in GNATCOLL.Xref.Xref_Database'Class;
- Entity : in GNATCOLL.Xref.Entity_Information;
- Cursor : out GNATCOLL.Xref.Entities_Cursor'Class)
- is begin
- Compute (Self, Entity, Cursor);
- end Do_Compute;
- begin
- Check_Arg_Count (Args, 2);
-
- Short_File_Names := Nth_Arg (Args, 2) = Short_File_Names_Arg;
-
- Entity := Get_Entity (Nth_Arg (Args, 1));
-
- Recursive
- (Self => Xref'Unchecked_Access,
- Entity => Entity,
- Compute => Do_Compute'Unrestricted_Access,
- Cursor => Descendants);
-
- Dump (Descendants);
-
- end Process_Command_Multiple;
-
- -- Command procedures; Args is the command line.
- --
- -- Infrastructure commands
- procedure Process_Help (Args : GNATCOLL.Arg_Lists.Arg_List);
- procedure Process_Refresh (Args : GNATCOLL.Arg_Lists.Arg_List);
- procedure Process_DB_Name (Args : GNATCOLL.Arg_Lists.Arg_List);
-
- -- Queries; alphabetical
- procedure Process_Complete (Args : GNATCOLL.Arg_Lists.Arg_List);
- procedure Process_Overridden is new Process_Command_Single
(GNATCOLL.Xref.Overrides);
- procedure Process_Overriding is new Process_Command_Multiple
(GNATCOLL.Xref.Overridden_By);
- procedure Process_Parent_Types is new Process_Command_Multiple
(GNATCOLL.Xref.Parent_Types);
- procedure Process_Project_Path (Args : GNATCOLL.Arg_Lists.Arg_List);
- procedure Process_Refs (Args : GNATCOLL.Arg_Lists.Arg_List);
- procedure Process_Tree_Defs (Args : GNATCOLL.Arg_Lists.Arg_List);
- procedure Process_Tree_Refs (Args : GNATCOLL.Arg_Lists.Arg_List);
- procedure Process_Source_Dirs (Args : GNATCOLL.Arg_Lists.Arg_List);
-
- type Command_Descr is record
- Name : GNAT.Strings.String_Access;
- Args : GNAT.Strings.String_Access;
- Help : GNAT.Strings.String_Access;
- Handler : not null access procedure (Args : GNATCOLL.Arg_Lists.Arg_List);
- end record;
-
- Commands : constant array (Natural range <>) of Command_Descr :=
- ((new String'("help"),
- new String'("[command or variable name]"),
- new String'("Display the list of commands and their syntax."),
- Process_Help'Access),
-
- (new String'("refresh"),
- null,
- new String'("Refresh the contents of the xref database."),
- Process_Refresh'Access),
-
- (new String'("db_name"),
- null,
- new String'("Report the root name of the database files."),
- Process_DB_Name'Access),
-
- -- queries
-
- (new String'("complete"),
- new String'("pattern"),
- new String'("Names that complete the pattern."),
- Process_Complete'Access),
-
- (new String'("overridden"),
- new String'("name:file:line[:column] {full_file_names |
short_file_names}"),
- new String'("The entity that is overridden by the parameter"),
- Process_Overridden'Access),
-
- (new String'("overriding"),
- new String'("name:file:line[:column] {full_file_names |
short_file_names}"),
- new String'("The entities that override the parameter"),
- Process_Overriding'Access),
-
- (new String'("parent_types"),
- new String'("name:file:line[:column] {full_file_names |
short_file_names}"),
- new String'("The parent types of the entity."),
- Process_Parent_Types'Access),
-
- (new String'("project_path"),
- null,
- new String'("The project search path."),
- Process_Project_Path'Access),
-
- (new String'("refs"),
- new String'("name:file:line[:column] {global | local_only}
{full_file_names | short_file_names}"),
- new String'("All known references to the entity."),
- Process_Refs'Access),
-
- (new String'("tree_defs"),
- new String'("name:file[:line[:column]] {full_file_names |
short_file_names}"),
- new String'
- ("All known references to the entity, and to child types or
overridden/overriding operations."),
- Process_Tree_Defs'Access),
-
- (new String'("tree_refs"),
- new String'("name:file:line[:column] {full_file_names |
short_file_names}"),
- new String'
- ("All known references to the entity, and to parent/child types or
overridden/overriding operations."),
- Process_Tree_Refs'Access),
-
- (new String'("source_dirs"),
- null,
- new String'("The project source directories, recursively."),
- Process_Source_Dirs'Access));
-
- -- Parsed command line info
- Cmdline : GNAT.Command_Line.Command_Line_Configuration;
-
- ALI_Encoding : aliased GNAT.Strings.String_Access := new
String'("");
- Commands_From_Switch : aliased GNAT.Strings.String_Access;
- DB_Name : aliased GNAT.Strings.String_Access := new
String'("gpr_query.db");
- Force_Refresh : aliased Boolean;
- Gpr_Config_File : aliased GNAT.Strings.String_Access;
- Nightly_DB_Name : aliased GNAT.Strings.String_Access;
- Project_File_Name : aliased GNAT.Strings.String_Access;
- Show_Progress : aliased Boolean;
- Traces_Config_File : aliased GNAT.Strings.String_Access;
-
- ----------
- -- Procedure bodies, alphabetical
-
- procedure Check_Arg_Count (Args : in GNATCOLL.Arg_Lists.Arg_List; Expected
: in Integer)
- is
- Count : constant Integer := GNATCOLL.Arg_Lists.Args_Length (Args);
- begin
- if Count /= Expected then
- raise Invalid_Command with "Invalid number of arguments" &
Integer'Image (Count) &
- "; expecting" & Integer'Image (Expected);
- end if;
- end Check_Arg_Count;
-
- procedure Display_Progress (Current, Total : Integer) is
- Now : constant Integer := Integer (Float'Floor (Float (Current) / Float
(Total) * 100.0));
- begin
- if Now /= Previous_Progress then
- Ada.Text_IO.Put_Line
- ("completed" & Current'Img
- & " out of" & Total'Img
- & " (" & GNATCOLL.Utils.Image (Now, Min_Width => 0) & "%)...");
- Previous_Progress := Now;
- end if;
- end Display_Progress;
-
- procedure Dump (Curs : in out GNATCOLL.Xref.Entities_Cursor'Class)
- is
- use GNATCOLL.Xref;
- begin
- while Curs.Has_Element loop
- Ada.Text_IO.Put_Line (Image (Curs.Element));
- Curs.Next;
- end loop;
- end Dump;
-
- procedure Dump (Refs : in out GNATCOLL.Xref.References_Cursor'Class;
Controlling_Type_Name : in String := "")
- is
- use GNATCOLL.Xref;
- begin
- while Has_Element (Refs) loop
- declare
- Ref : constant Entity_Reference := Refs.Element;
- begin
- Ada.Text_IO.Put_Line
- (Xref.Image (Ref) & " (" &
- (if Controlling_Type_Name'Length = 0
- then ""
- else Controlling_Type_Name & "; ") &
- (+Ref.Kind) & ")");
- end;
- Next (Refs);
- end loop;
- end Dump;
-
- procedure Dump_Local (Refs : in out GNATCOLL.Xref.References_Cursor'Class;
Local_File_Name : in String)
- is
- use GNATCOLL.Xref;
- begin
- while Has_Element (Refs) loop
- declare
- Ref : constant Entity_Reference := Refs.Element;
- begin
- if Local_File_Name = "" or else Local_File_Name =
Ref.File.Display_Base_Name then
- Ada.Text_IO.Put_Line (Xref.Image (Ref) & " (" & (+Ref.Kind) &
")");
- end if;
- end;
- Next (Refs);
- end loop;
- end Dump_Local;
-
- function Get_Entity (Arg : String) return GNATCOLL.Xref.Entity_Information
- is
- use GNAT.Directory_Operations;
- use GNATCOLL.Xref;
-
- Words : GNAT.Strings.String_List_Access := GNATCOLL.Utils.Split (Arg, On
=> ':');
- Ref : GNATCOLL.Xref.Entity_Reference;
- begin
- case Words'Length is
- when 4 =>
- Ref := Xref.Get_Entity
- (Name => Words (Words'First).all,
- File => Format_Pathname
- (Style => UNIX,
- Path => Words (Words'First + 1).all),
- Project => GNATCOLL.Projects.No_Project,
- Line => Integer'Value (Words (Words'First + 2).all),
- Column => Visible_Column
- (Integer'Value (Words (Words'First + 3).all)));
-
- when 3 =>
- -- No column; assume good enough for a precise match
- Ref := Xref.Get_Entity
- (Name => Words (Words'First).all,
- File => Format_Pathname
- (Style => UNIX,
- Path => Words (Words'First + 1).all),
- Project => GNATCOLL.Projects.No_Project,
- Line => Integer'Value (Words (Words'First + 2).all));
-
- when 2 =>
- -- No line or column; error.
- GNAT.Strings.Free (Words);
- raise Invalid_Command with "Invalid parameter '" & Arg & "',
expecting name:file:line[:column]]";
-
- when others =>
- -- No file, or bad args.
- --
- -- Xref.Get_Entity treats 'File => ""' as searching for pre-defined
entities such as "Integer".
- --
- -- To search for a name in all files, use "complete" command.
- GNAT.Strings.Free (Words);
-
- raise Invalid_Command with "Invalid parameter '" & Arg & "',
expecting name:file:line[:column]]";
- end case;
-
- GNAT.Strings.Free (Words);
-
- if Ref.Entity = GNATCOLL.Xref.No_Entity then
- Ada.Text_IO.Put_Line ("Error: entity not found '" & Arg & "'");
-
- elsif GNATCOLL.Xref.Is_Fuzzy_Match (Ref.Entity) then
- Ada.Text_IO.Put_Line ("warning: fuzzy match for the entity");
- end if;
-
- return Ref.Entity;
- end Get_Entity;
-
- overriding function Image (Self : My_Xref_Database; File :
GNATCOLL.VFS.Virtual_File) return String
- is
- pragma Unreferenced (Self);
- begin
- if Short_File_Names then
- return File.Display_Base_Name;
- else
- return File.Display_Full_Name;
- end if;
- end Image;
-
- function Image (Self : GNATCOLL.Xref.Entity_Information) return String
- is
- use GNATCOLL.Xref;
- begin
- if Self = No_Entity then
- return "Unknown entity";
- else
- declare
- Decl : constant Entity_Declaration := Xref.Declaration (Self);
- begin
- if Is_Predefined_Entity (Decl) then
- return "predefined entity: " & (+Decl.Name);
- else
- return Xref.Image (Decl.Location);
- end if;
- end;
- end if;
- end Image;
-
- procedure Process_DB_Name (Args : GNATCOLL.Arg_Lists.Arg_List)
- is
- pragma Unreferenced (Args);
- begin
- Ada.Text_IO.Put_Line (DB_Name.all);
- end Process_DB_Name;
-
- procedure Process_Help (Args : GNATCOLL.Arg_Lists.Arg_List)
- is
- use Ada.Text_IO;
- use GNATCOLL.Arg_Lists;
- use type GNAT.Strings.String_Access;
- begin
- for C in Commands'Range loop
- if Args_Length (Args) <= 0 -- Empty_Command_Line returns -1
- or else Nth_Arg (Args, 1) = Commands (C).Name.all
- then
- Put (" " & Commands (C).Name.all);
- if Commands (C).Args = null then
- New_Line;
- else
- Put_Line (" " & Commands (C).Args.all);
- end if;
-
- Put
- (Ada.Strings.Unbounded.To_String
- (GNATCOLL.Paragraph_Filling.Knuth_Fill
- (Commands (C).Help.all,
- Max_Line_Length => 70,
- Line_Prefix => " ")));
- end if;
- end loop;
- New_Line;
- Put_Line ("'exit' to quit");
- end Process_Help;
-
- procedure Process_Line (Line : String)
- is
- Expr : GNAT.Strings.String_List_Access;
- begin
- if Ada.Strings.Fixed.Trim (Line, Ada.Strings.Both) = "" then
- return;
- end if;
-
- Expr := GNATCOLL.Utils.Split (Line, On => ';');
-
- for C in Expr'Range loop
- if Ada.Strings.Fixed.Trim (Expr (C).all, Ada.Strings.Both) = "" then
- null;
-
- else
- declare
- use GNATCOLL.Arg_Lists;
- List : constant Arg_List := Parse_String (Expr (C).all, Mode
=> Separate_Args);
- Cmd : constant String := Ada.Characters.Handling.To_Lower
(Get_Command (List));
- Found : Boolean := False;
- begin
- for Co in Commands'Range loop
- if Commands (Co).Name.all = Cmd then
- Commands (Co).Handler (List);
- Found := True;
- exit;
- end if;
- end loop;
-
- if not Found then
- raise Invalid_Command with "Invalid command: '" & Cmd & "'";
- end if;
- end;
-
- end if;
- end loop;
-
- GNAT.Strings.Free (Expr);
- end Process_Line;
-
- function Get_Parameters (Entity : GNATCOLL.Xref.Entity_Information) return
String
- is
- use Ada.Strings.Unbounded;
- use GNATCOLL.Xref;
- Params : Parameters_Cursor := GNATCOLL.Xref.Parameters (Xref,
Entity);
- Result : Unbounded_String;
- Need_Paren : Boolean := True;
- begin
- loop
- exit when not Has_Element (Params);
- Result := Result &
- ((if Need_Paren
- then (if Length (Result) > 0 then " (" else "(")
- else ", ") &
- Xref.Declaration (Element (Params).Parameter).Name);
- Need_Paren := False;
- Next (Params);
- end loop;
- if not Need_Paren then
- Result := Result & ")";
- end if;
- return +Result;
- end Get_Parameters;
-
- procedure Process_Complete (Args : GNATCOLL.Arg_Lists.Arg_List)
- is
- use Ada.Text_IO;
- use GNATCOLL.Arg_Lists;
- use GNATCOLL.Xref;
- Prefix : constant String := Nth_Arg (Args, 1);
- Matches : Entities_Cursor;
- Count : Integer := 0;
- begin
- Short_File_Names := False;
-
- -- First count all matches, so Emacs can show progress
- Xref.From_Prefix
- (Prefix,
- Is_Partial => True,
- Cursor => Matches);
- loop
- exit when not Has_Element (Matches);
- Count := @ + 1;
- Next (Matches);
- end loop;
-
- Ada.Text_IO.Put_Line ("element count" & Count'Image);
-
- Xref.From_Prefix
- (Prefix,
- Is_Partial => True,
- Cursor => Matches);
- loop
- exit when not Has_Element (Matches);
- declare
- Decl : constant Entity_Declaration := Xref.Declaration (Element
(Matches));
- begin
- Put (Xref.Qualified_Name (Element (Matches)));
- if Decl.Flags.Is_Subprogram then
- Ada.Text_IO.Put (Get_Parameters (Decl.Location.Entity));
- end if;
- end;
- Ada.Text_IO.Put_Line (" " & Image (Element (Matches)));
- Next (Matches);
- end loop;
- end Process_Complete;
-
- procedure Process_Project_Path (Args : GNATCOLL.Arg_Lists.Arg_List)
- is
- pragma Unreferenced (Args);
- Dirs : constant GNATCOLL.VFS.File_Array :=
GNATCOLL.Projects.Predefined_Project_Path (Env.all);
- begin
- Short_File_Names := False;
- Put (Dirs);
- end Process_Project_Path;
-
- procedure Process_Refresh (Args : GNATCOLL.Arg_Lists.Arg_List)
- is
- pragma Unreferenced (Args);
- begin
- Parse_All_LI_Files
- (Self => Xref,
- Project => Tree.Root_Project,
- Parse_Runtime_Files => False,
- Show_Progress => Progress_Reporter,
- ALI_Encoding => ALI_Encoding.all,
- From_DB_Name => Nightly_DB_Name.all,
- To_DB_Name => DB_Name.all,
- Force_Refresh => Force_Refresh);
- end Process_Refresh;
-
- procedure Process_Refs (Args : GNATCOLL.Arg_Lists.Arg_List)
- is
- use GNATCOLL.Arg_Lists;
- begin
- Check_Arg_Count (Args, 3); -- entity, local/global, full/short
-
- Short_File_Names := Nth_Arg (Args, 3) = Short_File_Names_Arg;
-
- declare
- use GNATCOLL.Xref;
- Entity : constant Entity_Information := Get_Entity (Nth_Arg (Args,
1));
- Refs : References_Cursor;
- begin
- Xref.References (Entity, Refs);
- if Nth_Arg (Args, 2) = "local_only" then
- -- Xref doesn't let us get the full file name of Entity (sigh)
- declare
- use Ada.Strings.Fixed;
- First : constant Integer := 1 + Index (Nth_Arg (Args,
1), ":");
- Last : constant Integer := -1 + Index (Nth_Arg
(Args, 1), ":", First);
- Local_File_Name : constant String := Nth_Arg (Args, 1) (First
.. Last);
- begin
- Dump_Local (Refs, Local_File_Name);
- end;
- else
- Dump (Refs);
- end if;
- end;
- end Process_Refs;
-
- function Has_Op
- (Entity : in GNATCOLL.Xref.Entity_Information;
- Primitive_Op_Name : in String := "")
- return Boolean
- is
- use GNATCOLL.Xref;
- Ops : Entities_Cursor;
- begin
- Xref.Methods (Entity, Ops);
- loop
- exit when not Has_Element (Ops);
- if Primitive_Op_Name = +Xref.Declaration (Element (Ops)).Name then
- return True;
- end if;
- Next (Ops);
- end loop;
- return False;
- end Has_Op;
-
- function Root_Parent_Type
- (Entity : in GNATCOLL.Xref.Entity_Information;
- Primitive_Op_Name : in String := "")
- return GNATCOLL.Xref.Entity_Information
- is
- use GNATCOLL.Xref;
- Result : Entity_Information := Entity;
- Parents : Entities_Cursor;
- begin
- loop
- Xref.Parent_Types (Result, Parents);
- -- There is more than one parent when the type inherits interfaces.
- -- We assume the first parent is a non-interface (if there is one),
- -- and ignore the rest.
- exit when (not Parents.Has_Element) or else
- (Primitive_Op_Name'Length > 0 and then not Has_Op (Parents.Element,
Primitive_Op_Name));
- Result := Parents.Element;
- end loop;
- return Result;
- end Root_Parent_Type;
-
- procedure All_Child_Types
- (Entity : in GNATCOLL.Xref.Entity_Information;
- Cursor : in out GNATCOLL.Xref.Recursive_Entities_Cursor)
- is begin
- GNATCOLL.Xref.Recursive
- (Self => Xref'Unchecked_Access,
- Entity => Entity,
- Compute => GNATCOLL.Xref.Child_Types'Access,
- Cursor => Cursor);
- end All_Child_Types;
-
- function Controlling_Type (Entity : in GNATCOLL.Xref.Entity_Information)
return GNATCOLL.Xref.Entity_Information
- is
- use GNATCOLL.Xref;
- -- Method_Of returns a derived type if the subprogram is not
- -- overridden for the child; the type we want is the non-child; the
- -- last item in Controlling_Types.
- Types : Entities_Cursor;
- Result : Entity_Information := No_Entity;
- begin
- Xref.Method_Of (Entity, Types);
- loop
- exit when not Has_Element (Types);
- Result := Types.Element;
- Next (Types);
- end loop;
- return Result;
- end Controlling_Type;
-
- procedure Dump_Decl (Decl : in GNATCOLL.Xref.Entity_Declaration; Annotation
: in String := "")
- is begin
- Ada.Text_IO.Put_Line
- (Xref.Image (Decl.Location) & " (" &
- (+Decl.Name) & " " &
- (if Annotation'Length = 0
- then ""
- else Annotation & " ") &
- (+Decl.Kind) & ")");
- end Dump_Decl;
-
- procedure Dump_Ref (Ref : in GNATCOLL.Xref.Entity_Reference; Annotation :
in String := "")
- is begin
- Ada.Text_IO.Put_Line
- (Xref.Image (Ref) & " (" &
- (+Xref.Declaration (Ref.Entity).Name) & " " &
- (if Annotation'Length = 0
- then ""
- else Annotation & " ") &
- (+Ref.Kind) & ")");
- end Dump_Ref;
-
- procedure Dump_Entity (Entity : in GNATCOLL.Xref.Entity_Information;
Controlling_Type_Name : in String := "")
- is
- use Ada.Strings.Unbounded;
- use GNATCOLL.Xref;
- Spec_Decl : constant Entity_Declaration := Xref.Declaration (Entity);
- Body_Decls : References_Cursor;
- Parameters : Unbounded_String;
- begin
- if Controlling_Type_Name'Length > 0 then
- Parameters := +Controlling_Type_Name & ";";
- end if;
-
- if Spec_Decl.Flags.Is_Subprogram then
- Parameters := Parameters & Get_Parameters (Spec_Decl.Location.Entity);
- end if;
-
- Xref.Bodies (Entity, Body_Decls);
- if not Has_Element (Body_Decls) then
- Dump_Decl (Spec_Decl, +Parameters);
- else
- declare
- use all type GNATCOLL.VFS.Virtual_File;
- First_Body_Ref : constant Entity_Reference := Body_Decls.Element;
- begin
- if First_Body_Ref.File = Spec_Decl.Location.File and
- First_Body_Ref.Line = Spec_Decl.Location.Line and
- First_Body_Ref.Column = Spec_Decl.Location.Column
- then
- Ada.Text_IO.Put_Line
- (Xref.Image (First_Body_Ref) & " (" & (+Spec_Decl.Name) & " "
&
- (if Length (Parameters) = 0
- then ""
- else +Parameters & " ") &
- (+Spec_Decl.Kind) & "/" & (+First_Body_Ref.Kind) & ")");
- else
- Dump_Decl (Spec_Decl, +Parameters);
- Dump_Ref (First_Body_Ref, +Parameters);
- end if;
- end;
-
- Next (Body_Decls);
-
- loop
- exit when not Has_Element (Body_Decls);
- Dump_Ref (Body_Decls.Element, +Parameters);
- Next (Body_Decls);
- end loop;
- end if;
- end Dump_Entity;
-
- procedure Process_Tree_Defs (Args : GNATCOLL.Arg_Lists.Arg_List)
- is
- -- "tree_defs" <name:loc> {short_file_names | full_file_names}
-
- use GNATCOLL.Arg_Lists;
- use GNATCOLL.Xref;
-
- Words : GNAT.Strings.String_List_Access := GNATCOLL.Utils.Split
(Nth_Arg (Args, 1), On => ':');
- Root_Parent : Entity_Information;
-
- procedure One_Entity (Orig_Entity : in Entity_Information; No_Children :
in Boolean := False)
- is
- Orig_Decl : constant Entity_Declaration := Xref.Declaration
(Orig_Entity);
- Orig_Short_Name : constant String := +Orig_Decl.Name;
-
- procedure Dump_Method
- (Type_Entity : in GNATCOLL.Xref.Entity_Information;
- Primitive_Op_Name : in String)
- is
- Type_Name : constant String := Xref.Qualified_Name (Type_Entity);
- Ops : Entities_Cursor;
- begin
- Xref.Methods (Type_Entity, Ops);
- loop
- exit when not Has_Element (Ops);
- declare
- Method_Name : constant String := +Xref.Declaration (Element
(Ops)).Name;
- begin
- if Primitive_Op_Name = Method_Name then
- -- IMPROVEME: if the method is inherited but not
overridden, use the
- -- type location.
- Dump_Entity (Element (Ops), Type_Name);
- end if;
- end;
- Next (Ops);
- end loop;
- end Dump_Method;
-
- procedure Dump_Entities (Entities : in out Recursive_Entities_Cursor)
- is begin
- loop
- exit when not Has_Element (Entities);
- if Orig_Decl.Flags.Is_Subprogram then
- Dump_Method (Entities.Element, Primitive_Op_Name =>
Orig_Short_Name);
- else
- Dump_Entity (Entities.Element);
- end if;
- Next (Entities);
- end loop;
- end Dump_Entities;
- begin
-
- if Orig_Decl.Flags.Is_Type then
- -- It is tempting to find the highest ancestor type here, then
show
- -- all types derived from that. But in Ada, that root ancestor is
- -- often Ada.Finalization.[Limited_]Controlled (or some similar
root
- -- type), so the tree is much larger than we really want. So we
just
- -- show all children of the given type; the user can then climb
the
- -- tree if they want to enlarge it. This also allows the user to
- -- choose which anscestor to examine when there is more than one,
- -- with interfaces.
- Root_Parent := Orig_Entity;
-
- elsif Orig_Decl.Flags.Is_Subprogram then
- declare
- Controlling : constant Entity_Information := Controlling_Type
(Orig_Entity);
- begin
- if Controlling = No_Entity then
- -- Not a primitive subprogram
- Dump_Entity (Orig_Entity);
- return;
- else
- if No_Children then
- Root_Parent := Controlling; -- for type name
- else
- -- Here we find the highest ancestor type that has this
method.
- -- gnatcoll.xref does not let us get the type of each
parameter, so
- -- we can't match profiles, just names.
- Root_Parent := Root_Parent_Type (Controlling,
Primitive_Op_Name => Orig_Short_Name);
- end if;
- end if;
- end;
- else
- -- Something else (variable, package, ...)
- Dump_Decl (Orig_Decl);
- return;
- end if;
-
- if No_Children then
- if Orig_Decl.Flags.Is_Type then
- Dump_Entity (Orig_Entity);
- else
- Dump_Entity (Orig_Entity, Controlling_Type_Name =>
Xref.Qualified_Name (Root_Parent));
- end if;
- else
- declare
- Child_Types : Recursive_Entities_Cursor;
- begin
- -- "Child_Types" includes generic formal parameters (ie
- -- gen_run_wisi_lr_parse.ads Parse_Data_Type) in addition to
the
- -- actual parameters.
- All_Child_Types (Root_Parent, Child_Types);
- if Orig_Decl.Flags.Is_Type then
- Dump_Entity (Root_Parent);
- else
- Dump_Method (Root_Parent, +Orig_Decl.Name);
- end if;
- Dump_Entities (Child_Types);
- end;
- end if;
- end One_Entity;
-
- use GNAT.Directory_Operations;
- begin
- Short_File_Names := Nth_Arg (Args, 2) = Short_File_Names_Arg;
-
- case Words'Length is
- when 3 | 4 =>
- One_Entity
- (Xref.Get_Entity
- (Name => Words (Words'First).all,
- File => Format_Pathname
- (Style => UNIX,
- Path => Words (Words'First + 1).all),
- Project => GNATCOLL.Projects.No_Project,
- Line => Integer'Value (Words (Words'First + 2).all),
- Column =>
- (if Words'Length = 4
- then Visible_Column (Integer'Value (Words (Words'First +
3).all))
- else -1)) -- No column; assume good enough for a precise
match
- .Entity);
-
- when 2 =>
- -- No line or column; find all matching names in file
- declare
- use GNATCOLL.VFS;
-
- Multiple : Entities_Cursor;
- Orig_File : constant Virtual_File := Locate_Regular_File
- (File_Name => +Words (Words'First + 1).all,
- Path => Source_Search_Path.all);
- Orig_File_Name : constant Filesystem_String := Full_Name
(Orig_File);
- begin
- From_Prefix (Xref, Words (Words'First).all, Is_Partial => False,
Cursor => Multiple);
-
- loop
- exit when not Has_Element (Multiple);
- declare
- Decl : constant Entity_Declaration := Xref.Declaration
(Element (Multiple));
-
- function Check_Body_File return Boolean
- is
- Bodies : References_Cursor;
- begin
- Xref.Bodies (Decl.Location.Entity, Bodies);
- loop
- exit when not Has_Element (Bodies);
- declare
- Ref : Entity_Reference renames Element (Bodies);
- begin
- if Orig_File_Name = Full_Name (Ref.File) then
- return True;
- end if;
- end;
- Next (Bodies);
- end loop;
- return False;
- end Check_Body_File;
-
- begin
- if Orig_File_Name = Full_Name (Decl.Location.File) or else
- Check_Body_File
- then
- One_Entity (Element (Multiple), No_Children => True);
- end if;
- end;
- Next (Multiple);
- end loop;
- end;
-
- when others =>
- -- No file or bad arg.
- GNAT.Strings.Free (Words);
- raise Invalid_Command with "Invalid parameter '" & Nth_Arg (Args, 1) &
- "', expecting name:file:[line[:column]]";
- end case;
-
- end Process_Tree_Defs;
-
- procedure Process_Tree_Refs (Args : GNATCOLL.Arg_Lists.Arg_List)
- is
- -- "tree_refs" <name:loc> {short_file_names | full_file_names}
-
- use GNATCOLL.Arg_Lists;
- use GNATCOLL.Xref;
-
- Orig_Entity : constant Entity_Information := Get_Entity (Nth_Arg (Args,
1));
- Orig_Decl : constant Entity_Declaration := Xref.Declaration
(Orig_Entity);
- Root_Parent : Entity_Information;
-
- procedure Dump_Type (Type_Entity : in Entity_Information)
- is
- Methods : Entities_Cursor;
- begin
- if Orig_Decl.Flags.Is_Subprogram then
- Xref.Methods (Type_Entity, Methods);
- loop
- exit when not Has_Element (Methods);
- declare
- Method_Name : constant String := +Xref.Declaration
(Methods.Element).Name;
- Refs : References_Cursor;
- begin
- if Method_Name = +Orig_Decl.Name then
- Xref.References (Methods.Element, Refs);
- Dump (Refs, +Xref.Declaration (Type_Entity).Name);
- end if;
- end;
- Next (Methods);
- end loop;
- else
- Dump_Entity (Type_Entity);
- end if;
- end Dump_Type;
-
- procedure Dump_Types (Types : in out Recursive_Entities_Cursor)
- is begin
- loop
- exit when not Has_Element (Types);
- Dump_Type (Types.Element);
- Next (Types);
- end loop;
- end Dump_Types;
- begin
- Short_File_Names := Nth_Arg (Args, 2) = Short_File_Names_Arg;
-
- if Orig_Decl.Flags.Is_Type then
- -- See comment in Process_Tree_Defs
- Root_Parent := Orig_Entity;
-
- elsif Orig_Decl.Flags.Is_Subprogram then
- declare
- Controlling : constant Entity_Information := Controlling_Type
(Orig_Entity);
- begin
- if Controlling = No_Entity then
- -- Not a primitive subprogram
- declare
- Refs : References_Cursor;
- begin
- Xref.References (Orig_Entity, Refs);
- Dump (Refs);
- return;
- end;
- else
- Root_Parent := Root_Parent_Type (Controlling, Primitive_Op_Name
=> +Orig_Decl.Name);
- end if;
- end;
- else
- -- A variable
- declare
- Refs : References_Cursor;
- begin
- Xref.References (Orig_Entity, Refs);
- Dump (Refs);
- return;
- end;
- end if;
-
- declare
- Child_Types : Recursive_Entities_Cursor;
- begin
- All_Child_Types (Root_Parent, Child_Types);
-
- Dump_Type (Root_Parent);
- Dump_Types (Child_Types);
- end;
- end Process_Tree_Refs;
-
- procedure Process_Source_Dirs (Args : GNATCOLL.Arg_Lists.Arg_List)
- is
- pragma Unreferenced (Args);
- begin
- Put (Source_Search_Path.all);
- end Process_Source_Dirs;
-
- procedure Put (Item : GNATCOLL.VFS.File_Array)
- is
- use GNATCOLL.VFS;
- begin
- for I in Item'Range loop
- Ada.Text_IO.Put_Line (+Full_Name (Item (I)));
- end loop;
- end Put;
-
- ----------
- -- SQL error reporting
- type SQL_Error_Reporter is new GNATCOLL.SQL.Exec.Error_Reporter with null
record;
-
- overriding procedure On_Error
- (Self : in out SQL_Error_Reporter;
- Connection : access GNATCOLL.SQL.Exec.Database_Connection_Record'Class;
- Message : in String)
- is
- pragma Unreferenced (Self, Connection);
- begin
- Ada.Text_IO.Put_Line ("gpr_query: sql error on create database: " &
Message);
- end On_Error;
-
- -- For some reason, gnat community 2020 doesn't like this:
- -- overriding procedure On_Warning
- -- (Self : in out SQL_Error_Reporter;
- -- Connection : access
GNATCOLL.SQL.Exec.Database_Connection_Record'Class;
- -- Message : in String)
- -- is begin
- -- Ada.Text_IO.Put_Line ("gpr_query: sql warning on create database: "
& Message);
- -- end On_Warning;
-
- Error_Reporter : aliased SQL_Error_Reporter;
-
-begin
- Ada.Text_IO.Put_Line ("version: " & Version);
-
- declare
- use GNAT.Command_Line;
- begin
- Set_Usage
- (Cmdline,
- Help => "Query project info and cross-references on source code. See
ada-mode docs for more help.");
-
- -- Switch variable alphabetic order
- Define_Switch
- (Cmdline,
- Output => ALI_Encoding'Access,
- Long_Switch => "--encoding=",
- Switch => "-e=",
- Help => "The character encoding used for source and ALI
files");
- Define_Switch
- (Cmdline,
- Output => Commands_From_Switch'Access,
- Switch => "-c:",
- Long_Switch => "--command=",
- Help => "Execute the commands from ARG, and exit");
- Define_Switch
- (Cmdline,
- Output => DB_Name'Access,
- Long_Switch => "--db=",
- Help => "Specifies the name of the database file (or
':memory:')");
- Define_Switch
- (Cmdline,
- Output => Force_Refresh'Access,
- Long_Switch => "--force_refresh",
- Help => "Force rebuilding the database.");
- Define_Switch
- (Cmdline,
- Output => Gpr_Config_File'Access,
- Long_Switch => "--autoconf=",
- Help => "Specify the gpr configuration file (.cgpr)");
- Define_Switch
- (Cmdline,
- Output => Nightly_DB_Name'Access,
- Long_Switch => "--nightlydb=",
- Help => "Specifies the name of a prebuilt database");
- Define_Switch
- (Cmdline,
- Output => Project_File_Name'Access,
- Switch => "-P:",
- Long_Switch => "--project=",
- Help => "Load the given project (mandatory)");
- Define_Switch
- (Cmdline,
- Output => Show_Progress'Access,
- Long_Switch => "--display_progress",
- Switch => "-d",
- Help => "Show progress as LI files are parsed");
- Define_Switch
- (Cmdline,
- Output => Traces_Config_File'Access,
- Long_Switch => "--tracefile=",
- Help =>
- "Specify a traces configuration file, set projects lib verbose.
File should contain ""gpr_query=yes""");
-
- Getopt (Cmdline, Callback => null);
- exception
- when Exit_From_Command_Line =>
- -- from "--help"
- return;
- end;
-
- if Project_File_Name.all = "" then
- Ada.Text_IO.Put_Line ("No project file specified");
- GNAT.Command_Line.Display_Help (Cmdline);
- return;
- end if;
-
- -- Only trace if user specifies --tracefile
- if Traces_Config_File.all /= "" and then GNAT.OS_Lib.Is_Regular_File
(Traces_Config_File.all) then
- GNATCOLL.Traces.Parse_Config_File
- (Filename => Traces_Config_File.all,
- Force_Activation => False);
- GNATCOLL.Traces.Trace (Me, "trace enabled");
- end if;
-
- GNATCOLL.Projects.Initialize (Env); -- for register_default_language
-
- if Gpr_Config_File.all /= "" and then GNAT.OS_Lib.Is_Regular_File
(Gpr_Config_File.all) then
- Env.Set_Config_File
- (GNATCOLL.VFS.Create_From_UTF8
- (GNAT.OS_Lib.Normalize_Pathname
- (Name => Gpr_Config_File.all,
- Directory => GNAT.Directory_Operations.Get_Current_Dir)));
- else
- -- Apparently Ada language extensions are already registered (sigh)
-
- Env.Register_Default_Language_Extension
- (Language_Name => "C",
- Default_Spec_Suffix => ".h",
- Default_Body_Suffix => ".c");
-
- Env.Register_Default_Language_Extension
- (Language_Name => "C++",
- Default_Spec_Suffix => ".hh",
- Default_Body_Suffix => ".cpp");
-
- end if;
-
- declare
- use Ada.Environment_Variables;
- use Ada.Text_IO;
- use GNATCOLL.VFS;
- use GNATCOLL.VFS_Utils;
-
- Gpr_Project_Path : constant String :=
- (if Exists ("GPR_PROJECT_PATH") then Ada.Directories.Current_Directory
&
- GNAT.OS_Lib.Path_Separator &
- Value ("GPR_PROJECT_PATH")
- else Ada.Directories.Current_Directory);
-
- Path : constant Virtual_File := -- must be an absolute file name
- (if Is_Absolute_Path (+Project_File_Name.all) then
- Create_From_UTF8 (Project_File_Name.all, Normalize => True)
- else
- Locate_Regular_File (+Project_File_Name.all, From_Path
(+Gpr_Project_Path)));
- begin
- GNATCOLL.Traces.Trace (Me, "GPR_PROJECT_PATH " & Gpr_Project_Path);
-
- if not Path.Is_Regular_File then
- declare
- Path : constant File_Array := From_Path (+Gpr_Project_Path);
- begin
- Put_Line (Project_File_Name.all & ": not found on path:");
- for P of Path loop
- Put_Line (+Full_Name (P));
- end loop;
- end;
- Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
- return;
- end if;
-
- GNATCOLL.Traces.Trace (Me, "project file " & (+Path.Full_Name));
-
- if Show_Progress then
- Progress_Reporter := Display_Progress'Unrestricted_Access;
- end if;
-
- begin
- -- Recompute_View => True registers all the source files
- -- (among other things), so we will know that a .[ag]li
- -- belongs to this project
- Tree.Load
- (Path, Env,
- Errors => Ada.Text_IO.Put_Line'Access,
- Recompute_View => True);
- exception
- when GNATCOLL.Projects.Invalid_Project =>
- Ada.Text_IO.Put_Line ("project search path:");
- Put (GNATCOLL.Projects.Predefined_Project_Path (Env.all));
- raise GNATCOLL.Projects.Invalid_Project with +Path.Full_Name & ":
invalid project";
- end;
- end;
-
- if DB_Name.all /= ":memory:" then
- declare
- use GNATCOLL.VFS;
-
- N : constant String := DB_Name.all;
- Temp : Virtual_File := Tree.Root_Project.Object_Dir;
- Dir2 : Virtual_File;
- begin
- GNAT.Strings.Free (DB_Name);
-
- -- If the project does not have an object directory, create
- -- the database in the directory containing the project file.
- if Temp = No_File then
- Temp := Tree.Root_Project.Project_Path.Dir;
- end if;
-
- Temp := Create_From_Base (Base_Dir => Temp.Full_Name.all, Base_Name
=> +N);
- Dir2 := Create (Temp.Dir_Name);
-
- if not Dir2.Is_Directory then
- Dir2.Make_Dir (Recursive => True);
- end if;
-
- DB_Name := new String'(Temp.Display_Full_Name);
- end;
- end if;
-
- declare
- -- Error if DB_Name does not exist but is in a read-only directory.
- -- The Errors parameter to Sqlite.Setup does not help here; it
- -- reports no error. Ada.Directories does not support a "writeable"
- -- query.
- use Ada.Directories;
- begin
- if DB_Name.all = ":memory:" then
- null;
-
- elsif Exists (DB_Name.all) then
- -- If this is read-only, we assume it is up to date and the user is
- -- just browsing.
- null;
-
- else
- declare
- use GNATCOLL.VFS;
- Dir_Name : constant String := Containing_Directory
(DB_Name.all);
- Dir_File : constant Virtual_File := Create (Filesystem_String
(Dir_Name));
- begin
- if Is_Writable (Dir_File) then
- null;
- else
- raise DB_Error with "database file '" & DB_Name.all & "' does
not exist, and directory is not writeable";
- end if;
- end;
- end if;
- end;
-
- declare
- use type GNAT.Strings.String_Access;
- Error : GNAT.Strings.String_Access;
- begin
- GNATCOLL.Traces.Trace (Me, "using database " & DB_Name.all);
-
- Setup_DB
- (Self => Xref,
- Tree => Tree'Unchecked_Access,
- DB => GNATCOLL.SQL.Sqlite.Setup
- (Database => DB_Name.all,
- Errors => Error_Reporter'Unchecked_Access),
- Error => Error);
-
- if Error /= null then
- -- old db schema
- raise DB_Error with Error.all;
- end if;
- end;
-
- Process_Refresh (GNATCOLL.Arg_Lists.Empty_Command_Line);
-
- Source_Search_Path := new GNATCOLL.VFS.File_Array'
- (GNATCOLL.Projects.Source_Dirs
- (Project => Tree.Root_Project,
- Recursive => True) &
- GNATCOLL.Projects.Predefined_Source_Path (Env.all));
-
- if Commands_From_Switch.all /= "" then
- Process_Line (Commands_From_Switch.all);
- return;
- end if;
-
- loop
- Ada.Text_IO.Put (">>> ");
- declare
- Input : constant String := Ada.Text_IO.Get_Line;
- begin
- exit when Input = "exit";
- Process_Line (Input);
- exception
- when E : Invalid_Command =>
- Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Message (E));
- Process_Help (GNATCOLL.Arg_Lists.Empty_Command_Line);
- end;
- end loop;
-
-exception
-when Ada.IO_Exceptions.End_Error =>
- null;
-when E : GNATCOLL.Projects.Invalid_Project =>
- Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Message (E));
- Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
-when E : DB_Error =>
- Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Message (E));
- Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
-when E : Invalid_Command =>
- Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Message (E));
- Process_Help (GNATCOLL.Arg_Lists.Empty_Command_Line);
- Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
-when GNAT.Command_Line.Invalid_Switch =>
- GNAT.Command_Line.Display_Help (Cmdline);
- Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
-when E : others =>
- Ada.Text_IO.Put_Line ("Unexpected exception");
- Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Information (E));
- Ada.Text_IO.Put_Line (GNAT.Traceback.Symbolic.Symbolic_Traceback
(Ada.Exceptions.Traceback.Tracebacks (E)));
- Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
-end Gpr_Query;
diff --git a/gpr_re2c.c b/gpr_re2c.c
deleted file mode 100644
index e875a72020..0000000000
--- a/gpr_re2c.c
+++ /dev/null
@@ -1,7693 +0,0 @@
-/* Generated by re2c 2.0.2 */
-#line 1 "gpr.re2c"
-// generated parser support file. -*- buffer-read-only:t mode: C -*-
-// command line: wisitoken-bnf-generate.exe --generate LR1 Ada_Emacs re2c
PROCESS gpr.wy
-//
-
-// Copyright (C) 2013 - 2022 Free Software Foundation, Inc.
-
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as
-// published by the Free Software Foundation; either version 3, or (at
-// your option) any later version.
-//
-// This software is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-typedef struct wisi_lexer
-{
- unsigned char* buffer; // input text, in utf-8 encoding
- unsigned char* buffer_last; // last byte in buffer
- unsigned char* cursor; // current byte
- unsigned char* byte_token_start; // byte position at start of current token
- size_t char_pos; // character position of current character
- size_t char_token_start; // character position at start of current
token
- int line; // 1 indexed
- int line_token_start; // line at start of current token
- unsigned char* marker; // saved cursor
- size_t marker_pos; // saved character position
- size_t marker_line; // saved line
- unsigned char* context; // saved cursor
- size_t context_pos; // saved character position
- int context_line; // saved line
- int verbosity;
-
-} wisi_lexer;
-
-#define YYCTYPE unsigned char
-
-#define NO_ERROR 0
-#define ERROR_unrecognized_character 1
-wisi_lexer* gpr_new_lexer
- (unsigned char* input, size_t length, int verbosity)
-{
- wisi_lexer* result = malloc (sizeof (wisi_lexer));
- result->buffer = input;
- result->buffer_last = input + length - 1;
- result->cursor = input;
- result->byte_token_start = input;
- result->char_pos = 1; /* match WisiToken.Buffer_Region */
- result->char_token_start = 1;
- result->line = 1;
- result->line_token_start = result->line;
- result->verbosity = 0;
- return result;
-}
-
-void
-gpr_free_lexer(wisi_lexer** lexer)
-{
- free(*lexer);
- *lexer = 0;
-}
-
-void
-gpr_reset_lexer(wisi_lexer* lexer)
-{
- lexer->cursor = lexer->buffer;
- lexer->char_pos = 1;
- lexer->line = 1;
-}
-
-void
-gpr_set_verbosity
- (wisi_lexer* lexer, int verbosity)
-{
- lexer->verbosity = verbosity;
-}
-
-void
-gpr_set_position
- (wisi_lexer* lexer, size_t byte_position, size_t char_position, int line)
-{
- lexer->cursor = lexer->buffer + byte_position - 1;
- lexer->char_pos = char_position;
- lexer->line = line;
-}
-
-static void debug(wisi_lexer* lexer, int state, unsigned char ch)
-{
- if (lexer->verbosity > 0)
- {
- if (ch < ' ')
- printf ("lexer: %d, 0x%x\n", state, ch);
- else
- printf ("lexer: %d, '%c' 0x%x\n", state, ch, ch);
- }
-}
-#define YYDEBUG(state, ch) debug(lexer, state, ch)
-#define YYCURSOR lexer->cursor
-
-#define YYPEEK() (lexer->cursor <= lexer->buffer_last) ? *lexer->cursor : 4
-
-static void skip(wisi_lexer* lexer)
-{
- if (lexer->cursor <= lexer->buffer_last)
- {
- ++lexer->cursor;
- if (lexer->cursor <= lexer->buffer_last)
- {
- /* UFT-8 encoding: https://en.wikipedia.org/wiki/UTF-8#Description */
- if (*lexer->cursor == 0x0A && lexer->cursor > lexer->buffer &&
*(lexer->cursor - 1) == 0x0D)
- {/* second byte of DOS line ending */
- }
- else if ((*lexer->cursor & 0x80) == 0x80 && (*lexer->cursor & 0xC0)
!= 0xC0)
- {/* byte 2, 3 or 4 of multi-byte UTF-8 char */
- }
- else
- lexer->char_pos++;
- } else
- lexer->char_pos++;
- }
-}
-#define YYSKIP() skip(lexer)
-#define YYBACKUP() lexer->marker = lexer->cursor; lexer->marker_pos =
lexer->char_pos;lexer->marker_line = lexer->line
-#define YYRESTORE() lexer->cursor = lexer->marker; lexer->char_pos =
lexer->marker_pos;lexer->line = lexer->marker_line
-#define YYBACKUPCTX() lexer->context = lexer->cursor; lexer->context_pos =
lexer->char_pos;lexer->context_line = lexer->line
-#define YYRESTORECTX() lexer->cursor = lexer->context; lexer->char_pos =
lexer->context_pos;lexer->line = lexer->context_line
-
-int gpr_next_token
- (wisi_lexer* lexer,
- int* id,
- size_t* byte_position,
- size_t* byte_length,
- size_t* char_position,
- size_t* char_length,
- int* line_start,
- int* line_length)
-{
- int status = NO_ERROR;
- *id = -1;
- if (lexer->cursor > lexer->buffer_last)
- {
- *id = 41;
- *byte_position = lexer->buffer_last - lexer->buffer + 2;
- *byte_length = 0;
- *char_position = lexer->char_pos;
- *char_length = 0;
- *line_start = lexer->line;
- *line_length = 0;
- return status;
- }
-
- lexer->byte_token_start = lexer->cursor;
- lexer->char_token_start = lexer->char_pos;
- lexer->line_token_start = lexer->line;
-
- while (*id == -1 && status == 0)
- {
-
-#line 170 "gpr_re2c.c"
-{
- YYCTYPE yych;
- unsigned int yyaccept = 0;
- YYDEBUG(0, *YYCURSOR);
- yych = YYPEEK();
- switch (yych) {
- case 0x04: goto yy4;
- case '\t':
- case ' ': goto yy6;
- case '\n': goto yy8;
- case '\r': goto yy10;
- case '"': goto yy11;
- case '#': goto yy12;
- case '&': goto yy13;
- case '\'': goto yy15;
- case '(': goto yy17;
- case ')': goto yy19;
- case ',': goto yy21;
- case '-': goto yy23;
- case '.': goto yy24;
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy26;
- case ':': goto yy29;
- case ';': goto yy31;
- case '=': goto yy33;
- case 'A':
- case 'a': goto yy34;
- case 'B':
- case 'D':
- case 'G':
- case 'H':
- case 'J':
- case 'K':
- case 'M':
- case 'Q':
- case 'V':
- case 'X':
- case 'Y':
- case 'Z':
- case 'b':
- case 'd':
- case 'g':
- case 'h':
- case 'j':
- case 'k':
- case 'm':
- case 'q':
- case 'v':
- case 'x':
- case 'y':
- case 'z': goto yy36;
- case 'C':
- case 'c': goto yy38;
- case 'E':
- case 'e': goto yy39;
- case 'F':
- case 'f': goto yy40;
- case 'I':
- case 'i': goto yy41;
- case 'L':
- case 'l': goto yy42;
- case 'N':
- case 'n': goto yy43;
- case 'O':
- case 'o': goto yy44;
- case 'P':
- case 'p': goto yy45;
- case 'R':
- case 'r': goto yy46;
- case 'S':
- case 's': goto yy47;
- case 'T':
- case 't': goto yy48;
- case 'U':
- case 'u': goto yy49;
- case 'W':
- case 'w': goto yy50;
- case '{': goto yy51;
- case '|': goto yy52;
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF: goto yy54;
- case 0xE0: goto yy55;
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF: goto yy56;
- case 0xF0: goto yy57;
- case 0xF1:
- case 0xF2:
- case 0xF3: goto yy58;
- case 0xF4: goto yy59;
- default: goto yy2;
- }
-yy2:
- YYDEBUG(2, YYPEEK());
- YYSKIP();
-yy3:
- YYDEBUG(3, YYPEEK());
-#line 260 "gpr.re2c"
- {status = ERROR_unrecognized_character; continue;}
-#line 318 "gpr_re2c.c"
-yy4:
- YYDEBUG(4, YYPEEK());
- YYSKIP();
- YYDEBUG(5, YYPEEK());
-#line 258 "gpr.re2c"
- {*id = 41; continue;}
-#line 325 "gpr_re2c.c"
-yy6:
- YYDEBUG(6, YYPEEK());
- YYSKIP();
- YYDEBUG(7, YYPEEK());
-#line 214 "gpr.re2c"
- { lexer->byte_token_start = lexer->cursor;
- lexer->char_token_start = lexer->char_pos;
- lexer->line_token_start = lexer->line;
- continue; }
-#line 335 "gpr_re2c.c"
-yy8:
- YYDEBUG(8, YYPEEK());
- YYSKIP();
- YYDEBUG(9, YYPEEK());
-#line 218 "gpr.re2c"
- {*id = 1; lexer->line++; continue;}
-#line 342 "gpr_re2c.c"
-yy10:
- YYDEBUG(10, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case '\n': goto yy8;
- default: goto yy3;
- }
-yy11:
- YYDEBUG(11, YYPEEK());
- yyaccept = 0;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case ' ':
- case '!':
- case '"':
- case '#':
- case '$':
- case '%':
- case '&':
- case '\'':
- case '(':
- case ')':
- case '*':
- case '+':
- case ',':
- case '-':
- case '.':
- case '/':
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case ':':
- case ';':
- case '<':
- case '=':
- case '>':
- case '?':
- case '@':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '[':
- case '\\':
- case ']':
- case '^':
- case '_':
- case '`':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case '{':
- case '|':
- case '}':
- case '~':
- case 0x7F:
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy61;
- default: goto yy3;
- }
-yy12:
- YYDEBUG(12, YYPEEK());
- yyaccept = 0;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'e': goto yy71;
- case 'i': goto yy72;
- default: goto yy3;
- }
-yy13:
- YYDEBUG(13, YYPEEK());
- YYSKIP();
- YYDEBUG(14, YYPEEK());
-#line 246 "gpr.re2c"
- {*id = 29; continue;}
-#line 524 "gpr_re2c.c"
-yy15:
- YYDEBUG(15, YYPEEK());
- YYSKIP();
- YYDEBUG(16, YYPEEK());
-#line 252 "gpr.re2c"
- {*id = 35; continue;}
-#line 531 "gpr_re2c.c"
-yy17:
- YYDEBUG(17, YYPEEK());
- YYSKIP();
- YYDEBUG(18, YYPEEK());
-#line 233 "gpr.re2c"
- {*id = 16; continue;}
-#line 538 "gpr_re2c.c"
-yy19:
- YYDEBUG(19, YYPEEK());
- YYSKIP();
- YYDEBUG(20, YYPEEK());
-#line 240 "gpr.re2c"
- {*id = 23; continue;}
-#line 545 "gpr_re2c.c"
-yy21:
- YYDEBUG(21, YYPEEK());
- YYSKIP();
- YYDEBUG(22, YYPEEK());
-#line 249 "gpr.re2c"
- {*id = 32; continue;}
-#line 552 "gpr_re2c.c"
-yy23:
- YYDEBUG(23, YYPEEK());
- yyaccept = 0;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '-': goto yy73;
- default: goto yy3;
- }
-yy24:
- YYDEBUG(24, YYPEEK());
- YYSKIP();
- YYDEBUG(25, YYPEEK());
-#line 250 "gpr.re2c"
- {*id = 33; continue;}
-#line 569 "gpr_re2c.c"
-yy26:
- YYDEBUG(26, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- YYDEBUG(27, YYPEEK());
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy26;
- default: goto yy28;
- }
-yy28:
- YYDEBUG(28, YYPEEK());
-#line 255 "gpr.re2c"
- {*id = 38; continue;}
-#line 592 "gpr_re2c.c"
-yy29:
- YYDEBUG(29, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case '=': goto yy75;
- default: goto yy30;
- }
-yy30:
- YYDEBUG(30, YYPEEK());
-#line 247 "gpr.re2c"
- {*id = 30; continue;}
-#line 605 "gpr_re2c.c"
-yy31:
- YYDEBUG(31, YYPEEK());
- YYSKIP();
- YYDEBUG(32, YYPEEK());
-#line 253 "gpr.re2c"
- {*id = 36; continue;}
-#line 612 "gpr_re2c.c"
-yy33:
- YYDEBUG(33, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case '>': goto yy77;
- default: goto yy3;
- }
-yy34:
- YYDEBUG(34, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'B':
- case 'b': goto yy79;
- case 'G':
- case 'g': goto yy80;
- case 'T':
- case 't': goto yy81;
- default: goto yy37;
- }
-yy35:
- YYDEBUG(35, YYPEEK());
-#line 256 "gpr.re2c"
- {*id = 39; continue;}
-#line 640 "gpr_re2c.c"
-yy36:
- YYDEBUG(36, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
-yy37:
- YYDEBUG(37, YYPEEK());
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z': goto yy36;
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF: goto yy83;
- case 0xE0: goto yy84;
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF: goto yy85;
- case 0xF0: goto yy86;
- case 0xF1:
- case 0xF2:
- case 0xF3: goto yy87;
- case 0xF4: goto yy88;
- default: goto yy35;
- }
-yy38:
- YYDEBUG(38, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'A':
- case 'a': goto yy89;
- case 'O':
- case 'o': goto yy90;
- default: goto yy37;
- }
-yy39:
- YYDEBUG(39, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'N':
- case 'n': goto yy91;
- case 'X':
- case 'x': goto yy92;
- default: goto yy37;
- }
-yy40:
- YYDEBUG(40, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'O':
- case 'o': goto yy93;
- default: goto yy37;
- }
-yy41:
- YYDEBUG(41, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'S':
- case 's': goto yy94;
- default: goto yy37;
- }
-yy42:
- YYDEBUG(42, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'I':
- case 'i': goto yy96;
- default: goto yy37;
- }
-yy43:
- YYDEBUG(43, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'U':
- case 'u': goto yy97;
- default: goto yy37;
- }
-yy44:
- YYDEBUG(44, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'T':
- case 't': goto yy98;
- default: goto yy37;
- }
-yy45:
- YYDEBUG(45, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'A':
- case 'a': goto yy99;
- case 'R':
- case 'r': goto yy100;
- default: goto yy37;
- }
-yy46:
- YYDEBUG(46, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'E':
- case 'e': goto yy101;
- default: goto yy37;
- }
-yy47:
- YYDEBUG(47, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'T':
- case 't': goto yy102;
- default: goto yy37;
- }
-yy48:
- YYDEBUG(48, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'Y':
- case 'y': goto yy103;
- default: goto yy37;
- }
-yy49:
- YYDEBUG(49, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'S':
- case 's': goto yy104;
- default: goto yy37;
- }
-yy50:
- YYDEBUG(50, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'H':
- case 'h': goto yy105;
- case 'I':
- case 'i': goto yy106;
- default: goto yy37;
- }
-yy51:
- YYDEBUG(51, YYPEEK());
- yyaccept = 0;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 0x00:
- case 0x01:
- case 0x02:
- case 0x03:
- case 0x05:
- case 0x06:
- case 0x07:
- case 0x08:
- case '\t':
- case '\v':
- case '\f':
- case '\r':
- case 0x0E:
- case 0x0F:
- case 0x10:
- case 0x11:
- case 0x12:
- case 0x13:
- case 0x14:
- case 0x15:
- case 0x16:
- case 0x17:
- case 0x18:
- case 0x19:
- case 0x1A:
- case 0x1B:
- case 0x1C:
- case 0x1D:
- case 0x1E:
- case 0x1F:
- case ' ':
- case '!':
- case '"':
- case '#':
- case '$':
- case '%':
- case '&':
- case '\'':
- case '(':
- case ')':
- case '*':
- case '+':
- case ',':
- case '-':
- case '.':
- case '/':
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case ':':
- case ';':
- case '<':
- case '=':
- case '>':
- case '?':
- case '@':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '[':
- case '\\':
- case ']':
- case '^':
- case '_':
- case '`':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case '{':
- case '|':
- case '}':
- case '~':
- case 0x7F:
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy108;
- default: goto yy3;
- }
-yy52:
- YYDEBUG(52, YYPEEK());
- YYSKIP();
- YYDEBUG(53, YYPEEK());
-#line 254 "gpr.re2c"
- {*id = 37; continue;}
-#line 1109 "gpr_re2c.c"
-yy54:
- YYDEBUG(54, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F:
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy36;
- default: goto yy3;
- }
-yy55:
- YYDEBUG(55, YYPEEK());
- yyaccept = 0;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy83;
- default: goto yy3;
- }
-yy56:
- YYDEBUG(56, YYPEEK());
- yyaccept = 0;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F:
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy83;
- default: goto yy3;
- }
-yy57:
- YYDEBUG(57, YYPEEK());
- yyaccept = 0;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy85;
- default: goto yy3;
- }
-yy58:
- YYDEBUG(58, YYPEEK());
- yyaccept = 0;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F:
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy85;
- default: goto yy3;
- }
-yy59:
- YYDEBUG(59, YYPEEK());
- yyaccept = 0;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F: goto yy85;
- default: goto yy3;
- }
-yy60:
- YYDEBUG(60, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
-yy61:
- YYDEBUG(61, YYPEEK());
- switch (yych) {
- case ' ':
- case '!':
- case '#':
- case '$':
- case '%':
- case '&':
- case '\'':
- case '(':
- case ')':
- case '*':
- case '+':
- case ',':
- case '-':
- case '.':
- case '/':
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case ':':
- case ';':
- case '<':
- case '=':
- case '>':
- case '?':
- case '@':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '[':
- case '\\':
- case ']':
- case '^':
- case '_':
- case '`':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case '{':
- case '|':
- case '}':
- case '~':
- case 0x7F: goto yy60;
- case '"': goto yy63;
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF: goto yy65;
- case 0xE0: goto yy66;
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF: goto yy67;
- case 0xF0: goto yy68;
- case 0xF1:
- case 0xF2:
- case 0xF3: goto yy69;
- case 0xF4: goto yy70;
- default: goto yy62;
- }
-yy62:
- YYDEBUG(62, YYPEEK());
- YYRESTORE();
- switch (yyaccept) {
- case 0:
- goto yy3;
- case 1:
- goto yy35;
- case 2:
- goto yy64;
- case 3:
- goto yy82;
- case 4:
- goto yy95;
- case 5:
- goto yy134;
- case 6:
- goto yy137;
- case 7:
- goto yy147;
- case 8:
- goto yy162;
- case 9:
- goto yy167;
- case 10:
- goto yy174;
- case 11:
- goto yy176;
- case 12:
- goto yy178;
- case 13:
- goto yy197;
- case 14:
- goto yy206;
- case 15:
- goto yy209;
- case 16:
- goto yy211;
- case 17:
- goto yy213;
- case 18:
- goto yy215;
- case 19:
- goto yy218;
- case 20:
- goto yy222;
- case 21:
- goto yy224;
- case 22:
- goto yy226;
- case 23:
- goto yy236;
- default:
- goto yy241;
- }
-yy63:
- YYDEBUG(63, YYPEEK());
- yyaccept = 2;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '"': goto yy60;
- default: goto yy64;
- }
-yy64:
- YYDEBUG(64, YYPEEK());
-#line 257 "gpr.re2c"
- {*id = 40; continue;}
-#line 1675 "gpr_re2c.c"
-yy65:
- YYDEBUG(65, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F:
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy60;
- default: goto yy62;
- }
-yy66:
- YYDEBUG(66, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy65;
- default: goto yy62;
- }
-yy67:
- YYDEBUG(67, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F:
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy65;
- default: goto yy62;
- }
-yy68:
- YYDEBUG(68, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy67;
- default: goto yy62;
- }
-yy69:
- YYDEBUG(69, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F:
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy67;
- default: goto yy62;
- }
-yy70:
- YYDEBUG(70, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F: goto yy67;
- default: goto yy62;
- }
-yy71:
- YYDEBUG(71, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'l': goto yy117;
- case 'n': goto yy118;
- default: goto yy62;
- }
-yy72:
- YYDEBUG(72, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'f': goto yy119;
- default: goto yy62;
- }
-yy73:
- YYDEBUG(73, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- YYDEBUG(74, YYPEEK());
- switch (yych) {
- case 0x00:
- case 0x01:
- case 0x02:
- case 0x03:
- case 0x05:
- case 0x06:
- case 0x07:
- case 0x08:
- case '\t':
- case '\v':
- case '\f':
- case '\r':
- case 0x0E:
- case 0x0F:
- case 0x10:
- case 0x11:
- case 0x12:
- case 0x13:
- case 0x14:
- case 0x15:
- case 0x16:
- case 0x17:
- case 0x18:
- case 0x19:
- case 0x1A:
- case 0x1B:
- case 0x1C:
- case 0x1D:
- case 0x1E:
- case 0x1F:
- case ' ':
- case '!':
- case '"':
- case '#':
- case '$':
- case '%':
- case '&':
- case '\'':
- case '(':
- case ')':
- case '*':
- case '+':
- case ',':
- case '-':
- case '.':
- case '/':
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case ':':
- case ';':
- case '<':
- case '=':
- case '>':
- case '?':
- case '@':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '[':
- case '\\':
- case ']':
- case '^':
- case '_':
- case '`':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case '{':
- case '|':
- case '}':
- case '~':
- case 0x7F: goto yy73;
- case 0x04:
- case '\n': goto yy121;
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF: goto yy123;
- case 0xE0: goto yy124;
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF: goto yy125;
- case 0xF0: goto yy126;
- case 0xF1:
- case 0xF2:
- case 0xF3: goto yy127;
- case 0xF4: goto yy128;
- default: goto yy62;
- }
-yy75:
- YYDEBUG(75, YYPEEK());
- YYSKIP();
- YYDEBUG(76, YYPEEK());
-#line 248 "gpr.re2c"
- {*id = 31; continue;}
-#line 2216 "gpr_re2c.c"
-yy77:
- YYDEBUG(77, YYPEEK());
- YYSKIP();
- YYDEBUG(78, YYPEEK());
-#line 251 "gpr.re2c"
- {*id = 34; continue;}
-#line 2223 "gpr_re2c.c"
-yy79:
- YYDEBUG(79, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'S':
- case 's': goto yy129;
- default: goto yy37;
- }
-yy80:
- YYDEBUG(80, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'G':
- case 'g': goto yy130;
- default: goto yy37;
- }
-yy81:
- YYDEBUG(81, YYPEEK());
- yyaccept = 3;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- default: goto yy82;
- }
-yy82:
- YYDEBUG(82, YYPEEK());
-#line 223 "gpr.re2c"
- {*id = 6; continue;}
-#line 2373 "gpr_re2c.c"
-yy83:
- YYDEBUG(83, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F:
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy36;
- default: goto yy62;
- }
-yy84:
- YYDEBUG(84, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy83;
- default: goto yy62;
- }
-yy85:
- YYDEBUG(85, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F:
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy83;
- default: goto yy62;
- }
-yy86:
- YYDEBUG(86, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy85;
- default: goto yy62;
- }
-yy87:
- YYDEBUG(87, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F:
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy85;
- default: goto yy62;
- }
-yy88:
- YYDEBUG(88, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F: goto yy85;
- default: goto yy62;
- }
-yy89:
- YYDEBUG(89, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'S':
- case 's': goto yy131;
- default: goto yy37;
- }
-yy90:
- YYDEBUG(90, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'N':
- case 'n': goto yy132;
- default: goto yy37;
- }
-yy91:
- YYDEBUG(91, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'D':
- case 'd': goto yy133;
- default: goto yy37;
- }
-yy92:
- YYDEBUG(92, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'T':
- case 't': goto yy135;
- default: goto yy37;
- }
-yy93:
- YYDEBUG(93, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'R':
- case 'r': goto yy136;
- default: goto yy37;
- }
-yy94:
- YYDEBUG(94, YYPEEK());
- yyaccept = 4;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- default: goto yy95;
- }
-yy95:
- YYDEBUG(95, YYPEEK());
-#line 232 "gpr.re2c"
- {*id = 15; continue;}
-#line 2886 "gpr_re2c.c"
-yy96:
- YYDEBUG(96, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'B':
- case 'b': goto yy138;
- default: goto yy37;
- }
-yy97:
- YYDEBUG(97, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'L':
- case 'l': goto yy139;
- default: goto yy37;
- }
-yy98:
- YYDEBUG(98, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'H':
- case 'h': goto yy140;
- default: goto yy37;
- }
-yy99:
- YYDEBUG(99, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'C':
- case 'c': goto yy141;
- default: goto yy37;
- }
-yy100:
- YYDEBUG(100, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'O':
- case 'o': goto yy142;
- default: goto yy37;
- }
-yy101:
- YYDEBUG(101, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'N':
- case 'n': goto yy143;
- default: goto yy37;
- }
-yy102:
- YYDEBUG(102, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'A':
- case 'a': goto yy144;
- default: goto yy37;
- }
-yy103:
- YYDEBUG(103, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'P':
- case 'p': goto yy145;
- default: goto yy37;
- }
-yy104:
- YYDEBUG(104, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'E':
- case 'e': goto yy146;
- default: goto yy37;
- }
-yy105:
- YYDEBUG(105, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'E':
- case 'e': goto yy148;
- default: goto yy37;
- }
-yy106:
- YYDEBUG(106, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'T':
- case 't': goto yy149;
- default: goto yy37;
- }
-yy107:
- YYDEBUG(107, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
-yy108:
- YYDEBUG(108, YYPEEK());
- switch (yych) {
- case 0x00:
- case 0x01:
- case 0x02:
- case 0x03:
- case 0x05:
- case 0x06:
- case 0x07:
- case 0x08:
- case '\t':
- case '\v':
- case '\f':
- case '\r':
- case 0x0E:
- case 0x0F:
- case 0x10:
- case 0x11:
- case 0x12:
- case 0x13:
- case 0x14:
- case 0x15:
- case 0x16:
- case 0x17:
- case 0x18:
- case 0x19:
- case 0x1A:
- case 0x1B:
- case 0x1C:
- case 0x1D:
- case 0x1E:
- case 0x1F:
- case ' ':
- case '!':
- case '"':
- case '#':
- case '$':
- case '%':
- case '&':
- case '\'':
- case '(':
- case ')':
- case '*':
- case '+':
- case ',':
- case '-':
- case '.':
- case '/':
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case ':':
- case ';':
- case '<':
- case '=':
- case '>':
- case '?':
- case '@':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '[':
- case '\\':
- case ']':
- case '^':
- case '_':
- case '`':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case '{':
- case '|':
- case '~':
- case 0x7F: goto yy107;
- case '}': goto yy109;
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF: goto yy111;
- case 0xE0: goto yy112;
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF: goto yy113;
- case 0xF0: goto yy114;
- case 0xF1:
- case 0xF2:
- case 0xF3: goto yy115;
- case 0xF4: goto yy116;
- default: goto yy62;
- }
-yy109:
- YYDEBUG(109, YYPEEK());
- YYSKIP();
- YYDEBUG(110, YYPEEK());
-#line 221 "gpr.re2c"
- {*id = 4; if (lexer->cursor[-1] == 0x0a || (lexer->cursor[-1] == 0x0d
&& lexer->cursor[-2] == 0x0a)) lexer->line++; continue;}
-#line 3200 "gpr_re2c.c"
-yy111:
- YYDEBUG(111, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F:
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy107;
- default: goto yy62;
- }
-yy112:
- YYDEBUG(112, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy111;
- default: goto yy62;
- }
-yy113:
- YYDEBUG(113, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F:
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy111;
- default: goto yy62;
- }
-yy114:
- YYDEBUG(114, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy113;
- default: goto yy62;
- }
-yy115:
- YYDEBUG(115, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F:
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy113;
- default: goto yy62;
- }
-yy116:
- YYDEBUG(116, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F: goto yy113;
- default: goto yy62;
- }
-yy117:
- YYDEBUG(117, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 's': goto yy150;
- default: goto yy62;
- }
-yy118:
- YYDEBUG(118, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'd': goto yy119;
- default: goto yy62;
- }
-yy119:
- YYDEBUG(119, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- YYDEBUG(120, YYPEEK());
- switch (yych) {
- case 0x00:
- case 0x01:
- case 0x02:
- case 0x03:
- case 0x05:
- case 0x06:
- case 0x07:
- case 0x08:
- case '\t':
- case '\v':
- case '\f':
- case '\r':
- case 0x0E:
- case 0x0F:
- case 0x10:
- case 0x11:
- case 0x12:
- case 0x13:
- case 0x14:
- case 0x15:
- case 0x16:
- case 0x17:
- case 0x18:
- case 0x19:
- case 0x1A:
- case 0x1B:
- case 0x1C:
- case 0x1D:
- case 0x1E:
- case 0x1F:
- case ' ':
- case '!':
- case '"':
- case '#':
- case '$':
- case '%':
- case '&':
- case '\'':
- case '(':
- case ')':
- case '*':
- case '+':
- case ',':
- case '-':
- case '.':
- case '/':
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case ':':
- case ';':
- case '<':
- case '=':
- case '>':
- case '?':
- case '@':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '[':
- case '\\':
- case ']':
- case '^':
- case '_':
- case '`':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case '{':
- case '|':
- case '}':
- case '~':
- case 0x7F: goto yy119;
- case 0x04:
- case '\n': goto yy151;
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF: goto yy153;
- case 0xE0: goto yy154;
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF: goto yy155;
- case 0xF0: goto yy156;
- case 0xF1:
- case 0xF2:
- case 0xF3: goto yy157;
- case 0xF4: goto yy158;
- default: goto yy62;
- }
-yy121:
- YYDEBUG(121, YYPEEK());
- YYSKIP();
- YYDEBUG(122, YYPEEK());
-#line 219 "gpr.re2c"
- {*id = 2; if (lexer->cursor[-1] == 0x0a || (lexer->cursor[-1] == 0x0d
&& lexer->cursor[-2] == 0x0a)) lexer->line++; continue;}
-#line 3740 "gpr_re2c.c"
-yy123:
- YYDEBUG(123, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F:
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy73;
- default: goto yy62;
- }
-yy124:
- YYDEBUG(124, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy123;
- default: goto yy62;
- }
-yy125:
- YYDEBUG(125, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F:
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy123;
- default: goto yy62;
- }
-yy126:
- YYDEBUG(126, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy125;
- default: goto yy62;
- }
-yy127:
- YYDEBUG(127, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F:
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy125;
- default: goto yy62;
- }
-yy128:
- YYDEBUG(128, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F: goto yy125;
- default: goto yy62;
- }
-yy129:
- YYDEBUG(129, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'T':
- case 't': goto yy159;
- default: goto yy37;
- }
-yy130:
- YYDEBUG(130, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'R':
- case 'r': goto yy160;
- default: goto yy37;
- }
-yy131:
- YYDEBUG(131, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'E':
- case 'e': goto yy161;
- default: goto yy37;
- }
-yy132:
- YYDEBUG(132, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'F':
- case 'f': goto yy163;
- default: goto yy37;
- }
-yy133:
- YYDEBUG(133, YYPEEK());
- yyaccept = 5;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- default: goto yy134;
- }
-yy134:
- YYDEBUG(134, YYPEEK());
-#line 227 "gpr.re2c"
- {*id = 10; continue;}
-#line 4242 "gpr_re2c.c"
-yy135:
- YYDEBUG(135, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'E':
- case 'e': goto yy164;
- default: goto yy37;
- }
-yy136:
- YYDEBUG(136, YYPEEK());
- yyaccept = 6;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- default: goto yy137;
- }
-yy137:
- YYDEBUG(137, YYPEEK());
-#line 231 "gpr.re2c"
- {*id = 14; continue;}
-#line 4381 "gpr_re2c.c"
-yy138:
- YYDEBUG(138, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'R':
- case 'r': goto yy165;
- default: goto yy37;
- }
-yy139:
- YYDEBUG(139, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'L':
- case 'l': goto yy166;
- default: goto yy37;
- }
-yy140:
- YYDEBUG(140, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'E':
- case 'e': goto yy168;
- default: goto yy37;
- }
-yy141:
- YYDEBUG(141, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'K':
- case 'k': goto yy169;
- default: goto yy37;
- }
-yy142:
- YYDEBUG(142, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'J':
- case 'j': goto yy170;
- default: goto yy37;
- }
-yy143:
- YYDEBUG(143, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'A':
- case 'a': goto yy171;
- default: goto yy37;
- }
-yy144:
- YYDEBUG(144, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'N':
- case 'n': goto yy172;
- default: goto yy37;
- }
-yy145:
- YYDEBUG(145, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'E':
- case 'e': goto yy173;
- default: goto yy37;
- }
-yy146:
- YYDEBUG(146, YYPEEK());
- yyaccept = 7;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- default: goto yy147;
- }
-yy147:
- YYDEBUG(147, YYPEEK());
-#line 243 "gpr.re2c"
- {*id = 26; continue;}
-#line 4597 "gpr_re2c.c"
-yy148:
- YYDEBUG(148, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'N':
- case 'n': goto yy175;
- default: goto yy37;
- }
-yy149:
- YYDEBUG(149, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'H':
- case 'h': goto yy177;
- default: goto yy37;
- }
-yy150:
- YYDEBUG(150, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'e': goto yy119;
- case 'i': goto yy72;
- default: goto yy62;
- }
-yy151:
- YYDEBUG(151, YYPEEK());
- YYSKIP();
- YYDEBUG(152, YYPEEK());
-#line 220 "gpr.re2c"
- {*id = 3; if (lexer->cursor[-1] == 0x0a || (lexer->cursor[-1] == 0x0d
&& lexer->cursor[-2] == 0x0a)) lexer->line++; continue;}
-#line 4635 "gpr_re2c.c"
-yy153:
- YYDEBUG(153, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F:
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy119;
- default: goto yy62;
- }
-yy154:
- YYDEBUG(154, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy153;
- default: goto yy62;
- }
-yy155:
- YYDEBUG(155, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F:
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy153;
- default: goto yy62;
- }
-yy156:
- YYDEBUG(156, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy155;
- default: goto yy62;
- }
-yy157:
- YYDEBUG(157, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F:
- case 0x90:
- case 0x91:
- case 0x92:
- case 0x93:
- case 0x94:
- case 0x95:
- case 0x96:
- case 0x97:
- case 0x98:
- case 0x99:
- case 0x9A:
- case 0x9B:
- case 0x9C:
- case 0x9D:
- case 0x9E:
- case 0x9F:
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- case 0xA4:
- case 0xA5:
- case 0xA6:
- case 0xA7:
- case 0xA8:
- case 0xA9:
- case 0xAA:
- case 0xAB:
- case 0xAC:
- case 0xAD:
- case 0xAE:
- case 0xAF:
- case 0xB0:
- case 0xB1:
- case 0xB2:
- case 0xB3:
- case 0xB4:
- case 0xB5:
- case 0xB6:
- case 0xB7:
- case 0xB8:
- case 0xB9:
- case 0xBA:
- case 0xBB:
- case 0xBC:
- case 0xBD:
- case 0xBE:
- case 0xBF: goto yy155;
- default: goto yy62;
- }
-yy158:
- YYDEBUG(158, YYPEEK());
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 0x80:
- case 0x81:
- case 0x82:
- case 0x83:
- case 0x84:
- case 0x85:
- case 0x86:
- case 0x87:
- case 0x88:
- case 0x89:
- case 0x8A:
- case 0x8B:
- case 0x8C:
- case 0x8D:
- case 0x8E:
- case 0x8F: goto yy155;
- default: goto yy62;
- }
-yy159:
- YYDEBUG(159, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'R':
- case 'r': goto yy179;
- default: goto yy37;
- }
-yy160:
- YYDEBUG(160, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'E':
- case 'e': goto yy180;
- default: goto yy37;
- }
-yy161:
- YYDEBUG(161, YYPEEK());
- yyaccept = 8;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- default: goto yy162;
- }
-yy162:
- YYDEBUG(162, YYPEEK());
-#line 225 "gpr.re2c"
- {*id = 8; continue;}
-#line 5115 "gpr_re2c.c"
-yy163:
- YYDEBUG(163, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'I':
- case 'i': goto yy181;
- default: goto yy37;
- }
-yy164:
- YYDEBUG(164, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'N':
- case 'n': goto yy182;
- case 'R':
- case 'r': goto yy183;
- default: goto yy37;
- }
-yy165:
- YYDEBUG(165, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'A':
- case 'a': goto yy184;
- default: goto yy37;
- }
-yy166:
- YYDEBUG(166, YYPEEK());
- yyaccept = 9;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- default: goto yy167;
- }
-yy167:
- YYDEBUG(167, YYPEEK());
-#line 235 "gpr.re2c"
- {*id = 18; continue;}
-#line 5278 "gpr_re2c.c"
-yy168:
- YYDEBUG(168, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'R':
- case 'r': goto yy185;
- default: goto yy37;
- }
-yy169:
- YYDEBUG(169, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'A':
- case 'a': goto yy186;
- default: goto yy37;
- }
-yy170:
- YYDEBUG(170, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'E':
- case 'e': goto yy187;
- default: goto yy37;
- }
-yy171:
- YYDEBUG(171, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'M':
- case 'm': goto yy188;
- default: goto yy37;
- }
-yy172:
- YYDEBUG(172, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'D':
- case 'd': goto yy189;
- default: goto yy37;
- }
-yy173:
- YYDEBUG(173, YYPEEK());
- yyaccept = 10;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- default: goto yy174;
- }
-yy174:
- YYDEBUG(174, YYPEEK());
-#line 242 "gpr.re2c"
- {*id = 25; continue;}
-#line 5461 "gpr_re2c.c"
-yy175:
- YYDEBUG(175, YYPEEK());
- yyaccept = 11;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- default: goto yy176;
- }
-yy176:
- YYDEBUG(176, YYPEEK());
-#line 244 "gpr.re2c"
- {*id = 27; continue;}
-#line 5589 "gpr_re2c.c"
-yy177:
- YYDEBUG(177, YYPEEK());
- yyaccept = 12;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- default: goto yy178;
- }
-yy178:
- YYDEBUG(178, YYPEEK());
-#line 245 "gpr.re2c"
- {*id = 28; continue;}
-#line 5717 "gpr_re2c.c"
-yy179:
- YYDEBUG(179, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'A':
- case 'a': goto yy190;
- default: goto yy37;
- }
-yy180:
- YYDEBUG(180, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'G':
- case 'g': goto yy191;
- default: goto yy37;
- }
-yy181:
- YYDEBUG(181, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'G':
- case 'g': goto yy192;
- default: goto yy37;
- }
-yy182:
- YYDEBUG(182, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'D':
- case 'd': goto yy193;
- default: goto yy37;
- }
-yy183:
- YYDEBUG(183, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'N':
- case 'n': goto yy194;
- default: goto yy37;
- }
-yy184:
- YYDEBUG(184, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'R':
- case 'r': goto yy195;
- default: goto yy37;
- }
-yy185:
- YYDEBUG(185, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'S':
- case 's': goto yy196;
- default: goto yy37;
- }
-yy186:
- YYDEBUG(186, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'G':
- case 'g': goto yy198;
- default: goto yy37;
- }
-yy187:
- YYDEBUG(187, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'C':
- case 'c': goto yy199;
- default: goto yy37;
- }
-yy188:
- YYDEBUG(188, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'E':
- case 'e': goto yy200;
- default: goto yy37;
- }
-yy189:
- YYDEBUG(189, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'A':
- case 'a': goto yy201;
- default: goto yy37;
- }
-yy190:
- YYDEBUG(190, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'C':
- case 'c': goto yy202;
- default: goto yy37;
- }
-yy191:
- YYDEBUG(191, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'A':
- case 'a': goto yy203;
- default: goto yy37;
- }
-yy192:
- YYDEBUG(192, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'U':
- case 'u': goto yy204;
- default: goto yy37;
- }
-yy193:
- YYDEBUG(193, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'S':
- case 's': goto yy205;
- default: goto yy37;
- }
-yy194:
- YYDEBUG(194, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'A':
- case 'a': goto yy207;
- default: goto yy37;
- }
-yy195:
- YYDEBUG(195, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'Y':
- case 'y': goto yy208;
- default: goto yy37;
- }
-yy196:
- YYDEBUG(196, YYPEEK());
- yyaccept = 13;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- default: goto yy197;
- }
-yy197:
- YYDEBUG(197, YYPEEK());
-#line 236 "gpr.re2c"
- {*id = 19; continue;}
-#line 6032 "gpr_re2c.c"
-yy198:
- YYDEBUG(198, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'E':
- case 'e': goto yy210;
- default: goto yy37;
- }
-yy199:
- YYDEBUG(199, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'T':
- case 't': goto yy212;
- default: goto yy37;
- }
-yy200:
- YYDEBUG(200, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'S':
- case 's': goto yy214;
- default: goto yy37;
- }
-yy201:
- YYDEBUG(201, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'R':
- case 'r': goto yy216;
- default: goto yy37;
- }
-yy202:
- YYDEBUG(202, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'T':
- case 't': goto yy217;
- default: goto yy37;
- }
-yy203:
- YYDEBUG(203, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'T':
- case 't': goto yy219;
- default: goto yy37;
- }
-yy204:
- YYDEBUG(204, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'R':
- case 'r': goto yy220;
- default: goto yy37;
- }
-yy205:
- YYDEBUG(205, YYPEEK());
- yyaccept = 14;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- default: goto yy206;
- }
-yy206:
- YYDEBUG(206, YYPEEK());
-#line 228 "gpr.re2c"
- {*id = 11; continue;}
-#line 6237 "gpr_re2c.c"
-yy207:
- YYDEBUG(207, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'L':
- case 'l': goto yy221;
- default: goto yy37;
- }
-yy208:
- YYDEBUG(208, YYPEEK());
- yyaccept = 15;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- default: goto yy209;
- }
-yy209:
- YYDEBUG(209, YYPEEK());
-#line 234 "gpr.re2c"
- {*id = 17; continue;}
-#line 6376 "gpr_re2c.c"
-yy210:
- YYDEBUG(210, YYPEEK());
- yyaccept = 16;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- default: goto yy211;
- }
-yy211:
- YYDEBUG(211, YYPEEK());
-#line 237 "gpr.re2c"
- {*id = 20; continue;}
-#line 6504 "gpr_re2c.c"
-yy212:
- YYDEBUG(212, YYPEEK());
- yyaccept = 17;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- default: goto yy213;
- }
-yy213:
- YYDEBUG(213, YYPEEK());
-#line 238 "gpr.re2c"
- {*id = 21; continue;}
-#line 6632 "gpr_re2c.c"
-yy214:
- YYDEBUG(214, YYPEEK());
- yyaccept = 18;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- default: goto yy215;
- }
-yy215:
- YYDEBUG(215, YYPEEK());
-#line 239 "gpr.re2c"
- {*id = 22; continue;}
-#line 6760 "gpr_re2c.c"
-yy216:
- YYDEBUG(216, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'D':
- case 'd': goto yy223;
- default: goto yy37;
- }
-yy217:
- YYDEBUG(217, YYPEEK());
- yyaccept = 19;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- default: goto yy218;
- }
-yy218:
- YYDEBUG(218, YYPEEK());
-#line 222 "gpr.re2c"
- {*id = 5; continue;}
-#line 6899 "gpr_re2c.c"
-yy219:
- YYDEBUG(219, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'E':
- case 'e': goto yy225;
- default: goto yy37;
- }
-yy220:
- YYDEBUG(220, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'A':
- case 'a': goto yy227;
- default: goto yy37;
- }
-yy221:
- YYDEBUG(221, YYPEEK());
- yyaccept = 20;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- case '_': goto yy228;
- default: goto yy222;
- }
-yy222:
- YYDEBUG(222, YYPEEK());
-#line 229 "gpr.re2c"
- {*id = 12; continue;}
-#line 7049 "gpr_re2c.c"
-yy223:
- YYDEBUG(223, YYPEEK());
- yyaccept = 21;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- default: goto yy224;
- }
-yy224:
- YYDEBUG(224, YYPEEK());
-#line 241 "gpr.re2c"
- {*id = 24; continue;}
-#line 7177 "gpr_re2c.c"
-yy225:
- YYDEBUG(225, YYPEEK());
- yyaccept = 22;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- default: goto yy226;
- }
-yy226:
- YYDEBUG(226, YYPEEK());
-#line 224 "gpr.re2c"
- {*id = 7; continue;}
-#line 7305 "gpr_re2c.c"
-yy227:
- YYDEBUG(227, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'T':
- case 't': goto yy229;
- default: goto yy37;
- }
-yy228:
- YYDEBUG(228, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'A':
- case 'a': goto yy230;
- default: goto yy37;
- }
-yy229:
- YYDEBUG(229, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'I':
- case 'i': goto yy231;
- default: goto yy37;
- }
-yy230:
- YYDEBUG(230, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'S':
- case 's': goto yy232;
- default: goto yy37;
- }
-yy231:
- YYDEBUG(231, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'O':
- case 'o': goto yy233;
- default: goto yy37;
- }
-yy232:
- YYDEBUG(232, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '_': goto yy234;
- default: goto yy37;
- }
-yy233:
- YYDEBUG(233, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'N':
- case 'n': goto yy235;
- default: goto yy37;
- }
-yy234:
- YYDEBUG(234, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'L':
- case 'l': goto yy237;
- default: goto yy37;
- }
-yy235:
- YYDEBUG(235, YYPEEK());
- yyaccept = 23;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- default: goto yy236;
- }
-yy236:
- YYDEBUG(236, YYPEEK());
-#line 226 "gpr.re2c"
- {*id = 9; continue;}
-#line 7520 "gpr_re2c.c"
-yy237:
- YYDEBUG(237, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'I':
- case 'i': goto yy238;
- default: goto yy37;
- }
-yy238:
- YYDEBUG(238, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'S':
- case 's': goto yy239;
- default: goto yy37;
- }
-yy239:
- YYDEBUG(239, YYPEEK());
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'T':
- case 't': goto yy240;
- default: goto yy37;
- }
-yy240:
- YYDEBUG(240, YYPEEK());
- yyaccept = 24;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- case 0xC2:
- case 0xC3:
- case 0xC4:
- case 0xC5:
- case 0xC6:
- case 0xC7:
- case 0xC8:
- case 0xC9:
- case 0xCA:
- case 0xCB:
- case 0xCC:
- case 0xCD:
- case 0xCE:
- case 0xCF:
- case 0xD0:
- case 0xD1:
- case 0xD2:
- case 0xD3:
- case 0xD4:
- case 0xD5:
- case 0xD6:
- case 0xD7:
- case 0xD8:
- case 0xD9:
- case 0xDA:
- case 0xDB:
- case 0xDC:
- case 0xDD:
- case 0xDE:
- case 0xDF:
- case 0xE0:
- case 0xE1:
- case 0xE2:
- case 0xE3:
- case 0xE4:
- case 0xE5:
- case 0xE6:
- case 0xE7:
- case 0xE8:
- case 0xE9:
- case 0xEA:
- case 0xEB:
- case 0xEC:
- case 0xED:
- case 0xEE:
- case 0xEF:
- case 0xF0:
- case 0xF1:
- case 0xF2:
- case 0xF3:
- case 0xF4: goto yy37;
- default: goto yy241;
- }
-yy241:
- YYDEBUG(241, YYPEEK());
-#line 230 "gpr.re2c"
- {*id = 13; continue;}
-#line 7681 "gpr_re2c.c"
-}
-#line 261 "gpr.re2c"
-
- }
- /* lexer->cursor and lexer ->char_pos are one char past end of token */
- *byte_position = lexer->byte_token_start - lexer->buffer + 1;
- *byte_length = lexer->cursor - lexer->byte_token_start;
- *char_position = lexer->char_token_start;
- *char_length = lexer->char_pos - lexer->char_token_start;
- *line_start = lexer->line_token_start;
- *line_length = lexer->line - lexer->line_token_start;
- return status;
- }
diff --git a/gpr_re2c_c.ads b/gpr_re2c_c.ads
deleted file mode 100644
index 11b6fb962a..0000000000
--- a/gpr_re2c_c.ads
+++ /dev/null
@@ -1,74 +0,0 @@
--- generated parser support file. -*- buffer-read-only:t -*-
--- command line: wisitoken-bnf-generate.exe --generate LR1 Ada_Emacs re2c
PROCESS gpr.wy
---
-
--- Copyright (C) 2013 - 2022 Free Software Foundation, Inc.
-
--- This program is free software; you can redistribute it and/or
--- modify it under the terms of the GNU General Public License as
--- published by the Free Software Foundation; either version 3, or (at
--- your option) any later version.
---
--- This software is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- General Public License for more details.
---
--- You should have received a copy of the GNU General Public License
--- along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-
-with Interfaces.C;
-with WisiToken;
-with System;
-package gpr_re2c_c is
-
- function New_Lexer
- (Buffer : in System.Address;
- Length : in Interfaces.C.size_t)
- return System.Address
- with Import => True,
- Convention => C,
- External_Name => "gpr_new_lexer";
- -- Create the lexer object, passing it the text buffer.
-
- procedure Free_Lexer (Lexer : in out System.Address)
- with Import => True,
- Convention => C,
- External_Name => "gpr_free_lexer";
- -- Free the lexer object
-
- procedure Reset_Lexer (Lexer : in System.Address)
- with Import => True,
- Convention => C,
- External_Name => "gpr_reset_lexer";
-
- procedure Set_Verbosity
- (Lexer : in System.Address;
- Verbosity : in Interfaces.C.int)
- with Import => True,
- Convention => C,
- External_Name => "gpr_set_verbosity";
- procedure Set_Position
- (Lexer : in System.Address;
- Byte_Position : in Interfaces.C.size_t;
- Char_Position : in Interfaces.C.size_t;
- Line : in Interfaces.C.int)
- with Import => True,
- Convention => C,
- External_Name => "gpr_set_position";
-
- function Next_Token
- (Lexer : in System.Address;
- ID : out WisiToken.Token_ID;
- Byte_Position : out Interfaces.C.size_t;
- Byte_Length : out Interfaces.C.size_t;
- Char_Position : out Interfaces.C.size_t;
- Char_Length : out Interfaces.C.size_t;
- Line_Start : out Interfaces.C.int;
- Line_Length : out Interfaces.C.int)
- return Interfaces.C.int
- with Import => True,
- Convention => C,
- External_Name => "gpr_next_token";
-
-end gpr_re2c_c;
diff --git a/install.sh b/install.sh
index 4f6f518bfb..0ff97429d2 100755
--- a/install.sh
+++ b/install.sh
@@ -1,20 +1,30 @@
#!/bin/sh
# Install executables for Ada mode.
-#
-# See build.sh for build (must be run before install).
-
+#
# $1 : optional --prefix=<dir>
-#
-# If you don't have write permission in the GNAT installation
-# directory, you need to use --prefix=<dir>, or run with root priviledges.
+#
+# See build.sh for build (must be run before install).
-if [ -d ../wisi-3.1.? ]; then
- WISI_DIR=`ls -d ../wisi-3.1.?`
+if [ x$1 = x ]; then
+ PREFIX=$HOME/.local
+ # as recommended by
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
else
- # try devel version
- WISI_DIR=`ls -d ../wisi-3.1.?.0.*`
+ PREFIX=$1
fi
+
+echo "installing ada-mode executables to" $PREFIX/bin
+
+# No need for gprinstall; we only need the executable
-gprinstall -f -p -P ada_mode_wisi_parse.gpr -aP $WISI_DIR
--install-name=ada_mode_wisi_parse $1
+if type alr; then
+ cp emacs_ada_mode*/bin/* $PREFIX/bin
+
+elif type gprbuild; then
+ cp bin/* $PREFIX/bin
+
+else
+ echo "neither Alire nor gnat compiler found"
+ return 1
+fi
# end of file.
diff --git a/prj.el b/prj.el
index c90d416abe..91d429da15 100644
--- a/prj.el
+++ b/prj.el
@@ -1,18 +1,31 @@
-;; Emacs wisi project definitions for compiling ada-mode in ELPA workspace
+;; Emacs wisi project definitions for compiling ada-mode in ELPA workspace -*-
no-byte-compile: t; -*-
;;
;; Copyright (C) 2021, 2022 Free Software Foundation, Inc.
+;;
+;; This file is part of GNU Emacs.
+;;
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-(let ((wisi-core (expand-file-name "../wisi")))
-
- (wisi-prj-select-cache
- "ada_mode.prj"
- (create-ada-prj
- :name "ada_mode elpa"
- :compile-env
- (list
- (concat "WISI=" wisi-core)))
- "Makefile"
- ))
+(wisi-prj-select-cache
+ "ada_mode.prj"
+ (create-ada-prj
+ :name "ada_mode elpa"
+ :compile-env
+ (list
+ (concat "WISI=" (expand-file-name "../wisi"))))
+ "ELPA.make"
+ )
(ada-parse-require-process) ;; slow start due to lr1 parse table
;; end of file
diff --git a/run_ada_lalr_parse.ads b/run_ada_lalr_parse.ads
index 0e21bd566f..2a34d5b916 100644
--- a/run_ada_lalr_parse.ads
+++ b/run_ada_lalr_parse.ads
@@ -18,19 +18,13 @@
pragma License (GPL);
-with Ada_Annex_P_Process_Actions;
with Ada_Annex_P_Process_LALR_Main;
with Gen_Run_Wisi_LR_Parse;
with WisiToken.Parse.LR.McKenzie_Recover.Ada;
with Wisi.Ada;
procedure Run_Ada_LALR_Parse is new Gen_Run_Wisi_LR_Parse
(Wisi.Ada.Parse_Data_Type,
- Ada_Annex_P_Process_Actions.Descriptor'Access,
- Ada_Annex_P_Process_Actions.Partial_Parse_Active'Access,
- Ada_Annex_P_Process_Actions.Partial_Parse_Byte_Goal'Access,
WisiToken.Parse.LR.McKenzie_Recover.Ada.Language_Fixes'Access,
WisiToken.Parse.LR.McKenzie_Recover.Ada.Matching_Begin_Tokens'Access,
WisiToken.Parse.LR.McKenzie_Recover.Ada.String_ID_Set'Access,
- Ada_Annex_P_Process_LALR_Main.Create_Lexer,
- Ada_Annex_P_Process_LALR_Main.Create_Parse_Table,
- Ada_Annex_P_Process_LALR_Main.Create_Productions);
+ Ada_Annex_P_Process_LALR_Main.Create_Parser);
diff --git a/run_ada_lr1_parse.ads b/run_ada_lr1_parse.ads
index 1fda5276a7..f4cc8817d8 100644
--- a/run_ada_lr1_parse.ads
+++ b/run_ada_lr1_parse.ads
@@ -18,20 +18,14 @@
pragma License (GPL);
-with Ada_Annex_P_Process_Actions;
with Ada_Annex_P_Process_LR1_Main;
with Gen_Run_Wisi_LR_Text_Rep_Parse;
with WisiToken.Parse.LR.McKenzie_Recover.Ada;
with Wisi.Ada;
procedure Run_Ada_LR1_Parse is new Gen_Run_Wisi_LR_Text_Rep_Parse
(Wisi.Ada.Parse_Data_Type,
- Ada_Annex_P_Process_Actions.Descriptor'Access,
- Ada_Annex_P_Process_Actions.Partial_Parse_Active'Access,
- Ada_Annex_P_Process_Actions.Partial_Parse_Byte_Goal'Access,
WisiToken.Parse.LR.McKenzie_Recover.Ada.Language_Fixes'Access,
WisiToken.Parse.LR.McKenzie_Recover.Ada.Matching_Begin_Tokens'Access,
WisiToken.Parse.LR.McKenzie_Recover.Ada.String_ID_Set'Access,
"ada_annex_p_lr1_parse_table.txt",
- Ada_Annex_P_Process_LR1_Main.Create_Lexer,
- Ada_Annex_P_Process_LR1_Main.Create_Parse_Table,
- Ada_Annex_P_Process_LR1_Main.Create_Productions);
+ Ada_Annex_P_Process_LR1_Main.Create_Parser);
diff --git a/run_gpr_parse.ads b/run_gpr_parse.ads
deleted file mode 100644
index 4cf1b932cc..0000000000
--- a/run_gpr_parse.ads
+++ /dev/null
@@ -1,35 +0,0 @@
--- Abstract :
---
--- Run the gpr parser standalone. Useful for debugging grammar issues.
---
--- Copyright (C) 2017 - 2020, 2022 Free Software Foundation, Inc.
---
--- This program is free software; you can redistribute it and/or
--- modify it under terms of the GNU General Public License as
--- published by the Free Software Foundation; either version 3, or (at
--- your option) any later version. This program is distributed in the
--- hope that it will be useful, but WITHOUT ANY WARRANTY; without even
--- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
--- PURPOSE. See the GNU General Public License for more details. You
--- should have received a copy of the GNU General Public License
--- distributed with this program; see file COPYING. If not, write to
--- the Free Software Foundation, 51 Franklin Street, Suite 500, Boston,
--- MA 02110-1335, USA.
-
-pragma License (GPL);
-
-with Gen_Run_Wisi_LR_Parse;
-with Gpr_Process_Actions;
-with Gpr_Process_Main;
-with Wisi.Gpr;
-procedure Run_Gpr_Parse is new Gen_Run_Wisi_LR_Parse
- (Wisi.Gpr.Parse_Data_Type,
- Gpr_Process_Actions.Descriptor'Access,
- Gpr_Process_Actions.Partial_Parse_Active'Access,
- Gpr_Process_Actions.Partial_Parse_Byte_Goal'Access,
- null,
- null,
- null,
- Gpr_Process_Main.Create_Lexer,
- Gpr_Process_Main.Create_Parse_Table,
- Gpr_Process_Main.Create_Productions);
diff --git a/wisi-ada.adb b/wisi-ada.adb
index eea8a65432..fc07a44f11 100644
--- a/wisi-ada.adb
+++ b/wisi-ada.adb
@@ -117,14 +117,17 @@ package body Wisi.Ada is
Tree.Image (Found, Node_Numbers => True) & " '" & Elisp_Escape_Quotes
(Data.Get_Text (Tree, Found)) & "'";
end Unrecognized;
+ procedure No_Call_Found (Edit_Begin_Char : in WisiToken.Buffer_Pos)
+ is begin
+ raise SAL.Parameter_Error with "no subprogram call found at byte_pos" &
Edit_Begin_Char'Image;
+ end No_Call_Found;
+
procedure Method_Object_To_Object_Method
- (Tree : in WisiToken.Syntax_Trees.Tree;
- Data : in out Parse_Data_Type;
+ (Tree : in WisiToken.Syntax_Trees.Tree;
+ Data : in out Parse_Data_Type;
Edit_Begin_Char : in WisiToken.Buffer_Pos)
- -- Data.Tree contains one statement or declaration; Edit_Begin_Char
- -- is the character position at the start of a subprogram call.
- -- Convert the subprogram call from Prefix.Method (Object, ...) to
- -- Object.Method (...).
+ -- Convert a subprogram call from Prefix.Method (Object, ...) to
+ -- Object.Method (...). Edit_Begin_Char is in Prefix.Method.
is
use Ada_Annex_P_Process_Actions;
use Standard.Ada.Strings.Unbounded;
@@ -137,11 +140,10 @@ package body Wisi.Ada is
Actual_Parameter_Part : Node_Access;
Association_List : Node_Access;
Method : Node_Access;
-
begin
if Call = Invalid_Node_Access then
-- Most likely the edit point is wrong.
- raise SAL.Parameter_Error with "no subprogram call found at byte_pos"
& Edit_Begin_Char'Image;
+ No_Call_Found (Edit_Begin_Char);
end if;
if Trace_Action > Detail then
@@ -226,10 +228,9 @@ package body Wisi.Ada is
(Tree : in WisiToken.Syntax_Trees.Tree;
Data : in out Parse_Data_Type;
Edit_Begin_Char : in WisiToken.Buffer_Pos)
+ -- Convert a subprogram call from Object.Method (...) to
+ -- Method (Object, ...). Edit_Begin_Char is in Object.Method.
is
- -- Data.Tree contains one statement or declaration; Edit_Begin is the
- -- character position at the start of a subprogram call. Convert the
- -- subprogram call from Object.Method (...) to Method (Object, ...).
use Ada_Annex_P_Process_Actions;
use Standard.Ada.Strings.Unbounded;
use WisiToken.Syntax_Trees;
@@ -246,7 +247,7 @@ package body Wisi.Ada is
begin
if Call = Invalid_Node_Access then
-- Most likely the edit point is wrong.
- raise SAL.Parameter_Error with "no 'name' at byte_pos" &
Edit_Begin_Char'Image;
+ No_Call_Found (Edit_Begin_Char);
end if;
if Trace_Action > Detail then
@@ -303,10 +304,8 @@ package body Wisi.Ada is
(Tree : in WisiToken.Syntax_Trees.Tree;
Data : in out Parse_Data_Type;
Edit_Begin_Char : in WisiToken.Buffer_Pos)
- -- Data.Tree contains one statement or declaration; Edit_Begin_Char
- -- is the character position at the start of a subprogram call.
- -- Convert the subprogram call from Prefix.Element (Object, Index) to
- -- Object (Index).
+ -- Convert a function call from Prefix.Element (Object, Index) to
+ -- Object (Index). Edit_Begin_Char is in Prefix.Element.
is
use Ada_Annex_P_Process_Actions;
use Standard.Ada.Text_IO;
@@ -321,7 +320,7 @@ package body Wisi.Ada is
begin
if Call = Invalid_Node_Access then
-- Most likely the edit point is wrong.
- raise SAL.Parameter_Error with "no subprogram call found at byte_pos"
& Edit_Begin_Char'Image;
+ No_Call_Found (Edit_Begin_Char);
end if;
if Trace_Action > Detail then
@@ -362,10 +361,9 @@ package body Wisi.Ada is
(Tree : in WisiToken.Syntax_Trees.Tree;
Data : in out Parse_Data_Type;
Edit_Begin_Char : in WisiToken.Buffer_Pos)
- -- Data.Tree contains one statement or declaration; Edit_Begin_Char
- -- is the character position at the start of a subprogram call.
- -- Convert the subprogram call from Object (Index) to Element
- -- (Object, Index).
+ -- Convert a primary expression from Object (Index) to Element
+ -- (Object, Index). Edit_Begin_Char is in Object. The expression
+ -- parses as a subprogram call.
is
use Ada_Annex_P_Process_Actions;
use Standard.Ada.Text_IO;
@@ -380,7 +378,7 @@ package body Wisi.Ada is
begin
if Call = Invalid_Node_Access then
-- Most likely the edit point is wrong.
- raise SAL.Parameter_Error with "no subprogram_call found at byte_pos"
& Edit_Begin_Char'Image;
+ No_Call_Found (Edit_Begin_Char);
end if;
if Trace_Action > Detail then
diff --git a/wisi-ada.ads b/wisi-ada.ads
index 0a30bdc562..788ecf75fc 100644
--- a/wisi-ada.ads
+++ b/wisi-ada.ads
@@ -75,10 +75,6 @@ package Wisi.Ada is
type Parse_Data_Type is new Wisi.Parse_Data_Type with null record;
- overriding
- function New_User_Data (Template : in Parse_Data_Type) return
WisiToken.Syntax_Trees.User_Data_Access
- is (new Parse_Data_Type);
-
overriding
procedure Initialize (Data : in out Parse_Data_Type);
diff --git a/wisi-gpr.adb b/wisi-gpr.adb
deleted file mode 100644
index e8113dc0c4..0000000000
--- a/wisi-gpr.adb
+++ /dev/null
@@ -1,79 +0,0 @@
--- Abstract :
---
--- See spec
---
--- Copyright (C) 2017 - 2022 Free Software Foundation, Inc.
---
--- This library is free software; you can redistribute it and/or modify it
--- under terms of the GNU General Public License as published by the Free
--- Software Foundation; either version 3, or (at your option) any later
--- version. This library is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
--- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
--- As a special exception under Section 7 of GPL version 3, you are granted
--- additional permissions described in the GCC Runtime Library Exception,
--- version 3.1, as published by the Free Software Foundation.
-
-pragma License (Modified_GPL);
-
-with Ada.Strings.Fixed;
-with Gpr_Process_Actions;
-package body Wisi.Gpr is
-
- overriding
- procedure Initialize (Data : in out Parse_Data_Type)
- is
- use all type Gpr_Process_Actions.Token_Enum_ID;
- begin
- Data.First_Comment_ID := +COMMENT_ID;
- Data.Last_Comment_ID := WisiToken.Invalid_Token_ID;
- Data.Left_Paren_ID := WisiToken.Invalid_Token_ID;
- Data.Right_Paren_ID := WisiToken.Invalid_Token_ID;
- end Initialize;
-
- overriding
- procedure Parse_Language_Params
- (Data : in out Parse_Data_Type;
- Params : in String)
- is
- pragma Unreferenced (Data);
- use Ada.Strings.Fixed;
- First : Integer := Params'First;
- Last : Integer := Index (Params, " ");
- begin
- if Params /= "" then
- -- must match [1] wisi-parse-format-language-options
- Gpr_Indent := Integer'Value (Params (First .. Last - 1));
-
- First := Last + 1;
- Last := Index (Params, " ", First);
- Gpr_Indent_Broken := Integer'Value (Params (First .. Last - 1));
-
- First := Last + 1;
- Gpr_Indent_When := Integer'Value (Params (First .. Params'Last));
- end if;
- end Parse_Language_Params;
-
- overriding
- function Get_Token_IDs
- (User_Data : in Parse_Data_Type;
- Command_Line : in String;
- Last : in out Integer)
- return WisiToken.Token_ID_Arrays.Vector
- is
- pragma Unreferenced (User_Data);
- use Gpr_Process_Actions;
- begin
- return IDs : WisiToken.Token_ID_Arrays.Vector do
- Wisi.Skip (Command_Line, Last, '(');
- loop
- IDs.Append (+Token_Enum_ID'Value (Wisi.Get_Enum (Command_Line,
Last)));
- Wisi.Skip (Command_Line, Last, ' ');
- exit when Command_Line (Last + 1) = ')';
- end loop;
- Last := Last + 1;
- end return;
- end Get_Token_IDs;
-
-end Wisi.Gpr;
diff --git a/wisi-gpr.ads b/wisi-gpr.ads
deleted file mode 100644
index 8e402375f6..0000000000
--- a/wisi-gpr.ads
+++ /dev/null
@@ -1,60 +0,0 @@
--- Abstract :
---
--- Ada implementation of:
---
--- [1] gpr-wisi.el
--- [2] gpr-indent-user-options.el
---
--- Copyright (C) 2017 - 2022 Free Software Foundation, Inc.
---
--- This library is free software; you can redistribute it and/or modify it
--- under terms of the GNU General Public License as published by the Free
--- Software Foundation; either version 3, or (at your option) any later
--- version. This library is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
--- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
--- As a special exception under Section 7 of GPL version 3, you are granted
--- additional permissions described in the GCC Runtime Library Exception,
--- version 3.1, as published by the Free Software Foundation.
-
-pragma License (Modified_GPL);
-
-package Wisi.Gpr is
-
- Language_Protocol_Version : constant String := "1";
- -- Defines the data passed to Initialize in Params.
- --
- -- This value must match gpr-wisi.el
- -- gpr-wisi-language-protocol-version.
-
- -- Indent parameters from [2]
- Gpr_Indent : Integer := 3;
- Gpr_Indent_Broken : Integer := 2;
- Gpr_Indent_When : Integer := 3;
-
- -- Other parameters
- End_Names_Optional : Boolean := False;
-
- type Parse_Data_Type is new Wisi.Parse_Data_Type with null record;
-
- overriding
- function New_User_Data (Template : in Parse_Data_Type) return
WisiToken.Syntax_Trees.User_Data_Access
- is (new Parse_Data_Type);
-
- overriding
- procedure Initialize (Data : in out Parse_Data_Type);
-
- overriding
- procedure Parse_Language_Params
- (Data : in out Parse_Data_Type;
- Params : in String);
-
- overriding
- function Get_Token_IDs
- (User_Data : in Parse_Data_Type;
- Command_Line : in String;
- Last : in out Integer)
- return WisiToken.Token_ID_Arrays.Vector;
-
-end Wisi.Gpr;
diff --git a/wisitoken-parse-lr-mckenzie_recover-ada.adb
b/wisitoken-parse-lr-mckenzie_recover-ada.adb
index 4769c7aca2..c9e1746ab3 100644
--- a/wisitoken-parse-lr-mckenzie_recover-ada.adb
+++ b/wisitoken-parse-lr-mckenzie_recover-ada.adb
@@ -63,10 +63,9 @@ package body WisiToken.Parse.LR.McKenzie_Recover.Ada is
procedure Handle_In_Parse_Action_Fail
(Super : in out
WisiToken.Parse.LR.McKenzie_Recover.Base.Supervisor;
Shared_Parser : in out Parser.Parser;
- Parser_Index : in SAL.Peek_Type;
-
- Local_Config_Heap : in out Config_Heaps.Heap_Type;
- Config : in Configuration)
+ Parser_Index : in SAL.Peek_Type;
+ Local_Config_Heap : in out Config_Heaps.Heap_Type;
+ Config : in Configuration)
with Pre => Config.In_Parse_Action_Status.Label /= Ok
is
use Syntax_Trees;
@@ -581,6 +580,12 @@ package body WisiToken.Parse.LR.McKenzie_Recover.Ada is
New_Config.Strategy_Counts (Language_Fix) :=
New_Config.Strategy_Counts (Language_Fix) + 1;
case To_Token_Enum (Tree.Element_ID (Config.Error_Token)) is
+ when accept_statement_ID =>
+ Push_Back_Check
+ (Super, Shared_Parser, New_Config,
+ (+SEMICOLON_ID, +identifier_opt_ID, +END_ID),
+ Push_Back_Undo_Reduce => True);
+
when block_statement_ID =>
Push_Back_Check
(Super, Shared_Parser, New_Config,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/ada-mode 0215ceee18: Update to 8.0.2 devel release; split out gnat-compiler, gpr-mode, gpr-query,
Stephen Leake <=