From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Anand Tamariya Newsgroups: gmane.emacs.devel Subject: Semantic font-lock for Java Date: Tue, 21 Jan 2020 17:09:41 +0530 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000c5aa8e059ca4dd8c" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="7153"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 21 12:41:27 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1itruQ-0001gs-8h for ged-emacs-devel@m.gmane-mx.org; Tue, 21 Jan 2020 12:41:26 +0100 Original-Received: from localhost ([::1]:52394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itruP-00054P-1D for ged-emacs-devel@m.gmane-mx.org; Tue, 21 Jan 2020 06:41:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45921) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itrsy-0003wg-B4 for emacs-devel@gnu.org; Tue, 21 Jan 2020 06:39:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itrsx-0005NW-5I for emacs-devel@gnu.org; Tue, 21 Jan 2020 06:39:56 -0500 Original-Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]:46385) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1itrsw-0005N2-Tf for emacs-devel@gnu.org; Tue, 21 Jan 2020 06:39:55 -0500 Original-Received: by mail-lj1-x22b.google.com with SMTP id m26so2363201ljc.13 for ; Tue, 21 Jan 2020 03:39:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=QL+HqapWjjhqgsKCyiMNy0iLFgvEat+bPGtWF0q9N3g=; b=hKS88dNyumOVFsA8e9K8DDmAu/L6pf653RekrTsPQcgtofSpD4XY9xi42MF8k95PfG 2fra66cO/yFjzGqrVoKj1XyMku/lKP52DRaUSswwB20gk5aY/L+TzaeFoPQGFqPXXdEn mwzXWeO3BHn62PCQOYaTLALhks2W6R+GfJ9nkYczyjyGo8qbjsyBEjhPEoBglVD7J9eG V3fD8ChSItf3EYwfETnMfXc3JwWhWU69vNdOTecgNUd0EliMOwA1agJy9+zKMCK2tgRE NiwwlPVelePmla7tvCbZRgmOg/sKgNth1GRic7aKlxpm2PVk5AsoeK9uc4PStMK/iqur TO7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=QL+HqapWjjhqgsKCyiMNy0iLFgvEat+bPGtWF0q9N3g=; b=MTolgyUw3WxopTpzLZoB3O2aI7l/sEjmVmkR8lTYz/Hw5Cerld86z2o7G7BjDbVFAH gySiW+eUV9LwlcvNd4KWWUGa0rEKUJ7/3TKBktsvy3m2OJnuNw+WCNiM9L8x52XUGDVi w6e5M8jng6FI/Zf581doyPaMPuyty9Hr+lm9k8I5lelhzcf60SA4HTgJ+pXzBKiVCQFG U/4QCQ0W5VGg8V8B9YSS7J0Hak3py5t3OA94LQCQZhf37v1mcqiJzzU+AYWYThPNZn0+ hdjPKNIKMADMe8USSmVa1S6ZlxKyNTbIWaL9wXiourdlRjiG01r3Nt653J6kOWNuFf9J OLqA== X-Gm-Message-State: APjAAAVgK87MGE9QLoDVvIodc8HhhMIClGjee8VfUxXhQX4icMCDiU/h c/y5U/8NgNSIzebfl6jHjp4JYtAW7q2PUHJ55zriE7m77JI= X-Google-Smtp-Source: APXvYqwSHQLaoIkh/bTzg0kZASKcOoH+p3WJCjqF4fXymwnkbAtsiFEXzO5RfgoR9Ii0D08GtwPldITkTthoNhdhUFM= X-Received: by 2002:a2e:8216:: with SMTP id w22mr14466021ljg.222.1579606792840; Tue, 21 Jan 2020 03:39:52 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:244455 Archived-At: --000000000000c5aa8e059ca4dd8c Content-Type: text/plain; charset="UTF-8" I've been working on Semantic font-lock for Java using CEDET Semantic infrastructure which uses Wisent incremental parsing under the hood. So far the results look promising. Hence I'm sharing the same. [image: Post image] It uses following face definitions for highlighting. (defvar semantic-format-face-alist `( (function . font-lock-function-name-face) (variable . font-lock-variable-name-face) (type . font-lock-type-face) ;; These are different between Emacsen. (include . ,'font-lock-constant-face) (package . , 'font-lock-constant-face) ;; Not a tag, but instead a feature of output (label . font-lock-string-face) (comment . font-lock-comment-face) (keyword . font-lock-keyword-face) (annotation . font-lock-builtin-face) (constant . bold) ;;(member . font-lock-member-face) (abstract . italic) (static . italic) (documentation . font-lock-doc-face) ) *Code:* Emacs customization (https://gitlab.com/atamariya/emacs/tree/dev) --000000000000c5aa8e059ca4dd8c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

I've been working on Semantic font-lock for Java using CEDET Semantic=20 infrastructure which uses Wisent incremental parsing under the hood. So=20 far the results look promising. Hence I'm sharing the same.

3D"Post

It uses following face definitions for highlighting.<= /p>

(defvar semantic-format-face-alist
  `( (function . font-lock-function-name-face)
     (variable . font-lock-variable-name-face)
     (type . font-lock-type-face)
     ;; These are different between Emacsen.
     (include . ,'font-lock-constant-face)
     (package . , 'font-lock-constant-face)
     ;; Not a tag, but instead a feature of output
     (label . font-lock-string-face)
     (comment . font-lock-comment-face)
     (keyword . font-lock-keyword-face)
     (annotation . font-lock-builtin-face)
     (constant . bold)
     ;;(member . font-lock-member-face)
     (abstract . italic)
     (static . italic)
     (documentation . font-lock-doc-face)
     )

Code: Emacs customization (https://gitlab.com= /atamariya/emacs/tree/dev)

--000000000000c5aa8e059ca4dd8c--