Im searching for an way to check if any syntax errors are present in a assembly file for arm. My first try were to query all possible instructions of the arch x. My next attempt was to look for any known syntax checker as a thought that inventing the wheel might be a overkill. My primary goal is to get a nice syntax checker and or autocomplete as an vim plugin. Any hint is appreciated.
Asked
Active
Viewed 301 times
0
-
5The normal way is to try assembling it. Any decent assembler will report syntax errors with line numbers. Since most assembly languages include a macro language, a list of valid mnemonics is not sufficient check one line in isolation. – Peter Cordes Apr 03 '20 at 19:07
-
1But overall asm syntax is line-oriented and simple, so there's some hope for autocomplete of mnemonics as the first token on a line. (I wouldn't worry about completing mnemonics for lines that already have a label; people whole put `label: mnemonic` on the same line are weird.) – Peter Cordes Apr 03 '20 at 19:09