[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] Syntax Highlighting for AT&T assembly
From: |
Eitan Adler |
Subject: |
[Nano-devel] Syntax Highlighting for AT&T assembly |
Date: |
Tue, 8 Feb 2011 12:08:42 -0500 |
I wrote a nanorc file for the highlighting of AT&T format assembly
instructions. This file is licensed under a 2-clause BSD license. It
would be nice if this file could be included in the next release of
nano.
syntax "asm" "\.s$"
#instructions
icolor brightgreen
"(push(f)?|pop(f)?|add|sub|subi|mul|imul|mov|and|adc|lea)([blwq])"
icolor brightgreen "(call|leave|ret|int)"
#directives
icolor green
"\.(section|b?align|byte|data|double|text|type|ident|size|string|globl|note)"
icolor green
"\.(dim|eject|else|elseif|end|endef|endfunc|endif|err|exitm|extern|fail|file)"
icolor green
"\.(fill|float|hidden|hword|if|incbin|include|int|irp|irpc|lcomm|lflags|ln)"
icolor green
"\.(list|long|macro|mri|nolist|octa|org|p2align|popsection|previous|protected|psize|purgem)"
icolor green
"\.(pushsection|quad|rept|sbttl|scl|set|short|single|skip|space|sleb128|stab)"
icolor green
"\.(struct|subsection|symver|tab|title|uleb128|val|version|vtable(entry|inherit)|weak|word)"
#annotations
color brightmagenta "@[a-zA-Z0-9]*"
#strings
color blue "('[^']*')|(\"[^"]*\")"
#numbers
color magenta "\$(0x)?(-)?[0-9a-fA-F.]+"
#labels in call
color magenta "\$\.[a-zA-Z0-9]*"
#registers
color cyan "%e?[abcd][hlx]?"
color cyan "%e?[sd]i"
#comments
color yellow "#.*$"
#functions
color brightred "^[a-zA-Z][A-Za-z0-9]*:"
#labels
color red "^\.[a-zA-Z][A-Za-z0-9]*:"
--
Eitan Adler
- [Nano-devel] Syntax Highlighting for AT&T assembly,
Eitan Adler <=