]> granicus.if.org Git - yasm/commit
Handle instruction and prefix identifiers properly when used in other
authorPeter Johnson <peter@tortall.net>
Thu, 3 Nov 2005 05:29:42 +0000 (05:29 -0000)
committerPeter Johnson <peter@tortall.net>
Thu, 3 Nov 2005 05:29:42 +0000 (05:29 -0000)
commit8e1bd2ba044400e28b3219ba13d05d594825ceea
tree1fba2bb2a93cdf22de5bff8b5afaa4be7bc86dcb
parent5074259998152fa06f0c52ede73f5f2a20355ab8
Handle instruction and prefix identifiers properly when used in other
places in GAS input.  Do this by adding a tokenizer state that turns off
insn and prefix generation when inside an instruction or directive, AND
adding a special case for labels.

* gas-parser.h (state): Add INSTDIR.
* gas-token.re: Switch state back to INITIAL on ';' or newline; set state
when entering instruction or directive, add special case for labels.
* gas-bison.y: Remove non-working attempt at translating INSN and PREFIX
into string token; add special case for LABEL identifiers (generated from
special case for labels in tokenizer).

svn path=/trunk/yasm/; revision=1309
modules/parsers/gas/gas-bison.y
modules/parsers/gas/gas-parser.h
modules/parsers/gas/gas-token.re
modules/parsers/gas/tests/Makefile.inc
modules/parsers/gas/tests/gas-instlabel.asm [new file with mode: 0644]
modules/parsers/gas/tests/gas-instlabel.errwarn [new file with mode: 0644]
modules/parsers/gas/tests/gas-instlabel.hex [new file with mode: 0644]