--[[ "fasm.lang" ****************************************************************************** * * * Flat Assembler (FASM) * * * * Language Definition * * * * v1.1 - 2017/03/14 * * * ****************************************************************************** Flat assembler v1.71.60 language definition for Highlight v3.35. Associated file extensions: ".ASM" | ".INC" Written by Tristano Ajmone: https://github.com/tajmone Released into the public domain according to the Unlicense license: http://unlicense.org ------------------------------------------------------------------------------ Project repository: https://github.com/tajmone/fasm-highlighting ------------------------------------------------------------------------------ Syntax tokens were extracted directly from FASM source file "SOURCE/TABLES.INC" of the MS Windows FASM package ('fasmw17160.zip'); thus ensuring that only FASM- supported token are highlighted. A few tokens were manualy added (see Notes). Since the number of keywords is really huge, I've tried to organize them in categories as best as I could -- the solution is far from perfect, but it should simplify maintainance of the syntax file, or porting it to other highlighters. Many keywords groups could have been condensed into single RegExs (eg: registers xmm0-31, ymm0-31 and zmm0-31) but this would have impacted parsing performance, and complicated maintainance, so for now I rather opted to keep a long lists. I've tested the syntax file to a good extent, and it seems to work well, but there might still be edge cases which need fixing (for eg: see #C,D). ------------------------------------------------------------------------------ CREDITS ------------------------------------------------------------------------------ My gratitude to André Simon and Tomasz Grysztar for their patience and kind support to all my enquiries. I've looked into the following syntax definitions for inspiration: "assembler.lang" -- Assembler definition (29k, 68s, 68x, a51, asm, s, x86) that ships with Highlight (authors unknown). "fasm.vim" -- Flat assembler syntax file for Vim, by Richard «RIscRIpt»: https://github.com/RIscRIpt/vim-fasm-syntax "x86asm.js" -- Intel x86 Assembly NASM syntax for highlight.js, by innocenat: https://github.com/isagalaev/highlight.js/blob/master/src/languages/x86asm.js "fasm.xml" -- Highlighting-Kate FASM definition, adapted by John MacFarlane and Geoff Nixon from Nicola Gigante's and Bogdan Drozdowski's "Intel x86 (NASM)": https://github.com/jgm/highlighting-kate/blob/master/xml/fasm.xml Sublime FASM-x86 -- Sublime Text 2 package, by René Köcher, based on Leonardo Gago's" Assembly-x86" package: https://github.com/Shirk/Sublime-FASM-x86 https://github.com/ljgago/Assembly-x86 ------------------------------------------------------------------------------ FLAT ASSEMBLER -- (C) 1999, Tomasz Grysztar, licensed under simplified BSD with a weak copyleft clause: https://flatassembler.net ------------------------------------------------------------------------------ HIGHLIGHT -- (C) 2002, André Simon, licensed under GNU-GPL3: http://www.andre-simon.de ------------------------------------------------------------------------------ ]] Description="fasm" IgnoreCase=true Digits=[[ (?x) # ============ HEX ============ # C (0xFF) & Pascal ($FF) style: (?:(?()[\]{}:,|&~#`;\\]]=] Comments={ { Block=false, Nested=false, Delimiter = { [[ ; ]] } } } Strings={ Delimiter=[[ (?