[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New tree-sitter mode: bison-ts-mode
From: |
Eli Zaretskii |
Subject: |
Re: New tree-sitter mode: bison-ts-mode |
Date: |
Fri, 22 Sep 2023 08:52:03 +0300 |
> Date: Thu, 21 Sep 2023 22:15:45 +0200
> From: Augustin Chéneau (BTuin) <btuin@mailo.com>
>
> I'd like to propose a new tree-sitter mode for Emacs, bison-ts-mode.
> This is a major mode for GNU Bison grammar files, and it supports the
> embedded languages C, C++ and Java. Bison also supports D, but this
> language is not yet supported in Emacs so this mode does not support it
> either.
>
> Since Bison is a superset of Yacc, it should work with Yacc without
> modification.
> The grammar is available here: <https://gitlab.com/btuin2/tree-sitter-bison>
Thanks.
> In addition of the mode, three patches are joined (should I open a bug
> report for those?).
>
>
> The first one is to add some missing rules in c-ts-mode. Currently
> there is no rule if an identifier in a declaration is on a new line.
> In these two cases, "variable_name" is not indented:
>
> static myttype *
> variable_name;
>
> static myttype
> variable_name;
>
> The new behavior is the same as c-mode.
I think this patch should be installed on the emacs-29 branch. (It is
a very small change, so we can install it even before the legal
paperwork is completed.) Yuan, any objections or comments to this
one?
Re: New tree-sitter mode: bison-ts-mode, Stefan Kangas, 2023/09/22
Re: New tree-sitter mode: bison-ts-mode, Yuan Fu, 2023/09/22
Re: New tree-sitter mode: bison-ts-mode, Yuan Fu, 2023/09/24