From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.ada Subject: Re: ada-mode failing at formatting still Date: Sun, 20 May 2018 17:19:21 -0700 Organization: A noiseless patient Spider Message-ID: <87d0xpdfna.fsf@nightsong.com> References: <90964a59-84ee-4037-ba57-42e75faabb2e@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: h2725194.stratoserver.net; posting-host="c6481957bb4c16cd24a15f0721180494"; logging-data="8788"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Djd/dB7NxqKxma1QCS0lu" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cancel-Lock: sha1:WH4HDHTcE6nnme6ml8tRMfj9tkw= sha1:pmkt21MwujFmOTcqmk6KGnK92+U= Xref: reader02.eternal-september.org comp.lang.ada:52525 Date: 2018-05-20T17:19:21-07:00 List-Id: "Dan'l Miller" writes: > All the language modes in emacs rely on regular expressions instead of > a grammar. Not since many years ago. Language modes these days tend to use Semantic. See: https://www.gnu.org/software/emacs/manual/html_node/semantic/Introduction.html which says: Semantic provides a new infrastructure to analyze source code using parsers instead of regular expressions. It contains two built-in parser generators (an LL generator named Bovine and an LALR generator named Wisent, both written in Emacs Lisp), and parsers for several common programming languages. It can also make use of external parsers—programs such as GNU Global and GNU IDUtils. Semantic provides a uniform, language-independent API for accessing the parser output. This output can be used by other Emacs Lisp programs to implement “syntax-aware” behavior. Semantic itself includes several such utilities, including user-level Emacs commands for navigating, searching, and completing source code.