Skip to content

naclsn/tree-sitter-nasm

Folders and files

NameName
Last commit message
Last commit date
May 9, 2022
Mar 27, 2023
Nov 23, 2024
Nov 23, 2024
May 9, 2022
May 9, 2022
May 15, 2022
May 15, 2022
May 9, 2022
Nov 23, 2024
May 15, 2022

Repository files navigation

tree-sitter-nasm

NASM grammars with tree-sitter.

References


Notes/Remarks

  • an expression is an expression (e.g. no "critical expressions")
  • macro reserved token are always allowed (e.g. %0) same with $ and $$
  • handling of e.g. struc and align standard macros (even though they are just macros)
  • things like j%-1 will fail (maybe (instruction j (operand %+1)) or whatever)
  • the fact that ':' is optional after a label makes it inherently ambigus:
_start:
	word1	word2
	; 'word1' may be a macro or the label and
	; 'word2' the instruction or an operand

Here opts for 'word1' as an instruction (and thus 'word2' as its first operand).