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 X-Received: by 2002:a6b:9c8f:: with SMTP id f137-v6mr10810234ioe.27.1526873328204; Sun, 20 May 2018 20:28:48 -0700 (PDT) X-Received: by 2002:aca:48d2:: with SMTP id v201-v6mr1449134oia.0.1526873328064; Sun, 20 May 2018 20:28:48 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!u74-v6no4153960itb.0!news-out.google.com!f20-v6ni4708itd.0!nntp.google.com!v8-v6no4199244itc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 20 May 2018 20:28:47 -0700 (PDT) In-Reply-To: <87d0xpdfna.fsf@nightsong.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=47.185.233.194; posting-account=zwxLlwoAAAChLBU7oraRzNDnqQYkYbpo NNTP-Posting-Host: 47.185.233.194 References: <90964a59-84ee-4037-ba57-42e75faabb2e@googlegroups.com> <87d0xpdfna.fsf@nightsong.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <480ed8ed-033c-4bfe-944f-d66323a9d1ab@googlegroups.com> Subject: Re: ada-mode failing at formatting still From: "Dan'l Miller" Injection-Date: Mon, 21 May 2018 03:28:48 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:52528 Date: 2018-05-20T20:28:47-07:00 List-Id: 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, datin= g back to Lucid's XEmacs fork. from the Semantic manual, you omitted the best part: =E2=80=9CThis chapter gives an overview of Semantic and its =E2=80=A2=E2=80= =A2goals=E2=80=A2=E2=80=A2. [=E2=80=A2=E2=80=A2emphasis=E2=80=A2=E2=80=A2 added, implying that batterie= s aren't always included, and that your mileage might vary] =E2=80=9COrdinarily, [i.e., in a fresh-from-FSF GNU Emacs download] =E2=80=9CEmacs uses =E2=80=A2=E2=80=A2regular expressions=E2=80=A2=E2=80=A2= (and syntax tables) to analyze source code for purposes such as syntax hig= hlighting. This approach, though simple and efficient, has its limitations:= roughly speaking, it only =E2=80=9Cguesses=E2=80=9D the meaning of each pi= ece of source code in the context of the programming language, instead of r= igorously =E2=80=9Cunderstanding=E2=80=9D it.=E2=80=9D [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=E2=80=94programs such as GNU Global and GNU IDUtils. >=20 > Semantic provides a uniform, language-independent API for accessing > the parser output. This output can be used by other Emacs Lisp > programs to implement =E2=80=9Csyntax-aware=E2=80=9D behavior. Semanti= c 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 instal= l, 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 thoug= ht the CEDET add-on was required to turn on Semantic for various language m= odes (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 fo= r Luke's satisfaction, someone else demands a wall of text. Sheesh.