GNU AS (At&t) for Notepad++

Programming, for all ages and all languages.
Post Reply
rom1nux
Posts: 2
Joined: Sun Nov 16, 2014 2:59 pm

GNU AS (At&t) for Notepad++

Post by rom1nux »

Hello,

I search for long time to get syntax highlighting for GNU Assembler (GAS,AT&T syntax) on Notepad++ and i found nothing...so i begin to write a simple bash script (write with Cygwin) to build a "User Defined Language". This script search into Binutils sources files to retrieve all keywords and generate XML file. This file can be to quickly imported into Notepad++. This is not an ideal solution but more than the original "Assembler" (Intel) provided with Notepad++. This script can build file to handle "i386" and "arm" syntaxe. (arm support is not completed yet).

To quickly add GAS user language file to Notepad++ :
  • Download gnuas_i386.zip or gnuas_arm.zip
  • Unzip the file to get the xml (UDL) file
  • Go to Notepad++ > Language > Define your language > Import
  • Select the xml file
  • Restart Notepad++
To build user language flle yourself from binutils directory :
  • Download npp_gnuas_builder.zip
  • Unzip the file to get the bash script
  • Look at the script header for configuration
  • Run npp_gnuas_builder.sh like

    Code: Select all

    npp_gnuas_builder.sh       # Show script usage
    npp_gnuas_builder.sh all   # Build all language definition
    npp_gnuas_builder.sh i386  # Build i386 language definition
    npp_gnuas_builder.sh arm   # Build arm language definition
    
Here is builder outpout showing the supported keywords count :

Code: Select all

--------------------------------------------------------
  NOTEPAD++ GNU-AS USER DEFINED LANGUAGE BUILDER V0.03
--------------------------------------------------------

      [I386]
-Building registers list...
 281 registers
-Building opcodes list...
 2408 opcodes
-Building directives list...
 195 directives
-Building operators list...
 35 operators
-Building archs list...
 98 archs
-Building preprocessor directives list...
 17 preprocessor directives
-Building xml file...
 File 'gnuas_i386.xml' ready !

      [ARM]
-Building registers list...
 46 registers
-Building opcodes list...
 1352 opcodes
-Building directives list...
 214 directives
-Building operators list...
 35 operators
-Building archs list...
 164 archs
-Building preprocessor directives list...
 17 preprocessor directives
-Building xml file...
 File 'gnuas_arm.xml' ready !
I hope this will be helpful...
Attachments
npp_gnuas_builder.zip
Builder script V0.03
(4.95 KiB) Downloaded 117 times
gnuas_arm.zip
arm user definition language
(5.4 KiB) Downloaded 176 times
gnuas_i386.zip
i386 user definition language
(8.67 KiB) Downloaded 218 times
Post Reply