comp.lang.ada
 help / color / mirror / Atom feed
From: "Dan'l Miller" <optikos@verizon.net>
Subject: Re: ada-mode failing at formatting still
Date: Sun, 20 May 2018 20:28:47 -0700 (PDT)
Date: 2018-05-20T20:28:47-07:00	[thread overview]
Message-ID: <480ed8ed-033c-4bfe-944f-d66323a9d1ab@googlegroups.com> (raw)
In-Reply-To: <87d0xpdfna.fsf@nightsong.com>

On Sunday, May 20, 2018 at 7:19:22 PM UTC-5, Paul Rubin wrote:
> "Dan'l Miller" writes:
> > All the language modes in emacs rely on regular expressions instead of
> > a grammar.

I must admit that I am not subscribed to every nook & cranny of every Emacs mailing-list on the planet, but I thought the state of the art was:

> Not since many years ago.

2013? was when this started getting any serious traction, correct?

>  Language modes these days tend to

be able to optionally

> use Semantic

instead of their default regular expressions for syntax highlighting, dating back to Lucid's XEmacs fork.

from the Semantic manual, you omitted the best part:
“This chapter gives an overview of Semantic and its ••goals••.

[••emphasis•• added, implying that batteries aren't always included, and that your mileage might vary]

“Ordinarily,

[i.e., in a fresh-from-FSF GNU Emacs download]

“Emacs uses ••regular expressions•• (and syntax tables) to analyze source code for purposes such as syntax highlighting. This approach, though simple and efficient, has its limitations: roughly speaking, it only “guesses” the meaning of each piece of source code in the context of the programming language, instead of rigorously “understanding” it.”

[which, btw, sure seems to concur with what I commented above]

>    Semantic provides a new infrastructure

that is available to developers of language modes

>    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.

that you as an Emacs user must at least turn on overtly AIUI, if not install, compile, and configure so that various stars align in Emacs's sky:

https://emacs.StackExchange.com/questions/20409/turn-on-semantic-mode-for-c-c

Perhaps it changed in the recent year or so since perhaps 2016, but I thought the CEDET add-on was required to turn on Semantic for various language modes (or at least CEDET was the most-expedient, least-roll-your-own way to do it).

http://cedet.SourceForge.net/semantic.shtml

Just when I am practicing my not-wall-of-text/short-juicy-factoid skills for Luke's satisfaction, someone else demands a wall of text.  Sheesh.

  reply	other threads:[~2018-05-21  3:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-20 18:51 ada-mode failing at formatting still Lucretia
2018-05-20 18:59 ` Dan'l Miller
2018-05-20 19:03   ` Lucretia
2018-05-20 19:18     ` Dan'l Miller
2018-05-20 23:55   ` Shark8
2018-05-21  0:19   ` Paul Rubin
2018-05-21  3:28     ` Dan'l Miller [this message]
2018-05-21  3:37       ` Paul Rubin
2018-05-20 20:19 ` Simon Wright
2018-05-20 20:42   ` Lucretia
2018-05-20 21:07     ` Dan'l Miller
2018-05-21  6:49       ` Simon Wright
2018-05-21  7:11     ` Simon Wright
2018-05-21  8:57       ` Lucretia
2018-05-21 12:31         ` Simon Wright
2018-05-21 12:51           ` Lucretia
2018-05-21 13:35           ` Simon Wright
2018-05-21  7:18     ` Simon Wright
2018-05-21  8:59       ` Lucretia
2018-05-20 20:19 ` Lucretia
2018-05-21 16:35 ` Lucretia
2018-05-21 16:37   ` Dan'l Miller
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox