From db92637d46a95c7791299b2a1cf9f8f118f3d850 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sun, 9 Jun 2024 21:16:48 +0200 Subject: [PATCH] Remove CEDET --- .gitignore | 8 - Makefile.in | 2 +- admin/README | 2 - admin/cus-test.el | 1 - admin/grammars/Makefile.in | 114 - admin/grammars/c.by | 1236 ----- admin/grammars/grammar.wy | 448 -- admin/grammars/java-tags.wy | 762 --- admin/grammars/js.wy | 525 -- admin/grammars/make.by | 174 - admin/grammars/python.wy | 1203 ----- admin/grammars/scheme.by | 107 - admin/grammars/srecode-template.wy | 274 -- admin/update_autogen | 8 - configure.ac | 4 +- doc/misc/Makefile.in | 13 +- doc/misc/bovine.texi | 479 -- doc/misc/ede.texi | 4352 ----------------- doc/misc/sem-user.texi | 1325 ----- doc/misc/semantic.texi | 607 --- doc/misc/srecode.texi | 1799 ------- doc/misc/wisent.texi | 2041 -------- etc/srecode/c.srt | 164 - etc/srecode/cpp.srt | 137 - etc/srecode/default.srt | 61 - etc/srecode/doc-cpp.srt | 84 - etc/srecode/doc-default.srt | 80 - etc/srecode/doc-java.srt | 85 - etc/srecode/ede-autoconf.srt | 54 - etc/srecode/ede-make.srt | 82 - etc/srecode/el.srt | 309 -- etc/srecode/getset-cpp.srt | 49 - etc/srecode/java.srt | 198 - etc/srecode/make.srt | 79 - etc/srecode/proj-test.srt | 37 - etc/srecode/template.srt | 224 - etc/srecode/test.srt | 220 - etc/srecode/texi.srt | 168 - etc/srecode/wisent.srt | 94 - lisp/Makefile.in | 11 +- lisp/cedet/ChangeLog.1 | 3477 ------------- lisp/cedet/cedet-cscope.el | 173 - lisp/cedet/cedet-files.el | 111 - lisp/cedet/cedet-global.el | 205 - lisp/cedet/cedet-idutils.el | 201 - lisp/cedet/cedet.el | 130 - lisp/cedet/data-debug.el | 1098 ----- lisp/cedet/ede.el | 1541 ------ lisp/cedet/ede/auto.el | 340 -- lisp/cedet/ede/autoconf-edit.el | 460 -- lisp/cedet/ede/base.el | 650 --- lisp/cedet/ede/config.el | 425 -- lisp/cedet/ede/cpp-root.el | 488 -- lisp/cedet/ede/custom.el | 216 - lisp/cedet/ede/detect.el | 201 - lisp/cedet/ede/dired.el | 91 - lisp/cedet/ede/emacs.el | 263 - lisp/cedet/ede/files.el | 545 --- lisp/cedet/ede/generic.el | 375 -- lisp/cedet/ede/linux.el | 392 -- lisp/cedet/ede/locate.el | 363 -- lisp/cedet/ede/make.el | 91 - lisp/cedet/ede/makefile-edit.el | 131 - lisp/cedet/ede/pconf.el | 193 - lisp/cedet/ede/pmake.el | 696 --- lisp/cedet/ede/proj-archive.el | 65 - lisp/cedet/ede/proj-aux.el | 47 - lisp/cedet/ede/proj-comp.el | 342 -- lisp/cedet/ede/proj-elisp.el | 411 -- lisp/cedet/ede/proj-info.el | 182 - lisp/cedet/ede/proj-misc.el | 92 - lisp/cedet/ede/proj-obj.el | 302 -- lisp/cedet/ede/proj-prog.el | 143 - lisp/cedet/ede/proj-scheme.el | 49 - lisp/cedet/ede/proj-shared.el | 208 - lisp/cedet/ede/proj.el | 704 --- lisp/cedet/ede/project-am.el | 997 ---- lisp/cedet/ede/shell.el | 87 - lisp/cedet/ede/simple.el | 125 - lisp/cedet/ede/source.el | 171 - lisp/cedet/ede/speedbar.el | 357 -- lisp/cedet/ede/srecode.el | 93 - lisp/cedet/ede/system.el | 146 - lisp/cedet/ede/util.el | 99 - lisp/cedet/mode-local.el | 887 ---- lisp/cedet/semantic.el | 1124 ----- lisp/cedet/semantic/analyze.el | 884 ---- lisp/cedet/semantic/analyze/complete.el | 297 -- lisp/cedet/semantic/analyze/debug.el | 616 --- lisp/cedet/semantic/analyze/fcn.el | 324 -- lisp/cedet/semantic/analyze/refs.el | 365 -- lisp/cedet/semantic/bovine.el | 297 -- lisp/cedet/semantic/bovine/c.el | 2272 --------- lisp/cedet/semantic/bovine/debug.el | 145 - lisp/cedet/semantic/bovine/el.el | 967 ---- lisp/cedet/semantic/bovine/gcc.el | 244 - lisp/cedet/semantic/bovine/grammar.el | 567 --- lisp/cedet/semantic/bovine/make.el | 241 - lisp/cedet/semantic/bovine/scm.el | 117 - lisp/cedet/semantic/chart.el | 168 - lisp/cedet/semantic/complete.el | 2301 --------- lisp/cedet/semantic/ctxt.el | 692 --- lisp/cedet/semantic/db-debug.el | 110 - lisp/cedet/semantic/db-el.el | 347 -- lisp/cedet/semantic/db-file.el | 443 -- lisp/cedet/semantic/db-find.el | 1414 ------ lisp/cedet/semantic/db-global.el | 244 - lisp/cedet/semantic/db-javascript.el | 309 -- lisp/cedet/semantic/db-mode.el | 216 - lisp/cedet/semantic/db-ref.el | 174 - lisp/cedet/semantic/db-typecache.el | 633 --- lisp/cedet/semantic/db.el | 1072 ---- lisp/cedet/semantic/debug.el | 573 --- lisp/cedet/semantic/decorate.el | 276 -- lisp/cedet/semantic/decorate/include.el | 846 ---- lisp/cedet/semantic/decorate/mode.el | 565 --- lisp/cedet/semantic/dep.el | 225 - lisp/cedet/semantic/doc.el | 137 - lisp/cedet/semantic/ede-grammar.el | 202 - lisp/cedet/semantic/edit.el | 966 ---- lisp/cedet/semantic/find.el | 715 --- lisp/cedet/semantic/format.el | 716 --- lisp/cedet/semantic/fw.el | 443 -- lisp/cedet/semantic/grammar.el | 1970 -------- lisp/cedet/semantic/grm-wy-boot.el | 503 -- lisp/cedet/semantic/html.el | 267 - lisp/cedet/semantic/ia-sb.el | 364 -- lisp/cedet/semantic/ia.el | 494 -- lisp/cedet/semantic/idle.el | 1299 ----- lisp/cedet/semantic/imenu.el | 513 -- lisp/cedet/semantic/java.el | 481 -- lisp/cedet/semantic/lex-spp.el | 1372 ------ lisp/cedet/semantic/lex.el | 1800 ------- lisp/cedet/semantic/mru-bookmark.el | 398 -- lisp/cedet/semantic/sb.el | 428 -- lisp/cedet/semantic/scope.el | 851 ---- lisp/cedet/semantic/senator.el | 881 ---- lisp/cedet/semantic/sort.el | 551 --- lisp/cedet/semantic/symref.el | 589 --- lisp/cedet/semantic/symref/cscope.el | 99 - lisp/cedet/semantic/symref/filter.el | 163 - lisp/cedet/semantic/symref/global.el | 78 - lisp/cedet/semantic/symref/grep.el | 193 - lisp/cedet/semantic/symref/idutils.el | 80 - lisp/cedet/semantic/symref/list.el | 513 -- lisp/cedet/semantic/tag-file.el | 199 - lisp/cedet/semantic/tag-ls.el | 460 -- lisp/cedet/semantic/tag-write.el | 178 - lisp/cedet/semantic/tag.el | 1330 ----- lisp/cedet/semantic/texi.el | 680 --- lisp/cedet/semantic/util-modes.el | 965 ---- lisp/cedet/semantic/util.el | 451 -- lisp/cedet/semantic/wisent.el | 334 -- lisp/cedet/semantic/wisent/comp.el | 3533 ------------- lisp/cedet/semantic/wisent/grammar.el | 560 --- lisp/cedet/semantic/wisent/java-tags.el | 147 - lisp/cedet/semantic/wisent/javascript.el | 149 - lisp/cedet/semantic/wisent/python.el | 599 --- lisp/cedet/semantic/wisent/wisent.el | 474 -- lisp/cedet/srecode.el | 57 - lisp/cedet/srecode/args.el | 212 - lisp/cedet/srecode/compile.el | 659 --- lisp/cedet/srecode/cpp.el | 239 - lisp/cedet/srecode/ctxt.el | 244 - lisp/cedet/srecode/dictionary.el | 678 --- lisp/cedet/srecode/document.el | 834 ---- lisp/cedet/srecode/el.el | 112 - lisp/cedet/srecode/expandproto.el | 132 - lisp/cedet/srecode/extract.el | 240 - lisp/cedet/srecode/fields.el | 452 -- lisp/cedet/srecode/filters.el | 56 - lisp/cedet/srecode/find.el | 269 - lisp/cedet/srecode/getset.el | 368 -- lisp/cedet/srecode/insert.el | 1088 ----- lisp/cedet/srecode/java.el | 83 - lisp/cedet/srecode/map.el | 420 -- lisp/cedet/srecode/mode.el | 391 -- lisp/cedet/srecode/semantic.el | 438 -- lisp/cedet/srecode/srt-mode.el | 748 --- lisp/cedet/srecode/srt.el | 112 - lisp/cedet/srecode/table.el | 287 -- lisp/cedet/srecode/template.el | 75 - lisp/cedet/srecode/texi.el | 288 -- lisp/emacs-lisp/eieio-datadebug.el | 128 - lisp/files.el | 3 - lisp/finder.el | 8 - lisp/info-look.el | 3 - lisp/menu-bar.el | 12 - lisp/speedbar.el | 32 +- test/lisp/cedet/cedet-files-tests.el | 51 - test/lisp/cedet/semantic-utest-c.el | 180 - .../cedet/semantic-utest-ia-resources/test.mk | 18 - .../semantic-utest-ia-resources/test.srt | 64 - .../semantic-utest-ia-resources/test.texi | 40 - .../testdoublens.cpp | 214 - .../testdoublens.hpp | 71 - .../testfriends.cpp | 37 - .../testjavacomp.java | 77 - .../testlocalvars.cpp | 54 - .../semantic-utest-ia-resources/testnsp.cpp | 122 - .../testsppcomplete.c | 66 - .../teststruct.cpp | 86 - .../testsubclass.cpp | 248 - .../testsubclass.hh | 190 - .../testtemplates.cpp | 149 - .../testtypedefs.cpp | 155 - .../semantic-utest-ia-resources/testusing.cpp | 265 - .../semantic-utest-ia-resources/testusing.hh | 176 - .../testvarnames.c | 104 - .../testvarnames.java | 60 - .../semantic-utest-ia-resources/testwisent.wy | 85 - test/lisp/cedet/semantic-utest-ia.el | 492 -- test/lisp/cedet/semantic-utest.el | 761 --- test/lisp/cedet/semantic/bovine/gcc-tests.el | 142 - .../semantic/format-resources/test-fmt.cpp | 108 - .../semantic/format-resources/test-fmt.el | 65 - test/lisp/cedet/semantic/format-tests.el | 95 - test/lisp/cedet/semantic/fw-tests.el | 45 - test/lisp/cedet/srecode-utest-getset.el | 178 - test/lisp/cedet/srecode-utest-template.el | 377 -- test/lisp/cedet/srecode/document-tests.el | 78 - test/lisp/cedet/srecode/fields-tests.el | 235 - test/lisp/minibuffer-tests.el | 1 + test/manual/cedet/cedet-utests.el | 443 -- test/manual/cedet/ede-tests.el | 83 - test/manual/cedet/semantic-tests.el | 238 - test/manual/cedet/tests/test.c | 241 - test/manual/cedet/tests/test.el | 156 - test/manual/cedet/tests/test.make | 79 - test/manual/cedet/tests/testpolymorph.cpp | 130 - test/manual/cedet/tests/testspp.c | 101 - test/manual/cedet/tests/testsppreplace.c | 153 - test/manual/cedet/tests/testsppreplaced.c | 117 - 233 files changed, 16 insertions(+), 97658 deletions(-) delete mode 100644 admin/grammars/Makefile.in delete mode 100644 admin/grammars/c.by delete mode 100644 admin/grammars/grammar.wy delete mode 100644 admin/grammars/java-tags.wy delete mode 100644 admin/grammars/js.wy delete mode 100644 admin/grammars/make.by delete mode 100644 admin/grammars/python.wy delete mode 100644 admin/grammars/scheme.by delete mode 100644 admin/grammars/srecode-template.wy delete mode 100644 doc/misc/bovine.texi delete mode 100644 doc/misc/ede.texi delete mode 100644 doc/misc/sem-user.texi delete mode 100644 doc/misc/semantic.texi delete mode 100644 doc/misc/srecode.texi delete mode 100644 doc/misc/wisent.texi delete mode 100644 etc/srecode/c.srt delete mode 100644 etc/srecode/cpp.srt delete mode 100644 etc/srecode/default.srt delete mode 100644 etc/srecode/doc-cpp.srt delete mode 100644 etc/srecode/doc-default.srt delete mode 100644 etc/srecode/doc-java.srt delete mode 100644 etc/srecode/ede-autoconf.srt delete mode 100644 etc/srecode/ede-make.srt delete mode 100644 etc/srecode/el.srt delete mode 100644 etc/srecode/getset-cpp.srt delete mode 100644 etc/srecode/java.srt delete mode 100644 etc/srecode/make.srt delete mode 100644 etc/srecode/proj-test.srt delete mode 100644 etc/srecode/template.srt delete mode 100644 etc/srecode/test.srt delete mode 100644 etc/srecode/texi.srt delete mode 100644 etc/srecode/wisent.srt delete mode 100644 lisp/cedet/ChangeLog.1 delete mode 100644 lisp/cedet/cedet-cscope.el delete mode 100644 lisp/cedet/cedet-files.el delete mode 100644 lisp/cedet/cedet-global.el delete mode 100644 lisp/cedet/cedet-idutils.el delete mode 100644 lisp/cedet/cedet.el delete mode 100644 lisp/cedet/data-debug.el delete mode 100644 lisp/cedet/ede.el delete mode 100644 lisp/cedet/ede/auto.el delete mode 100644 lisp/cedet/ede/autoconf-edit.el delete mode 100644 lisp/cedet/ede/base.el delete mode 100644 lisp/cedet/ede/config.el delete mode 100644 lisp/cedet/ede/cpp-root.el delete mode 100644 lisp/cedet/ede/custom.el delete mode 100644 lisp/cedet/ede/detect.el delete mode 100644 lisp/cedet/ede/dired.el delete mode 100644 lisp/cedet/ede/emacs.el delete mode 100644 lisp/cedet/ede/files.el delete mode 100644 lisp/cedet/ede/generic.el delete mode 100644 lisp/cedet/ede/linux.el delete mode 100644 lisp/cedet/ede/locate.el delete mode 100644 lisp/cedet/ede/make.el delete mode 100644 lisp/cedet/ede/makefile-edit.el delete mode 100644 lisp/cedet/ede/pconf.el delete mode 100644 lisp/cedet/ede/pmake.el delete mode 100644 lisp/cedet/ede/proj-archive.el delete mode 100644 lisp/cedet/ede/proj-aux.el delete mode 100644 lisp/cedet/ede/proj-comp.el delete mode 100644 lisp/cedet/ede/proj-elisp.el delete mode 100644 lisp/cedet/ede/proj-info.el delete mode 100644 lisp/cedet/ede/proj-misc.el delete mode 100644 lisp/cedet/ede/proj-obj.el delete mode 100644 lisp/cedet/ede/proj-prog.el delete mode 100644 lisp/cedet/ede/proj-scheme.el delete mode 100644 lisp/cedet/ede/proj-shared.el delete mode 100644 lisp/cedet/ede/proj.el delete mode 100644 lisp/cedet/ede/project-am.el delete mode 100644 lisp/cedet/ede/shell.el delete mode 100644 lisp/cedet/ede/simple.el delete mode 100644 lisp/cedet/ede/source.el delete mode 100644 lisp/cedet/ede/speedbar.el delete mode 100644 lisp/cedet/ede/srecode.el delete mode 100644 lisp/cedet/ede/system.el delete mode 100644 lisp/cedet/ede/util.el delete mode 100644 lisp/cedet/mode-local.el delete mode 100644 lisp/cedet/semantic.el delete mode 100644 lisp/cedet/semantic/analyze.el delete mode 100644 lisp/cedet/semantic/analyze/complete.el delete mode 100644 lisp/cedet/semantic/analyze/debug.el delete mode 100644 lisp/cedet/semantic/analyze/fcn.el delete mode 100644 lisp/cedet/semantic/analyze/refs.el delete mode 100644 lisp/cedet/semantic/bovine.el delete mode 100644 lisp/cedet/semantic/bovine/c.el delete mode 100644 lisp/cedet/semantic/bovine/debug.el delete mode 100644 lisp/cedet/semantic/bovine/el.el delete mode 100644 lisp/cedet/semantic/bovine/gcc.el delete mode 100644 lisp/cedet/semantic/bovine/grammar.el delete mode 100644 lisp/cedet/semantic/bovine/make.el delete mode 100644 lisp/cedet/semantic/bovine/scm.el delete mode 100644 lisp/cedet/semantic/chart.el delete mode 100644 lisp/cedet/semantic/complete.el delete mode 100644 lisp/cedet/semantic/ctxt.el delete mode 100644 lisp/cedet/semantic/db-debug.el delete mode 100644 lisp/cedet/semantic/db-el.el delete mode 100644 lisp/cedet/semantic/db-file.el delete mode 100644 lisp/cedet/semantic/db-find.el delete mode 100644 lisp/cedet/semantic/db-global.el delete mode 100644 lisp/cedet/semantic/db-javascript.el delete mode 100644 lisp/cedet/semantic/db-mode.el delete mode 100644 lisp/cedet/semantic/db-ref.el delete mode 100644 lisp/cedet/semantic/db-typecache.el delete mode 100644 lisp/cedet/semantic/db.el delete mode 100644 lisp/cedet/semantic/debug.el delete mode 100644 lisp/cedet/semantic/decorate.el delete mode 100644 lisp/cedet/semantic/decorate/include.el delete mode 100644 lisp/cedet/semantic/decorate/mode.el delete mode 100644 lisp/cedet/semantic/dep.el delete mode 100644 lisp/cedet/semantic/doc.el delete mode 100644 lisp/cedet/semantic/ede-grammar.el delete mode 100644 lisp/cedet/semantic/edit.el delete mode 100644 lisp/cedet/semantic/find.el delete mode 100644 lisp/cedet/semantic/format.el delete mode 100644 lisp/cedet/semantic/fw.el delete mode 100644 lisp/cedet/semantic/grammar.el delete mode 100644 lisp/cedet/semantic/grm-wy-boot.el delete mode 100644 lisp/cedet/semantic/html.el delete mode 100644 lisp/cedet/semantic/ia-sb.el delete mode 100644 lisp/cedet/semantic/ia.el delete mode 100644 lisp/cedet/semantic/idle.el delete mode 100644 lisp/cedet/semantic/imenu.el delete mode 100644 lisp/cedet/semantic/java.el delete mode 100644 lisp/cedet/semantic/lex-spp.el delete mode 100644 lisp/cedet/semantic/lex.el delete mode 100644 lisp/cedet/semantic/mru-bookmark.el delete mode 100644 lisp/cedet/semantic/sb.el delete mode 100644 lisp/cedet/semantic/scope.el delete mode 100644 lisp/cedet/semantic/senator.el delete mode 100644 lisp/cedet/semantic/sort.el delete mode 100644 lisp/cedet/semantic/symref.el delete mode 100644 lisp/cedet/semantic/symref/cscope.el delete mode 100644 lisp/cedet/semantic/symref/filter.el delete mode 100644 lisp/cedet/semantic/symref/global.el delete mode 100644 lisp/cedet/semantic/symref/grep.el delete mode 100644 lisp/cedet/semantic/symref/idutils.el delete mode 100644 lisp/cedet/semantic/symref/list.el delete mode 100644 lisp/cedet/semantic/tag-file.el delete mode 100644 lisp/cedet/semantic/tag-ls.el delete mode 100644 lisp/cedet/semantic/tag-write.el delete mode 100644 lisp/cedet/semantic/tag.el delete mode 100644 lisp/cedet/semantic/texi.el delete mode 100644 lisp/cedet/semantic/util-modes.el delete mode 100644 lisp/cedet/semantic/util.el delete mode 100644 lisp/cedet/semantic/wisent.el delete mode 100644 lisp/cedet/semantic/wisent/comp.el delete mode 100644 lisp/cedet/semantic/wisent/grammar.el delete mode 100644 lisp/cedet/semantic/wisent/java-tags.el delete mode 100644 lisp/cedet/semantic/wisent/javascript.el delete mode 100644 lisp/cedet/semantic/wisent/python.el delete mode 100644 lisp/cedet/semantic/wisent/wisent.el delete mode 100644 lisp/cedet/srecode.el delete mode 100644 lisp/cedet/srecode/args.el delete mode 100644 lisp/cedet/srecode/compile.el delete mode 100644 lisp/cedet/srecode/cpp.el delete mode 100644 lisp/cedet/srecode/ctxt.el delete mode 100644 lisp/cedet/srecode/dictionary.el delete mode 100644 lisp/cedet/srecode/document.el delete mode 100644 lisp/cedet/srecode/el.el delete mode 100644 lisp/cedet/srecode/expandproto.el delete mode 100644 lisp/cedet/srecode/extract.el delete mode 100644 lisp/cedet/srecode/fields.el delete mode 100644 lisp/cedet/srecode/filters.el delete mode 100644 lisp/cedet/srecode/find.el delete mode 100644 lisp/cedet/srecode/getset.el delete mode 100644 lisp/cedet/srecode/insert.el delete mode 100644 lisp/cedet/srecode/java.el delete mode 100644 lisp/cedet/srecode/map.el delete mode 100644 lisp/cedet/srecode/mode.el delete mode 100644 lisp/cedet/srecode/semantic.el delete mode 100644 lisp/cedet/srecode/srt-mode.el delete mode 100644 lisp/cedet/srecode/srt.el delete mode 100644 lisp/cedet/srecode/table.el delete mode 100644 lisp/cedet/srecode/template.el delete mode 100644 lisp/cedet/srecode/texi.el delete mode 100644 lisp/emacs-lisp/eieio-datadebug.el delete mode 100644 test/lisp/cedet/cedet-files-tests.el delete mode 100644 test/lisp/cedet/semantic-utest-c.el delete mode 100644 test/lisp/cedet/semantic-utest-ia-resources/test.mk delete mode 100644 test/lisp/cedet/semantic-utest-ia-resources/test.srt delete mode 100644 test/lisp/cedet/semantic-utest-ia-resources/test.texi delete mode 100644 test/lisp/cedet/semantic-utest-ia-resources/testdoublens.cpp delete mode 100644 test/lisp/cedet/semantic-utest-ia-resources/testdoublens.hpp delete mode 100644 test/lisp/cedet/semantic-utest-ia-resources/testfriends.cpp delete mode 100644 test/lisp/cedet/semantic-utest-ia-resources/testjavacomp.java delete mode 100644 test/lisp/cedet/semantic-utest-ia-resources/testlocalvars.cpp delete mode 100644 test/lisp/cedet/semantic-utest-ia-resources/testnsp.cpp delete mode 100644 test/lisp/cedet/semantic-utest-ia-resources/testsppcomplete.c delete mode 100644 test/lisp/cedet/semantic-utest-ia-resources/teststruct.cpp delete mode 100644 test/lisp/cedet/semantic-utest-ia-resources/testsubclass.cpp delete mode 100644 test/lisp/cedet/semantic-utest-ia-resources/testsubclass.hh delete mode 100644 test/lisp/cedet/semantic-utest-ia-resources/testtemplates.cpp delete mode 100644 test/lisp/cedet/semantic-utest-ia-resources/testtypedefs.cpp delete mode 100644 test/lisp/cedet/semantic-utest-ia-resources/testusing.cpp delete mode 100644 test/lisp/cedet/semantic-utest-ia-resources/testusing.hh delete mode 100644 test/lisp/cedet/semantic-utest-ia-resources/testvarnames.c delete mode 100644 test/lisp/cedet/semantic-utest-ia-resources/testvarnames.java delete mode 100644 test/lisp/cedet/semantic-utest-ia-resources/testwisent.wy delete mode 100644 test/lisp/cedet/semantic-utest-ia.el delete mode 100644 test/lisp/cedet/semantic-utest.el delete mode 100644 test/lisp/cedet/semantic/bovine/gcc-tests.el delete mode 100644 test/lisp/cedet/semantic/format-resources/test-fmt.cpp delete mode 100644 test/lisp/cedet/semantic/format-resources/test-fmt.el delete mode 100644 test/lisp/cedet/semantic/format-tests.el delete mode 100644 test/lisp/cedet/semantic/fw-tests.el delete mode 100644 test/lisp/cedet/srecode-utest-getset.el delete mode 100644 test/lisp/cedet/srecode-utest-template.el delete mode 100644 test/lisp/cedet/srecode/document-tests.el delete mode 100644 test/lisp/cedet/srecode/fields-tests.el delete mode 100644 test/manual/cedet/cedet-utests.el delete mode 100644 test/manual/cedet/ede-tests.el delete mode 100644 test/manual/cedet/semantic-tests.el delete mode 100644 test/manual/cedet/tests/test.c delete mode 100644 test/manual/cedet/tests/test.el delete mode 100644 test/manual/cedet/tests/test.make delete mode 100644 test/manual/cedet/tests/testpolymorph.cpp delete mode 100644 test/manual/cedet/tests/testspp.c delete mode 100644 test/manual/cedet/tests/testsppreplace.c delete mode 100644 test/manual/cedet/tests/testsppreplaced.c diff --git a/.gitignore b/.gitignore index 8b3efd9bb69..ec69fa775a4 100644 --- a/.gitignore +++ b/.gitignore @@ -120,14 +120,6 @@ cross/ndk-build/*.o # Lisp-level sources built by 'make'. *cus-load.el *loaddefs.el -lisp/cedet/semantic/bovine/c-by.el -lisp/cedet/semantic/bovine/make-by.el -lisp/cedet/semantic/bovine/scm-by.el -lisp/cedet/semantic/wisent/javat-wy.el -lisp/cedet/semantic/wisent/js-wy.el -lisp/cedet/semantic/wisent/python-wy.el -lisp/cedet/srecode/srt-wy.el -lisp/cedet/semantic/grammar-wy.el lisp/eshell/esh-module-loaddefs.el lisp/finder-inf.el lisp/leim/ja-dic/ diff --git a/Makefile.in b/Makefile.in index 20394cb333d..d80e13e441f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1052,7 +1052,7 @@ top_distclean=\ rm -f config.cache config.status config.log~ \ Makefile makefile lib/gnulib.mk ${SUBDIR_MAKEFILES} -distclean_dirs = $(clean_dirs) leim lisp admin/grammars +distclean_dirs = $(clean_dirs) leim lisp $(foreach dir,$(distclean_dirs),$(eval $(call submake_template,$(dir),distclean))) diff --git a/admin/README b/admin/README index 419039b4fba..fcb89d7122d 100644 --- a/admin/README +++ b/admin/README @@ -72,8 +72,6 @@ coccinelle semantic patches for use with the static code places, they are trivial for copyright purposes. codespell supporting files for the run-codespell script. -grammars wisent and bovine grammars, used to produce - files in lisp/cedet/. notes miscellaneous notes related to administrative tasks. nt support files for administrative tasks related diff --git a/admin/cus-test.el b/admin/cus-test.el index 10d6e34358d..bc4a34c2315 100644 --- a/admin/cus-test.el +++ b/admin/cus-test.el @@ -111,7 +111,6 @@ ;; characters cannot be loaded twice ("Category `a' is already defined"). '("play/dunnet.el" "emulation/edt-mapper.el" "loadup.el" "mail/blessmail.el" "international/characters.el" - "cedet/ede/loaddefs.el" "cedet/semantic/loaddefs.el" "net/tramp-loaddefs.el") "List of files not to load by `cus-test-load-libs'. Names should be as they appear in loaddefs.el.") diff --git a/admin/grammars/Makefile.in b/admin/grammars/Makefile.in deleted file mode 100644 index 5904c07dfcd..00000000000 --- a/admin/grammars/Makefile.in +++ /dev/null @@ -1,114 +0,0 @@ -### @configure_input@ - -## Copyright (C) 2013-2024 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 . - -### Commentary: - -## This directory contains grammar files in Bison and Wisent, -## used to generate the parser data in the lisp/cedet directory. - -SHELL = @SHELL@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = @top_builddir@ - --include ${top_builddir}/src/verbose.mk - -# Prevent any settings in the user environment causing problems. -unexport EMACSDATA EMACSDOC EMACSLOADPATH EMACSPATH - -EMACS = ${top_builddir}/src/emacs -emacs = "${EMACS}" -batch --no-site-file --no-site-lisp \ - --eval '(setq load-prefer-newer t)' - -make_bovine = ${emacs} -l semantic/bovine/grammar -f bovine-batch-make-parser -make_wisent = ${emacs} -l semantic/wisent/grammar -f wisent-batch-make-parser - -cedetdir = ${top_srcdir}/lisp/cedet -bovinedir = ${cedetdir}/semantic/bovine -wisentdir = ${cedetdir}/semantic/wisent - -grammar_bovine = ${bovinedir}/grammar.el -grammar_wisent = ${wisentdir}/grammar.el - -BOVINE = \ - ${bovinedir}/c-by.el \ - ${bovinedir}/make-by.el \ - ${bovinedir}/scm-by.el - -WISENT = \ - ${cedetdir}/semantic/grammar-wy.el \ - ${wisentdir}/javat-wy.el \ - ${wisentdir}/js-wy.el \ - ${wisentdir}/python-wy.el \ - ${cedetdir}/srecode/srt-wy.el - -ALL = ${BOVINE} ${WISENT} - -.PHONY: all bovine wisent - -all: ${ALL} - -bovine: ${BOVINE} - -wisent: ${WISENT} - -## c-by.el, make-by.el. -${bovinedir}/%-by.el: ${srcdir}/%.by ${grammar_bovine} - $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@" - $(AM_V_at)${make_bovine} -o "$@" $< - -${bovinedir}/scm-by.el: ${srcdir}/scheme.by ${grammar_bovine} - $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@" - $(AM_V_at)${make_bovine} -o "$@" $< - -## grammar-wy.el -${cedetdir}/semantic/%-wy.el: ${srcdir}/%.wy ${grammar_wisent} - $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@" - $(AM_V_at)${make_wisent} -o "$@" $< - -## js-wy.el, python-wy.el -${wisentdir}/%-wy.el: ${srcdir}/%.wy ${grammar_wisent} - $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@" - $(AM_V_at)${make_wisent} -o "$@" $< - -${wisentdir}/javat-wy.el: ${srcdir}/java-tags.wy ${grammar_wisent} - $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@" - $(AM_V_at)${make_wisent} -o "$@" $< - -${cedetdir}/srecode/srt-wy.el: ${srcdir}/srecode-template.wy ${grammar_wisent} - $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@" - $(AM_V_at)${make_wisent} -o "$@" $< - -.PHONY: distclean bootstrap-clean maintainer-clean gen-clean - -distclean: - rm -f Makefile - -## IMO this should run gen-clean. -bootstrap-clean: - -gen-clean: - rm -f ${ALL} - -maintainer-clean: gen-clean distclean - - - -# Makefile.in ends here diff --git a/admin/grammars/c.by b/admin/grammars/c.by deleted file mode 100644 index b3ebd3324fb..00000000000 --- a/admin/grammars/c.by +++ /dev/null @@ -1,1236 +0,0 @@ -;;; c.by -- LL grammar for C/C++ language specification -;; Copyright (C) 1999-2024 Free Software Foundation, Inc. -;; -;; Author: Eric M. Ludlam -;; David Ponce -;; Klaus Berndl -;; -;; 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 . - -;; TODO: From Nate Schley -;; > * Can't parse signature element: "const char* const rmc_ClrTxt" -;; > * Can't parse signature element: "char* const dellog_ClrTxt" -;; > * Can't parse signature element: "const char* dellog_SetTxt" -;; > * Can't parse signature element: "const RmcCmdSSPADetailedStatus& status" -;; > -;; > And FWIW I have seen the following argument cases not handled, even -;; > with no leading/trailing spaces in the split: -;; > -;; > * Can't parse signature element: "const bool currentAlarmStatus" -;; > * Can't parse signature element: "unsigned char mode" -;; > * Can't parse signature element: "TskTimingTask* tsktimingtask" -;; > * Can't parse signature element: "unsigned char htrStatus" -;; > * Can't parse signature element: "char trackPower[]" -;; > * Can't parse signature element: "const RmcCmdMCDetailedStatus& status" -;; > * Can't parse signature element: "RmcBucStatus* rftBucStatus" - -%package semantic-c-by -%provide semantic/bovine/c-by - -%{ -(declare-function semantic-c-reconstitute-token "semantic/bovine/c" - (tokenpart declmods typedecl)) -(declare-function semantic-c-reconstitute-template "semantic/bovine/c" - (tag specifier)) -(declare-function semantic-expand-c-tag "semantic/bovine/c" (tag)) -(declare-function semantic-parse-region "semantic" - (start end &optional nonterminal depth returnonerror)) -} - -%languagemode c-mode c++-mode -%start declaration -%scopestart codeblock - -%token HASH "\\`[#]\\'" -%token PERIOD "\\`[.]\\'" -%token COLON "\\`[:]\\'" -%token SEMICOLON "\\`[;]\\'" -%token STAR "\\`[*]\\'" -%token AMPERSAND "\\`[&]\\'" -%token DIVIDE "\\`[/]\\'" -%token PLUS "\\`[+]\\'" -%token MINUS "\\`[-]\\'" -%token BANG "\\`[!]\\'" -%token QUESTION "\\`[?]\\'" -%token EQUAL "\\`[=]\\'" -%token LESS "\\`[<]\\'" -%token GREATER "\\`[>]\\'" -%token COMA "\\`[,]\\'" -%token TILDE "\\`[~]\\'" -%token MOD "\\`[%]\\'" -%token HAT "\\`\\^\\'" -%token OR "\\`[|]\\'" -%token C "\"C\"" -%token CPP "\"C\\+\\+\"" -%token ZERO "^0$" -%token RESTRICT "\\<\\(__\\)?restrict\\>" -%token LPAREN "(" -%token RPAREN ")" -%token LBRACE "{" -%token RBRACE "}" -%token BRACK_BLCK "\\[.*\\]$" -%token PAREN_BLCK "^(" -%token BRACE_BLCK "^{" -%token VOID_BLCK "^(void)$" -%token PARENS "()" -%token BRACKETS "\\[\\]" - -%token EXTERN "extern" -%put EXTERN summary "Declaration Modifier: extern ..." -%token STATIC "static" -%put STATIC summary "Declaration Modifier: static ..." -%token CONST "const" -%put CONST summary "Declaration Modifier: const ..." -%token VOLATILE "volatile" -%put VOLATILE summary "Declaration Modifier: volatile ..." -%token REGISTER "register" -%put REGISTER summary "Declaration Modifier: register ..." -%token SIGNED "signed" -%put SIGNED summary "Numeric Type Modifier: signed ..." -%token UNSIGNED "unsigned" -%put UNSIGNED summary "Numeric Type Modifier: unsigned ..." - -%token INLINE "inline" -%put INLINE summary "Function Modifier: inline (...) {...};" -%token VIRTUAL "virtual" -%put VIRTUAL summary "Method Modifier: virtual (...) ..." -%token MUTABLE "mutable" -%put MUTABLE summary "Member Declaration Modifier: mutable ..." -%token EXPLICIT "explicit" -%put EXPLICIT summary "Forbids implicit type conversion: explicit " - -%token STRUCT "struct" -%put STRUCT summary "Structure Type Declaration: struct [name] { ... };" -%token UNION "union" -%put UNION summary "Union Type Declaration: union [name] { ... };" -%token ENUM "enum" -%put ENUM summary "Enumeration Type Declaration: enum [name] { ... };" -%token TYPEDEF "typedef" -%put TYPEDEF summary "Arbitrary Type Declaration: typedef ;" -%token CLASS "class" -%put CLASS summary "Class Declaration: class [:parents] { ... };" -%token TYPENAME "typename" -%put TYPENAME summary "typename is used to handle a qualified name as a typename;" -%token NAMESPACE "namespace" -%put NAMESPACE summary "Namespace Declaration: namespace { ... };" -%token USING "using" -%put USING summary "using ;" - -%token NEW "new" -%put NEW summary "new ();" -%token DELETE "delete" -%put DELETE summary "delete ;" - -;; Despite this, this parser can find templates by ignoring the TEMPLATE -;; keyword, and finding the class/method being templatized. -%token TEMPLATE "template" -%put TEMPLATE summary "template TYPE_OR_FUNCTION" - -%token THROW "throw" -%put THROW summary " () throw () ..." -%token REENTRANT "reentrant" -%put REENTRANT summary " () reentrant ..." -%token TRY "try" -%token CATCH "catch" -%put { TRY CATCH } summary "try { } catch { }" - -;; Leave these alone for now. -%token OPERATOR "operator" -%token PUBLIC "public" -%token PRIVATE "private" -%token PROTECTED "protected" -%token FRIEND "friend" -%put FRIEND summary "friend class " - -;; These aren't used for parsing, but is a useful place to describe the keywords. -%token IF "if" -%token ELSE "else" -%put {IF ELSE} summary "if () { code } [ else { code } ]" - -%token DO "do" -%token WHILE "while" -%put DO summary " do { code } while ();" -%put WHILE summary "do { code } while (); or while () { code };" - -%token FOR "for" -%put FOR summary "for(; ; ) { code }" - -%token SWITCH "switch" -%token CASE "case" -%token DEFAULT "default" -%put {SWITCH CASE DEFAULT} summary -"switch () { case : code; ... default: code; }" - -%token RETURN "return" -%put RETURN summary "return ;" - -%token BREAK "break" -%put BREAK summary "Non-local exit within a loop or switch (for, do/while, switch): break;" -%token CONTINUE "continue" -%put CONTINUE summary "Non-local continue within a loop (for, do/while): continue;" - -%token SIZEOF "sizeof" -%put SIZEOF summary "Compile time macro: sizeof() // size in bytes" - -;; Types -%token VOID "void" -%put VOID summary "Built in type: void" -%token CHAR "char" -%put CHAR summary "Integral Character Type: (0 to 256)" -%token WCHAR "wchar_t" -%put WCHAR summary "Wide Character Type" -%token SHORT "short" -%put SHORT summary "Integral Primitive Type: (-32768 to 32767)" -%token INT "int" -%put INT summary "Integral Primitive Type: (-2147483648 to 2147483647)" -%token LONG "long" -%put LONG summary "Integral primitive type (-9223372036854775808 to 9223372036854775807)" -%token FLOAT "float" -%put FLOAT summary "Primitive floating-point type (single-precision 32-bit IEEE 754)" -%token DOUBLE "double" -%put DOUBLE summary "Primitive floating-point type (double-precision 64-bit IEEE 754)" -%token BOOL "bool" -%put BOOL summary "Primitive boolean type" - -%token UNDERP "_P" -%token UNDERUNDERP "__P" -%put UNDERP summary "Common macro to eliminate prototype compatibility on some compilers" -%put UNDERUNDERP summary "Common macro to eliminate prototype compatibility on some compilers" - -%% - -declaration - : macro - | type - ;; TODO: Klaus Berndl: Is the define here necessary or even wrong? - ;; Is this part not already covered by macro?? - | define - | var-or-fun - | extern-c - | template - | using - ; - -codeblock - : define - | codeblock-var-or-fun - | type ;; type is less likely to be used here. - | using - ; - -extern-c-contents - : open-paren - ( nil ) - | declaration - | close-paren - ( nil ) - ; - -extern-c - : EXTERN C semantic-list - ;; Extern C commands which contain a list need to have the - ;; entries of the list extracted, and spliced into the main - ;; list of entries. This must be done via the function - ;; that expands singular nonterminals, such as int x,y; - (TAG "C" 'extern :members (EXPANDFULL $3 extern-c-contents) ) - | EXTERN CPP semantic-list - (TAG "C" 'extern :members (EXPANDFULL $3 extern-c-contents) ) - | EXTERN C - ;; A plain extern "C" call should add something to the token, - ;; but just strip it from the buffer here for now. - ( nil ) - | EXTERN CPP - ( nil ) - ; - -macro - : spp-macro-def - (VARIABLE-TAG $1 nil nil :constant-flag t ) - | spp-system-include - (INCLUDE-TAG $1 t) - | spp-include - (INCLUDE-TAG $1 nil) - ; - -;; This is used in struct parts. -define - : spp-macro-def - (VARIABLE-TAG $1 nil nil :constant-flag t) - | spp-macro-undef - ( nil ) - ; - -;; In C++, structures can have the same things as classes. -;; So delete this some day in the figure. -;; -;;structparts : semantic-list -;; (EXPANDFULL $1 structsubparts) -;; ; -;; -;;structsubparts : LBRACE -;; ( nil ) -;; | RBRACE -;; ( nil ) -;; | var-or-fun -;; | define -;; ;; sometimes there are defines in structs. -;; ; - -unionparts - : semantic-list - (EXPANDFULL $1 classsubparts) - ; - -opt-symbol - : symbol - | ;;EMPTY - ; - -;; @todo - support 'friend' construct. -classsubparts - : LBRACE - ( nil ) - | RBRACE - ( nil ) - | class-protection opt-symbol COLON - ;; For QT, they may put a `slot' keyword between the protection - ;; and the COLON. @todo - Have the QT stuff use macros. - (TAG (car $1) 'label) - | var-or-fun - | FRIEND func-decl - (TAG (car $2) 'friend) - | FRIEND CLASS symbol - (TAG $3 'friend) - | type - | define - | template - | ;;EMPTY - ; - -opt-class-parents - : COLON class-parents opt-template-specifier - ( $2 ) - | ;;EMPTY - ( ) - ; - -one-class-parent - : opt-class-protection opt-class-declmods namespace-symbol - (TYPE-TAG (car $3) "class" nil nil :protection (car $1)) - | opt-class-declmods opt-class-protection namespace-symbol - (TYPE-TAG (car $3) "class" nil nil :protection (car $2)) - ; - -class-parents - : one-class-parent COMA class-parents - ( ,(cons ,$1 $3 ) ) - | one-class-parent - ( $1 ) - ; - -opt-class-declmods - : class-declmods opt-class-declmods - ( nil ) - | ;;EMPTY - ; - -class-declmods - : VIRTUAL - ; - -class-protection - : PUBLIC - | PRIVATE - | PROTECTED - ; - -opt-class-protection - : class-protection - ( ,$1 ) - | ;;EMPTY - Same as private - ( "unspecified" ) - ; - -namespaceparts - : semantic-list - (EXPANDFULL $1 namespacesubparts) - ; - -namespacesubparts - : LBRACE - ( nil ) - | RBRACE - ( nil ) - | type - | var-or-fun - | define - | class-protection COLON - (TAG (car $1) 'label) - ;; In C++, this label in a classsubpart represents - ;; PUBLIC or PRIVATE bits. Ignore them for now. - | template - | using - ;; Includes inside namespaces - | spp-include - (TAG $1 'include :inside-ns t) - | ;;EMPTY - ; - -enumparts - : semantic-list - (EXPANDFULL $1 enumsubparts) - ; - -enumsubparts - : symbol opt-assign - (VARIABLE-TAG $1 "int" (car $2) :constant-flag t ) - | LBRACE - ( nil ) - | RBRACE - ( nil ) - | COMA - ( nil ) - ; - -opt-name - : symbol - | ;;EMPTY - ( "" ) - ; - -typesimple - : struct-or-class opt-class opt-name opt-template-specifier - opt-class-parents semantic-list - (TYPE-TAG (car $3) (car $1) - (dlet ((semantic-c-classname (cons (car ,$3) (car ,$1)))) - (EXPANDFULL $6 classsubparts)) - $5 - :template-specifier $4 - :parent (car ,$2)) - | struct-or-class opt-class opt-name opt-template-specifier - opt-class-parents - (TYPE-TAG (car $3) (car $1) nil $5 - :template-specifier $4 - :prototype t - :parent (car ,$2)) - | UNION opt-class opt-name unionparts - (TYPE-TAG (car $3) $1 $4 nil - :parent (car ,$2)) - | ENUM opt-class opt-name enumparts - (TYPE-TAG (car $3) $1 $4 nil - :parent (car ,$2)) - ;; Klaus Berndl: a typedef can be a typeformbase with all this - ;; declmods stuff. - | TYPEDEF declmods typeformbase cv-declmods typedef-symbol-list - ;;;; We put the type this typedef renames into PARENT - ;;;; but will move it in the expand function. - (TYPE-TAG $5 $1 nil (list $3) ) - ; - -typedef-symbol-list - : typedefname COMA typedef-symbol-list - ( ,(cons $1 $3) ) - | typedefname - ( $1 ) - ; - -;; TODO: Klaus Berndl: symbol -> namespace-symbol?! Answer: Probably -;; symbol is correct here! -typedefname - : opt-stars symbol opt-bits opt-array - ( $1 $2 ) - ; - -struct-or-class - : STRUCT - | CLASS - ; - -type - : typesimple SEMICOLON - ( ,$1 ) - ;; named namespaces like "namespace XXX {" - | NAMESPACE symbol namespaceparts - (TYPE-TAG $2 $1 $3 nil ) - ;; unnamed namespaces like "namespace {" - | NAMESPACE namespaceparts - (TYPE-TAG "unnamed" $1 $2 nil ) - ;; David Engster: namespace alias like "namespace foo = bar;" - | NAMESPACE symbol EQUAL typeformbase SEMICOLON - (TYPE-TAG $2 $1 (list (TYPE-TAG (car $4) $1 nil nil)) nil :kind 'alias ) - ; - -;; Klaus Berndl: We must parse "using namespace XXX" too - -;; Using is vaguely like an include statement in the named portions -;; of the code. We should probably specify a new token type for this. - -using - : USING usingname SEMICOLON - (TAG (car $2) 'using :type ,$2 ) - ; - -;; Jan Moringen: Differentiate between 'using' and 'using namespace' -;; Adapted to creating type tags by EML. -usingname - : typeformbase - (TYPE-TAG (car $1) "class" nil nil :prototype t) - | NAMESPACE typeformbase - (TYPE-TAG (car $2) "namespace" nil nil :prototype t) - ; - -template - : TEMPLATE template-specifier opt-friend template-definition - ( ,(semantic-c-reconstitute-template $4 ,$2) ) - ; - -opt-friend - : FRIEND - | ;;EMPTY - ; - -opt-template-specifier - : template-specifier - ( ,$1 ) - | ;;EMPTY - ( ) - ; - -template-specifier - : LESS template-specifier-types GREATER - ( ,$2 ) - ; - -template-specifier-types - : template-var template-specifier-type-list - ( ,(cons ,$1 ,$2 ) ) - | ;;EMPTY - ; - -template-specifier-type-list - : COMA template-specifier-types - ( ,$2 ) - | ;;EMPTY - ( ) - ; - -;; template-var -;; : template-type opt-stars opt-template-equal -;; ( ,(cons (concat (car $1) (make-string (car ,$2) ?*)) -;; (cdr $1))) -;; ;; Klaus Berndl: for template-types the template-var can also be -;; ;; literals or constants. Example: map -;; ;; map_size10_var; This parses also template which is -;; ;; nonsense but who cares.... -;; | string -;; ( $1 ) -;; | number -;; ( $1 ) -;; ; - -template-var - : - ;; Klaus Berndl: The following handles all template-vars of - ;; template-definitions - template-type opt-template-equal - ( ,(cons (car $1) (cdr $1)) ) - ;; Klaus Berndl: for template-types the template-var can also be - ;; literals or constants. - ;; Example: map map_size10_var; This parses also - ;; template which is nonsense but who cares.... - | string - ( $1 ) - | number - ( $1 ) - ;; Klaus Berndl: In template-types arguments can be any symbols with - ;; optional address-operator (&) and optional dereferencing operator - ;; (*). Example map sized_map_var. - | opt-stars opt-ref namespace-symbol - ( ,$3 ) - ;; Some code can compile down into a number, but starts out as an - ;; expression, such as "sizeof(a)", or (sizeof(a)/sizeof(b)) - | semantic-list - ( $1 ) - | SIZEOF semantic-list - ( $2 ) - ; - -opt-template-equal - : EQUAL symbol LESS template-specifier-types GREATER - ( $2 ) - | EQUAL symbol - ( $2 ) - | ;;EMPTY - ( ) - ; - -template-type - : CLASS symbol - (TYPE-TAG $2 "class" nil nil ) - | STRUCT symbol - (TYPE-TAG $2 "struct" nil nil ) - ;; TODO: Klaus Berndl: For the moment it is ok, that we parse the C++ - ;; keyword typename as a class.... - | TYPENAME symbol - (TYPE-TAG $2 "class" nil nil) - ;; Klaus Berndl: template-types can be all flavors of variable-args - ;; but here the argument is ignored, only the type stuff is needed. - | declmods typeformbase cv-declmods opt-stars - opt-ref variablearg-opt-name - (TYPE-TAG (car $2) nil nil nil - :template-specifier (plist-get (nth 2 $2) :template-specifier) - :constant-flag (if (member "const" (append $1 $3)) t nil) - :typemodifiers (delete "const" (append $1 $3)) - :reference (car ,$5) - :pointer (car $4) - :typevar (car $6) - ) - ; - -template-definition - : type - ( ,$1 ) - | var-or-fun - ( ,$1 ) - ; - -opt-stars - : STAR opt-starmod opt-stars - ( (1+ (car $3)) ) - | ;;EMPTY - ( 0 ) - ; - -opt-starmod - : STARMOD opt-starmod - ( ,(cons (,car ,$1) $2) ) - | ;;EMPTY - () - ; - -STARMOD - : CONST - ; - -declmods - : DECLMOD declmods - ( ,(cons ,(car ,$1) $2 ) ) - | DECLMOD - ( ,$1 ) - | ;;EMPTY - () - ; - -DECLMOD - : EXTERN - | STATIC - | CVDECLMOD - ;; Klaus Berndl: IMHO signed and unsigned are not decl-modes but - ;; these are only valid for some buildin-types like short, int - ;; etc... whereas "real" declmods are valid for all types, buildin - ;; and user-defined! SIGNED UNSIGNED - | INLINE - | REGISTER - | FRIEND - ;; Klaus Berndl: There can be a few cases where TYPENAME is not - ;; allowed in C++-syntax but better than not recognizing the allowed - ;; situations. - | TYPENAME - | METADECLMOD - ;; This is a hack in case we are in a class. - | VIRTUAL - ; - -metadeclmod - : METADECLMOD - () - | ;;EMPTY - () - ; - -CVDECLMOD - : CONST - | VOLATILE - ; - -cv-declmods - : CVDECLMOD cv-declmods - ( ,(cons ,(car ,$1) $2 ) ) - | CVDECLMOD - ( ,$1 ) - | ;;EMPTY - () - ; - -METADECLMOD - : VIRTUAL - | MUTABLE - ; - -;; C++: A type can be modified into a reference by "&" -opt-ref - : AMPERSAND - ( 1 ) - | ;;EMPTY - ( 0 ) - ; - -typeformbase - : typesimple - ( ,$1 ) - | STRUCT symbol - (TYPE-TAG $2 $1 nil nil ) - | UNION symbol - (TYPE-TAG $2 $1 nil nil ) - | ENUM symbol - (TYPE-TAG $2 $1 nil nil ) - | builtintype - ( ,$1 ) - | symbol template-specifier - (TYPE-TAG $1 "class" nil nil :template-specifier $2) - ;;| namespace-symbol opt-stars opt-template-specifier - ;;| namespace-symbol opt-template-specifier - | namespace-symbol-for-typeformbase opt-template-specifier - (TYPE-TAG (car $1) "class" nil nil - :template-specifier $2) - | symbol - ( $1 ) - ; - -signedmod - : UNSIGNED - | SIGNED - ; - -;; Klaus Berndl: builtintype-types was builtintype -builtintype-types - : VOID - | CHAR - ;; Klaus Berndl: Added WCHAR - | WCHAR - | SHORT INT - ( (concat $1 " " $2) ) - | SHORT - | INT - | LONG INT - ( (concat $1 " " $2) ) - | FLOAT - | DOUBLE - | BOOL - | LONG DOUBLE - ( (concat $1 " " $2) ) - ;; TODO: Klaus Berndl: Is there a long long, i think so?! - | LONG LONG - ( (concat $1 " " $2) ) - | LONG - ; - -builtintype - : signedmod builtintype-types - ( (concat (car $1) " " (car $2)) ) - | builtintype-types - ( ,$1 ) - ;; Klaus Berndl: unsigned is synonym for unsigned int and signed for - ;; signed int. To make this confusing stuff clear we add here the - ;; int. - | signedmod - ( (concat (car $1) " int") ) - ; - -;; Klaus Berndl: This parses also nonsense like "const volatile int -;; const volatile const const volatile a ..." but IMHO nobody writes -;; such code. Normally we should define a rule like typeformbase-mode -;; which exactly defines the different allowed cases and combinations -;; of declmods (minus the CVDECLMOD) typeformbase and cv-declmods so -;; we could recognize more invalid code but IMHO this is not worth the -;; effort... -codeblock-var-or-fun - : declmods typeformbase declmods - opt-ref var-or-func-decl - ( ,(semantic-c-reconstitute-token ,$5 $1 $2 ) ) - ; - -var-or-fun - : codeblock-var-or-fun - ( ,$1 ) - ;; it is possible for a function to not have a type, and - ;; it is then assumed to be an int. How annoying. - ;; In C++, this could be a constructor or a destructor. - ;; Even more annoying. Only ever do this for regular - ;; top-level items. Ignore this problem in code blocks - ;; so that we don't have to deal with regular code - ;; being erroneously converted into types. - | declmods var-or-func-decl - ( ,(semantic-c-reconstitute-token ,$2 $1 nil ) ) - ; - -var-or-func-decl - : func-decl - ( ,$1 ) - | var-decl - ( ,$1 ) - ; - -func-decl - : opt-stars opt-class opt-destructor functionname - opt-template-specifier - opt-under-p - arg-list - opt-post-fcn-modifiers - opt-throw - opt-initializers - fun-or-proto-end - ( ,$4 'function - ;; Extra stuff goes in here. - ;; Continue with the stuff we found in - ;; this definition - $2 $3 $7 $9 $8 ,$1 ,$11 $5 ,$10) - | opt-stars opt-class opt-destructor functionname - opt-template-specifier - opt-under-p - ;; arg-list - - ini this case, a try implies a fcn. - opt-post-fcn-modifiers - opt-throw - opt-initializers - fun-try-end - ( ,$4 'function - ;; Extra stuff goes in here. - ;; Continue with the stuff we found in - ;; this definition - $2 $3 nil $8 $7 ,$1 ,$10 $5 ,$9) - ; - -var-decl - : varnamelist SEMICOLON - ( $1 'variable ) - ; - -opt-under-p - : UNDERP - ( nil ) - | UNDERUNDERP - ( nil ) - | ;;EMPTY - ; - -;; Klaus Berndl: symbol -> namespace-symbol -opt-initializers - : COLON namespace-symbol semantic-list opt-initializers - | COMA namespace-symbol semantic-list opt-initializers - | ;;EMPTY - ; - -opt-post-fcn-modifiers - : post-fcn-modifiers opt-post-fcn-modifiers - ( ,(cons ,(car $1) $2) ) - | ;;EMPTY - ( nil ) - ; - -post-fcn-modifiers - : REENTRANT - | CONST - ; - -opt-throw - : THROW semantic-list - ( EXPAND $2 throw-exception-list ) - | ;;EMPTY - ; - -;; Is this true? I don't actually know. -throw-exception-list - : namespace-symbol COMA throw-exception-list - ( ,(cons (car $1) $3) ) - | namespace-symbol RPAREN - ( ,$1 ) - | symbol RPAREN - ( $1 ) - | LPAREN throw-exception-list - ( ,$2 ) - | RPAREN - ( ) - ; - -opt-bits - : COLON number - ( $2 ) - | ;;EMPTY - ( nil ) - ; - -opt-array - : BRACK_BLCK opt-array - ;; Eventually we want to replace the 1 below with a size - ;; (if available) - ( (cons 1 (car ,$2) ) ) - | ;;EMPTY - ( nil ) - ; - -opt-assign - : EQUAL expression - ( $2 ) - | ;;EMPTY - ( nil ) - ; - -opt-restrict - : RESTRICT - | ;;EMPTY - ; - -;; Klaus Berndl: symbol -> namespace-symbol?! I think so. Can be that -;; then also some invalid C++-syntax is parsed but this is better than -;; not parsing valid syntax. -varname - : opt-stars opt-restrict namespace-symbol opt-bits opt-array - ( ,$3 ,$1 ,$4 ,$5 ) - ; - -;; I should store more in this def, but leave it simple for now. -;; Klaus Berndl: const and volatile can be written after the type! -variablearg - : declmods typeformbase cv-declmods opt-ref variablearg-opt-name opt-assign - ( VARIABLE-TAG (list (append $5 ,$6)) $2 nil - :constant-flag (if (member "const" (append $1 $3)) t nil) - :typemodifiers (delete "const" (append $1 $3)) - :reference (car ,$4) - ) - ; - -variablearg-opt-name - : varname - ( ,$1 ) - | semantic-list arg-list - ( (car ( EXPAND $1 function-pointer )) $2) - ;; Klaus Berndl: This allows variableargs without an arg-name being - ;; parsed correctly even if there several pointers (*) - | opt-stars - ( "" ,$1 nil nil nil ) - ; - -varname-opt-initializer - : semantic-list - | opt-assign - | ;; EMPTY - ; - -varnamelist - : opt-ref varname varname-opt-initializer COMA varnamelist - ( ,(cons (append $2 $3) $5) ) - | opt-ref varname varname-opt-initializer - ( (append $2 $3) ) - ; - -;; Klaus Berndl: Is necessary to parse stuff like -;; class list_of_facts : public list, public entity -;; and -;; list >::const_iterator l; -;; Parses also invalid(?) and senseless(?) c++-syntax like -;; symbol::symbol1::test_iterator -;; but better parsing too much than to less -namespace-symbol - : symbol opt-template-specifier COLON COLON namespace-symbol - ( (concat $1 "::" (car $5)) ) - | symbol opt-template-specifier - ( $1 ) - ; - -;; Don't pull an optional template specifier at the end of the -;; namespace symbol so that it can be picked up by the type. -namespace-symbol-for-typeformbase - : symbol opt-template-specifier COLON COLON namespace-symbol-for-typeformbase - ( (concat $1 "::" (car $5)) ) - | symbol - ( $1 ) - ; -;; namespace-symbol -;; : symbol COLON COLON namespace-symbol -;; ( (concat $1 "::" (car $4)) ) -;; | symbol -;; ( $1 ) -;; ; - -namespace-opt-class - : symbol COLON COLON namespace-opt-class - ( (concat $1 "::" (car $4)) ) - ;; Klaus Berndl: We must recognize template-specifiers here so we can - ;; parse correctly the method-implementations of template-classes - ;; outside the template-class-declaration Example: - ;; TemplateClass1::method_1(...) - | symbol opt-template-specifier COLON COLON - ( $1 ) - ; - -;; Klaus Berndl: The opt-class of a func-decl must be able to -;; recognize opt-classes with namespaces, e.g. -;; Test1::Test2::classname:: -opt-class - : namespace-opt-class - ( ,$1 ) - | ;;EMPTY - ( nil ) - ; - -opt-destructor - : TILDE - ( t ) - | ;;EMPTY - ( nil ) - ; - -arg-list - : PAREN_BLCK knr-arguments - ( ,$2 ) - | PAREN_BLCK - (EXPANDFULL $1 arg-sub-list) - | VOID_BLCK - ( ) - ; - -knr-varnamelist - : varname COMA knr-varnamelist - ( ,(cons $1 $3) ) - | varname - ( $1 ) - ; - - -knr-one-variable-decl - : declmods typeformbase cv-declmods knr-varnamelist - ( VARIABLE-TAG (nreverse $4) $2 nil - :constant-flag (if (member "const" (append $3)) t nil) - :typemodifiers (delete "const" $3) - ) - ; - -knr-arguments - : knr-one-variable-decl SEMICOLON knr-arguments - ( ,(append (semantic-expand-c-tag ,$1) ,$3) ) - | knr-one-variable-decl SEMICOLON - ( ,(semantic-expand-c-tag ,$1) ) - ; - -arg-sub-list - : variablearg - ( ,$1 ) - | PERIOD PERIOD PERIOD RPAREN - (VARIABLE-TAG "..." "vararg" nil) - | COMA - ( nil ) - | LPAREN - ( nil ) - | RPAREN - ( nil ) - ; - -operatorsym - : LESS LESS EQUAL - ( "<<=" ) - | GREATER GREATER EQUAL - ( ">>=" ) - | LESS LESS - ( "<<" ) - | GREATER GREATER - ( ">>" ) - | EQUAL EQUAL - ( "==" ) - | LESS EQUAL - ( "<=" ) - | GREATER EQUAL - ( ">=" ) - | BANG EQUAL - ( "!=" ) - | PLUS EQUAL - ( "+=" ) - | MINUS EQUAL - ( "-=" ) - | STAR EQUAL - ( "*=" ) - | DIVIDE EQUAL - ( "/=" ) - | MOD EQUAL - ( "%=" ) - | AMPERSAND EQUAL - ( "&=" ) - | OR EQUAL - ( "|=" ) - | MINUS GREATER STAR - ( "->*" ) - | MINUS GREATER - ( "->" ) - | PARENS - ( "()" ) - | BRACKETS - ( "[]" ) - | LESS - | GREATER - | STAR - | PLUS PLUS - ( "++" ) - | PLUS - | MINUS MINUS - ( "--" ) - | MINUS - | AMPERSAND AMPERSAND - ( "&&" ) - | AMPERSAND - | OR OR - ( "||" ) - | OR - | DIVIDE - | EQUAL - | BANG - | TILDE - | MOD - | COMA - ;; HAT EQUAL seems to have a really unpleasant result and - ;; breaks everything after it. Leave it at the end, though it - ;; doesn't seem to work. - | HAT EQUAL - ( "^=" ) - | HAT - ; - -functionname - : OPERATOR operatorsym - ( ,$2 ) - | semantic-list - ( EXPAND $1 function-pointer ) - | symbol - ( $1 ) - ; - -function-pointer - : LPAREN STAR opt-symbol RPAREN - ( (concat "*" ,(car $3)) ) - | LPAREN symbol RPAREN - ( $2 ) - ; - -fun-or-proto-end - : SEMICOLON - ( t ) - | semantic-list - ( nil ) - ;; Here is an annoying feature of C++ pure virtual methods - | EQUAL ZERO SEMICOLON - ( :pure-virtual-flag ) - | fun-try-end - ( nil ) - ; - -fun-try-end - : TRY opt-initializers BRACE_BLCK fun-try-several-catches - ( nil ) - ; - -fun-try-several-catches - : CATCH PAREN_BLCK BRACE_BLCK fun-try-several-catches - ( ) - | CATCH BRACE_BLCK fun-try-several-catches - ( ) - | ;; EMPTY - ( ) - ; - -type-cast - : semantic-list - ( EXPAND $1 type-cast-list ) - ; - -type-cast-list - : open-paren typeformbase close-paren - ; - -opt-brackets-after-symbol - : brackets-after-symbol - | ;; EMPTY - ; - -brackets-after-symbol - : PAREN_BLCK - | BRACK_BLCK - ; - -multi-stage-dereference - : namespace-symbol opt-brackets-after-symbol - PERIOD multi-stage-dereference ;; method call - | namespace-symbol opt-brackets-after-symbol - MINUS GREATER multi-stage-dereference ;;method call - | namespace-symbol opt-brackets-after-symbol - PERIOD namespace-symbol opt-brackets-after-symbol - | namespace-symbol opt-brackets-after-symbol - MINUS GREATER namespace-symbol opt-brackets-after-symbol - | namespace-symbol brackets-after-symbol - ; - -string-seq - : string string-seq - ( (concat $1 (car $2)) ) - | string - ( $1 ) - ; - -expr-start - : MINUS - | PLUS - | STAR - | AMPERSAND - ; - -expr-binop - : MINUS - | PLUS - | STAR - | DIVIDE - | AMPERSAND AMPERSAND - | AMPERSAND - | OR OR - | OR - | MOD - ;; There are more. - ; - -;; Use expression for parsing only. Don't actually return anything -;; for now. Hopefully we can fix this later. -expression - : unaryexpression QUESTION unaryexpression COLON unaryexpression - ( (identity start) (identity end) ) - | unaryexpression expr-binop unaryexpression - ( (identity start) (identity end) ) - | unaryexpression - ( (identity start) (identity end) ) - ; - -unaryexpression - : number - | multi-stage-dereference - | NEW multi-stage-dereference - | NEW builtintype-types semantic-list - | symbol - ;; Klaus Berndl: C/C++ allows sequences of strings which are - ;; concatenated by the precompiler to one string - | string-seq - | type-cast expression ;; A cast to some other type - ;; Casting the results of one expression to something else. - | semantic-list expression - | semantic-list - | expr-start expression - ; - -;;; c.by ends here diff --git a/admin/grammars/grammar.wy b/admin/grammars/grammar.wy deleted file mode 100644 index a81a2df4a6f..00000000000 --- a/admin/grammars/grammar.wy +++ /dev/null @@ -1,448 +0,0 @@ -;;; semantic-grammar.wy -- LALR grammar of Semantic input grammars -;; -;; Copyright (C) 2002-2024 Free Software Foundation, Inc. -;; -;; Author: David Ponce -;; Created: 26 Aug 2002 -;; Keywords: syntax -;; X-RCS: $Id: semantic-grammar.wy,v 1.16 2005/09/30 20:20:27 zappo Exp $ - -;; 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 . - -%package semantic-grammar-wy -%provide semantic/grammar-wy - -%{ -(defvar semantic-grammar-lex-c-char-re) - -;; Current parsed nonterminal name. -(defvar semantic-grammar-wy--nterm nil) -;; Index of rule in a nonterminal clause. -(defvar semantic-grammar-wy--rindx nil) -} - -%languagemode wy-mode - -;; Main -%start grammar -;; Reparse -%start prologue epilogue declaration nonterminal rule -;; EXPANDFULL -%start put_names put_values use_names - -;; Keywords -%type -%keyword DEFAULT-PREC "%default-prec" -%keyword NO-DEFAULT-PREC "%no-default-prec" -%keyword KEYWORD "%keyword" -%keyword LANGUAGEMODE "%languagemode" -%keyword LEFT "%left" -%keyword NONASSOC "%nonassoc" -%keyword PACKAGE "%package" -%keyword EXPECTEDCONFLICTS "%expectedconflicts" -%keyword PROVIDE "%provide" -%keyword PREC "%prec" -%keyword PUT "%put" -%keyword QUOTEMODE "%quotemode" -%keyword RIGHT "%right" -%keyword SCOPESTART "%scopestart" -%keyword START "%start" -%keyword TOKEN "%token" -%keyword TYPE "%type" -%keyword USE-MACROS "%use-macros" - -;; Literals -%type -%token STRING - -%type syntax ":?\\(\\sw\\|\\s_\\)+" -%token SYMBOL -%token PERCENT_PERCENT "\\`%%\\'" - -%type syntax semantic-grammar-lex-c-char-re -%token CHARACTER - -%type matchdatatype sexp syntax "\\s'\\s-*(" -%token PREFIXED_LIST - -%type matchdatatype sexp syntax "\\=" -%token SEXP - -;; Don't generate these analyzers which needs special handling code. -%token PROLOGUE "%{...%}" -%token EPILOGUE "%%...EOF" - -;; Blocks & Parenthesis -%type -%token PAREN_BLOCK "(LPAREN RPAREN)" -%token BRACE_BLOCK "(LBRACE RBRACE)" -%token LPAREN "(" -%token RPAREN ")" -%token LBRACE "{" -%token RBRACE "}" - -;; Punctuation -%type -%token COLON ":" -%token SEMI ";" -%token OR "|" -%token LT "<" -%token GT ">" - -%% - -grammar: - prologue - | epilogue - | declaration - | nonterminal - | PERCENT_PERCENT - ; - -;;; Prologue/Epilogue -;; -prologue: - PROLOGUE - (CODE-TAG "prologue" nil) - ; - -epilogue: - EPILOGUE - (CODE-TAG "epilogue" nil) - ; - -;;; Declarations -;; -declaration: - decl - (eval $1 t) - ; - -decl: - default_prec_decl - | no_default_prec_decl - | languagemode_decl - | package_decl - | expectedconflicts_decl - | provide_decl - | precedence_decl - | put_decl - | quotemode_decl - | scopestart_decl - | start_decl - | keyword_decl - | token_decl - | type_decl - | use_macros_decl - ; - -default_prec_decl: - DEFAULT-PREC - `(TAG "default-prec" 'assoc :value '("t")) - ; - -no_default_prec_decl: - NO-DEFAULT-PREC - `(TAG "default-prec" 'assoc :value '("nil")) - ; - -languagemode_decl: - LANGUAGEMODE symbols - `(TAG ',(car $2) 'languagemode :rest ',(cdr $2)) - ; - -package_decl: - PACKAGE SYMBOL - `(PACKAGE-TAG ',$2 nil) - ; - -expectedconflicts_decl: - EXPECTEDCONFLICTS symbols - `(TAG ',(car $2) 'expectedconflicts :rest ',(cdr $2)) - ; - -provide_decl: - PROVIDE SYMBOL - `(TAG ',$2 'provide) - ; - -precedence_decl: - associativity token_type_opt items - `(TAG ',$1 'assoc :type ',$2 :value ',$3) - ; - -associativity: - LEFT - (progn "left") - | RIGHT - (progn "right") - | NONASSOC - (progn "nonassoc") - ; - -put_decl: - PUT put_name put_value - `(TAG ',$2 'put :value ',(list $3)) - | PUT put_name put_value_list - `(TAG ',$2 'put :value ',$3) - | PUT put_name_list put_value - `(TAG ',(car $2) 'put :rest ',(cdr $2) :value ',(list $3)) - | PUT put_name_list put_value_list - `(TAG ',(car $2) 'put :rest ',(cdr $2) :value ',$3) - ; - -put_name_list: - BRACE_BLOCK - (mapcar #'semantic-tag-name (EXPANDFULL $1 put_names)) - ; - -put_names: - LBRACE - () - | RBRACE - () - | put_name - ;; Must return a list of Semantic tags to EXPANDFULL! - (TAG $1 'put-name) - ; - -put_name: - SYMBOL - | token_type - ; - -put_value_list: - BRACE_BLOCK - (mapcar #'semantic-tag-code-detail (EXPANDFULL $1 put_values)) - ; - -put_values: - LBRACE - () - | RBRACE - () - | put_value - ;; Must return a list of Semantic tags to EXPANDFULL! - (CODE-TAG "put-value" $1) - ; - -put_value: - SYMBOL any_value - (cons $1 $2) - ; - -scopestart_decl: - SCOPESTART SYMBOL - `(TAG ',$2 'scopestart) - ; - -quotemode_decl: - QUOTEMODE SYMBOL - `(TAG ',$2 'quotemode) - ; - -start_decl: - START symbols - `(TAG ',(car $2) 'start :rest ',(cdr $2)) - ; - -keyword_decl: - KEYWORD SYMBOL string_value - `(TAG ',$2 'keyword :value ',$3) - ; - -token_decl: - TOKEN token_type_opt SYMBOL string_value - `(TAG ',$3 ',(if $2 'token 'keyword) :type ',$2 :value ',$4) - | TOKEN token_type_opt symbols - `(TAG ',(car $3) 'token :type ',$2 :rest ',(cdr $3)) - ; - -token_type_opt: - ;; EMPTY - | token_type - ; - -token_type: - LT SYMBOL GT - (progn $2) - ; - -type_decl: - TYPE token_type plist_opt - `(TAG ',$2 'type :value ',$3) - ; - -plist_opt: - ;;EMPTY - | plist - ; - -plist: - plist put_value - (append (list $2) $1) - | put_value - (list $1) - ; - -use_name_list: - BRACE_BLOCK - (mapcar #'semantic-tag-name (EXPANDFULL $1 use_names)) - ; - -use_names: - LBRACE - () - | RBRACE - () - | SYMBOL - ;; Must return a list of Semantic tags to EXPANDFULL! - (TAG $1 'use-name) - ; - -use_macros_decl: - USE-MACROS SYMBOL use_name_list - `(TAG "macro" 'macro :type ',$2 :value ',$3) - ; - -string_value: - STRING - (read $1) - ; - -;; Return a Lisp readable form -any_value: - SYMBOL - | STRING - | PAREN_BLOCK - | PREFIXED_LIST - | SEXP - ; - -symbols: - lifo_symbols - (nreverse $1) - ; - -lifo_symbols: - lifo_symbols SYMBOL - (cons $2 $1) - | SYMBOL - (list $1) - ; - -;;; Grammar rules -;; -nonterminal: - SYMBOL - (setq semantic-grammar-wy--nterm $1 - semantic-grammar-wy--rindx 0) - COLON rules SEMI - (TAG $1 'nonterminal :children $4) - ; - -rules: - lifo_rules - (apply #'nconc (nreverse $1)) - ; - -lifo_rules: - lifo_rules OR rule - (cons $3 $1) - | rule - (list $1) - ; - -rule: - rhs - (let* ((nterm semantic-grammar-wy--nterm) - (rindx semantic-grammar-wy--rindx) - (rhs $1) - comps prec action elt) - (setq semantic-grammar-wy--rindx (1+ semantic-grammar-wy--rindx)) - (while rhs - (setq elt (car rhs) - rhs (cdr rhs)) - (cond - ;; precedence level - ((vectorp elt) - (if prec - (error "Duplicate %%prec in `%s:%d' rule" nterm rindx)) - (setq prec (aref elt 0))) - ;; action - ((consp elt) - ;; don't forget that rhs items are in reverse order, so - ;; the end-of-rule semantic action is the first item. - (if (or action comps) - ;; a mid-rule action - (setq comps (cons elt comps) - ;; keep rule and action index synchronized - semantic-grammar-wy--rindx - (1+ semantic-grammar-wy--rindx)) - ;; the end-of-rule action - (setq action (car elt)))) - ;; item - (t - (setq comps (cons elt comps))))) - (EXPANDTAG - (TAG (format "%s:%d" nterm rindx) 'rule - :type (if comps "group" "empty") - :value comps :prec prec :expr action))) - ; - -rhs: - ;; EMPTY - | rhs item - (cons $2 $1) - | rhs action - (cons (list $2) $1) - | rhs PREC item - (cons (vector $3) $1) - ; - -action: - PAREN_BLOCK - | PREFIXED_LIST - | BRACE_BLOCK - (format "(progn\n%s)" - (let ((s $1)) - (if (string-match "^{[\r\n\t ]*" s) - (setq s (substring s (match-end 0)))) - (if (string-match "[\r\n\t ]*}$" s) - (setq s (substring s 0 (match-beginning 0)))) - s)) - ; - -items: - lifo_items - (nreverse $1) - ; - -lifo_items: - lifo_items item - (cons $2 $1) - | item - (list $1) - ; - -item: - SYMBOL - | CHARACTER - ; - -%% - -;;; grammar.wy ends here diff --git a/admin/grammars/java-tags.wy b/admin/grammars/java-tags.wy deleted file mode 100644 index 0f8f50fd606..00000000000 --- a/admin/grammars/java-tags.wy +++ /dev/null @@ -1,762 +0,0 @@ -;;; java-tags.wy -- Semantic LALR grammar for Java - -;; Copyright (C) 2002-2024 Free Software Foundation, Inc. -;; -;; Author: David Ponce -;; Created: 26 Aug 2002 -;; Keywords: syntax - -;; 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 . - -%package wisent-java-tags-wy -%provide semantic/wisent/javat-wy - -%{ -(declare-function semantic-parse-region "semantic" - (start end &optional nonterminal depth returnonerror)) -} - -%languagemode java-mode - -;; The default start symbol -%start compilation_unit -;; Alternate entry points -;; - Needed by partial re-parse -%start package_declaration -%start import_declaration -%start class_declaration -%start field_declaration -%start method_declaration -%start formal_parameter -%start constructor_declaration -%start interface_declaration -;; - Needed by EXPANDFULL clauses -%start class_member_declaration -%start interface_member_declaration -%start formal_parameters - -;; ----------------------------- -;; Block & Parenthesis terminals -;; ----------------------------- -%type ;;syntax "\\s(\\|\\s)" matchdatatype block - -%token PAREN_BLOCK "(LPAREN RPAREN)" -%token BRACE_BLOCK "(LBRACE RBRACE)" -%token BRACK_BLOCK "(LBRACK RBRACK)" - -%token LPAREN "(" -%token RPAREN ")" -%token LBRACE "{" -%token RBRACE "}" -%token LBRACK "[" -%token RBRACK "]" - -;; ------------------ -;; Operator terminals -;; ------------------ -%type ;;syntax "\\(\\s.\\|\\s$\\|\\s'\\)+" matchdatatype string - -%token NOT "!" -%token NOTEQ "!=" -%token MOD "%" -%token MODEQ "%=" -%token AND "&" -%token ANDAND "&&" -%token ANDEQ "&=" -%token MULT "*" -%token MULTEQ "*=" -%token PLUS "+" -%token PLUSPLUS "++" -%token PLUSEQ "+=" -%token COMMA "," -%token MINUS "-" -%token MINUSMINUS "--" -%token MINUSEQ "-=" -%token DOT "." -%token DIV "/" -%token DIVEQ "/=" -%token COLON ":" -%token SEMICOLON ";" -%token LT "<" -%token LSHIFT "<<" -%token LSHIFTEQ "<<=" -%token LTEQ "<=" -%token EQ "=" -%token EQEQ "==" -%token GT ">" -%token GTEQ ">=" -%token RSHIFT ">>" -%token RSHIFTEQ ">>=" -%token URSHIFT ">>>" -%token URSHIFTEQ ">>>=" -%token QUESTION "?" -%token XOR "^" -%token XOREQ "^=" -%token OR "|" -%token OREQ "|=" -%token OROR "||" -%token COMP "~" - -;; ----------------- -;; Literal terminals -;; ----------------- -%type ;;syntax "\\(\\sw\\|\\s_\\)+" -%token IDENTIFIER - -%type ;;syntax "\\s\"" matchdatatype sexp -%token STRING_LITERAL - -%type ;;syntax semantic-lex-number-expression -%token NUMBER_LITERAL - -%type syntax "\\\\u[0-9a-f][0-9a-f][0-9a-f][0-9a-f]" -%token unicodecharacter - -;; ----------------- -;; Keyword terminals -;; ----------------- - -;; Generate a keyword analyzer -%type ;;syntax "\\(\\sw\\|\\s_\\)+" matchdatatype keyword - -%keyword ABSTRACT "abstract" -%put ABSTRACT summary -"Class|Method declaration modifier: abstract {class|} ..." - -%keyword BOOLEAN "boolean" -%put BOOLEAN summary -"Primitive logical quantity type (true or false)" - -%keyword BREAK "break" -%put BREAK summary -"break [