node/lib/metasm/metasm/cpu/ia32/parse.rb
# handles cpu-specific parser instruction, falls back to Ancestor's version if unknown keyword
# XXX changing the cpu size in the middle of the code may have baaad effects...
handles cpu-specific parser instruction, falls back to Ancestor's version if unknown keyword
XXX changing the cpu size in the middle of the code may have baaad effects
handles cpu - specific parser instruction falls back to Ancestor ' s version if unknown keyword XXX changing the cpu size in the middle of the code may have baaad effects
def parse_parser_instruction(lexer, instr)
		case instr.raw.downcase
		when '.mode', '.bits'
			lexer.skip_space
			if tok = lexer.readtok and tok.type == :string and (tok.raw == '16' or tok.raw == '32')
				@size = tok.raw.to_i
				lexer.skip_space
				raise instr, 'syntax error' if ntok = lexer.nexttok and ntok.type != :eol
			else
				raise instr, 'invalid cpu mode'
			end
		else super(lexer, instr)
		end
	end
def parse_parser_instruction ( lexer , instr ) case instr . raw . downcase when '.mode' , '.bits' lexer . skip_space if tok = lexer . readtok and tok . type == :string and ( tok . raw == '16' or tok . raw == '32' ) @size = tok . raw . to_i lexer . skip_space raise instr , 'syntax error' if ntok = lexer . nexttok and ntok . type != :eol else raise instr , 'invalid cpu mode' end else super ( lexer , instr ) end end
handles cpu-specific parser instruction, falls back to Ancestor's version if unknown keyword
XXX changing the cpu size in the middle of the code may have baaad effects...
handles cpu - specific parser instruction falls back to Ancestor ' s version if unknown keyword XXX changing the cpu size in the middle of the code may have baaad effects ...
lexer
instr