[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-enscript] asm highlighting for PIC16 asm
From: |
gombosm |
Subject: |
[bug-enscript] asm highlighting for PIC16 asm |
Date: |
Sat, 09 Feb 2008 18:43:20 +0100 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20071022) |
Hi,
i made a highligting script for the PIC16 asm. It is included to this
email. Please include it in the next release.
Thank you in advance.
Best regards!
|
/**
* Name: pic16asm
* Description: Assembler listings.
* Author: Gombos Márton <address@hidden>
*/
asm_keywords =
/* keywords */
/\b(\
a(ddlw|ddwf|ndlw|ndwf)|\
b(cf|sf|tfsc|tfss)|\
c(all|lrf|lrw|lrwdt|omf)|\
d(ecf|ecfsz)|\
goto|\
i(ncf|ncfsz|orlw|orwf)|\
m(ovf|ovlw|ovwf)|\
nop|\
r(etfie|etlw|eturn|lf|rf)|\
s(leep|ublw|ubwf|wapf)|\
x(orlw|orwf)\
)\b/;
asm_macros =
/* macros */
/\b(\
\.(def|dim|direct|eof|file|ident|line|type)|\
b(ankisel|anksel)|\
c(block|ode|onstant)|\
d(a|ata|b|e|t|w)|\
e(lse|nd|ndc|ndif|ndm|ndw|qu|rror|rrorlevel|xitm|xpand|xtern)|\
fill|\
global|\
i(data|f|fdef|fndef|nclude)|\
list|\
local|\
m(acro|essg)|\
n(oexpand|olist)|\
org|\
p(age|agesel|rocessor)|\
r(adix|es)|\
s(et|pace|ubtitle)|\
title|\
u(data|data_acs|data_ovr|data_shr)|\
variable|\
while|\
_(_badram|_config|_idlocs|_maxram)\
)\b/;
state pic16asm extends HighlightEntry
{
/* Comments. */
/;/ {
comment_face (true);
language_print ($0);
call (eat_one_line);
comment_face (false);
}
/* Pre-processor lines. */
/^#/ {
reference_face (true);
language_print ($0);
call (eat_one_line);
reference_face (false);
}
/* Labels are averything at the beginning of the line, ending to ':' */
/^[^\t ]+:/ {
function_name_face (true);
language_print ($0);
function_name_face (false);
}
/* keywords. */
asm_keywords {
keyword_face (true);
language_print ($0);
keyword_face (false);
}
/* macros */
asm_macros {
bold (true);
language_print ($0);
bold (false);
}
/* And finally, highlight string constants. */
/\"/ {
string_face (true);
language_print ($0);
call (c_string);
string_face (false);
}
}
/*
Local variables:
mode: c
End:
*/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug-enscript] asm highlighting for PIC16 asm,
gombosm <=