patchGNU nano - Patches: patch #9909, syntax highlighting for Ada

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #9909: syntax highlighting for Ada

Submitter:  Andreas K. Förster <akf>
Submitted:  Thu 19 Mar 2020 09:37:48 PM UTC
   
 
Priority:  3 - Low Status:  Done
Privacy:  Public Assigned to:  bens
Open/Closed:  Closed Release:  None

Jump to the original submission

Thu 30 Jul 2020 07:20:04 AM UTC, comment #10: 

Released in nano-5.0.

Benno Schulenberg <bens>
Group administrator
Sun 21 Jun 2020 07:42:21 AM UTC, comment #9: 

Thanks.  I've added the comment about the linter in the file, fixed a typo, and added ada.nanorc to Makefile.am.  I've also used [abcs] instead, because an obvious order (alphabetic) is easier to grasp.

Pushed to master, commit ad2490c3.

Benno Schulenberg <bens>
Group administrator
Sat 20 Jun 2020 08:32:23 PM UTC, comment #8: 

Added new file #49331.

comment #7:
And in the filename regex, wouldn't it be better to write [abcs]?

I sorted it by relevance.
GNAT uses .adb for body files and .ads for specifications.
There can also be a file named gnat.adc for project specific configuration pragmas.
The extension .ada is probably used by other Ada systems.

Note: the linter command leaves an ALI file in the working directory.
https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gnat_ugn/Using-gcc-for-Semantic-Checking.html

Andreas K. Förster <akf>
Fri 19 Jun 2020 03:20:43 PM UTC, comment #7: 

Better.  But I forgot to say: please add introductory comments at the head of the file, like in lua.nanorc or extra/haskell.nanorc.  That's how new files should look.

The URL referencing the standard can be moved to come after those intro comments.  The second linter line is unneeded.  And in the filename regex, wouldn't it be better to write [abcs]?  Also, the parentheses there are superfluous.

Benno Schulenberg <bens>
Group administrator
Fri 19 Jun 2020 01:44:08 PM UTC, comment #6: 

I've added a signed of patch.
Is it okay that way?

Andreas K. Förster <akf>
Fri 19 Jun 2020 01:40:16 PM UTC, comment #5: 


comment #4:

> Hello Andreas,
>
> The syntax/extra directory has meanwhile been made.  Can you please supply your Ada syntax file as a Signed-off git patch?

Andreas K. Förster <akf>
Tue 16 Jun 2020 11:41:45 AM UTC, comment #4: 

Hello Andreas,

The syntax/extra directory has meanwhile been made.  Can you please supply your Ada syntax file as a Signed-off git patch?

Benno Schulenberg <bens>
Group administrator
Sun 22 Mar 2020 07:39:09 PM UTC, comment #3: 

comment #1:

> (Each installed syntax burdens nano's startup time, so I prefer to install only syntaxes for file types that are widely used.  Some trimming can be done there: fortran, gentoo, mgp, pov...)


How about collecting the regex's for filenames in one file and then load the syntax file only when it is needed?

Andreas K. Förster <akf>
Sun 22 Mar 2020 03:29:24 PM UTC, comment #2: 

It would be nice if you would include it in a syntax/extra directory.

While Ada is seldom used for general purpose software, but it is used in fields where safety is important.
http://www.seas.gwu.edu/%7Emfeldman/ada-project-summary.html

The compiler GNAT is part of the GNU Compiler Collection (GCC).

Andreas K. Förster <akf>
Sun 22 Mar 2020 11:08:38 AM UTC, comment #1: 

Thanks for the syntax file.  But, since Ada is not a widely used language, and is not found on any default install of a Linux distro, I am not going to include it into the repo.

However, I've been thinking for some time already to add a syntax/extra directory, for syntaxes that do not get installed by default because they are seldom used, but are nice to have in the distributed tarball.

(Each installed syntax burdens nano's startup time, so I prefer to install only syntaxes for file types that are widely used.  Some trimming can be done there: fortran, gentoo, mgp, pov...)

Benno Schulenberg <bens>
Group administrator
Thu 19 Mar 2020 09:37:48 PM UTC, original submission:  

Attached is a syntax highlighting file for Ada 2012 or earlier.

Note: the linter command leaves an .ali file in the working directory. When it's the same directory where you compile, it will be simply replaced. Otherwise it may stay around.

The variant with -gnats doesn't leave a file, but it misses many problems.

There are some minor colouring bugs.

Andreas K. Förster <akf>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #48630:  ada.nanorc added by akf (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Posted a comment)
  • -email is unavailable- added by akf (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-07-30 bens Open/ClosedOpen Closed
    2020-06-21 bens StatusNone Done
    2020-06-20 akf Attached File- Added 0001-syntax-ada-new-syntax-file-for-Ada-2012.patch, #49331
    2020-06-19 akf Attached File- Added 0001-syntax-ada-new-syntax-file-for-Ada-2012.patch, #49319
    2020-06-16 bens Priority5 - Normal 3 - Low
        Assigned toNone bens
    2020-03-19 akf Attached File- Added ada.nanorc, #48630

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code