node/lib/metasm/metasm/parse.rb
def parse_intfloat(lexer, tok)
			if not tok.value and tok.raw == '$'
				l = lexer.program.cursource.last
				if not l.kind_of? Label
					l = Label.new(lexer.program.new_label('instr_start'))
					l.backtrace = tok.backtrace
					lexer.program.cursource << l
				end
				tok.value = l.name
			elsif not tok.value and tok.raw == '$$'
				l = lexer.program.cursource.first
				if not l.kind_of? Label
					l = Label.new(lexer.program.new_label('section_start'))
					l.backtrace = tok.backtrace
					lexer.program.cursource.unshift l
				end
				tok.value = l.name
			elsif not tok.value and tok.raw == '$_'
				tok.value = lexer.program.locallabels_fwd('endinstr')
			elsif not tok.value and tok.raw =~ /^([1-9][0-9]*)([fb])$/
				case $2
				when 'b'; tok.value = lexer.program.locallabels_bkw($1)	# may fallback to binary parser
				when 'f'; tok.value = lexer.program.locallabels_fwd($1)
				end
			end

			parse_num_value(lexer, tok)
		end
# parses an integer/a float, sets its tok.value, consumes&aggregate necessary following tokens (point, mantissa..)
# handles $/$$ special asm label name
# XXX for binary, use _ delimiter or 0b prefix, or start with 0 : 1b may conflict with backward local anonymous label reference
parses an integer/a float, sets its tok.value, consumes&aggregate necessary following tokens (point, mantissa..)
handles $/$$ special asm label name
XXX for binary, use _ delimiter or 0b prefix, or start with 0 : 1b may conflict with backward local anonymous label reference
parses an integer / a float sets its tok . value consumes&aggregate necessary following tokens ( point mantissa .. ) handles $ / $$ special asm label name XXX for binary use _ delimiter or 0b prefix or start with 0 : 1b may conflict with backward local anonymous label reference
def parse_intfloat(lexer, tok)
			if not tok.value and tok.raw == '$'
				l = lexer.program.cursource.last
				if not l.kind_of? Label
					l = Label.new(lexer.program.new_label('instr_start'))
					l.backtrace = tok.backtrace
					lexer.program.cursource << l
				end
				tok.value = l.name
			elsif not tok.value and tok.raw == '$$'
				l = lexer.program.cursource.first
				if not l.kind_of? Label
					l = Label.new(lexer.program.new_label('section_start'))
					l.backtrace = tok.backtrace
					lexer.program.cursource.unshift l
				end
				tok.value = l.name
			elsif not tok.value and tok.raw == '$_'
				tok.value = lexer.program.locallabels_fwd('endinstr')
			elsif not tok.value and tok.raw =~ /^([1-9][0-9]*)([fb])$/
				case $2
				when 'b'; tok.value = lexer.program.locallabels_bkw($1)	
				when 'f'; tok.value = lexer.program.locallabels_fwd($1)
				end
			end
			parse_num_value(lexer, tok)
		end
def parse_intfloat ( lexer , tok ) if not tok . value and tok . raw == '$' l = lexer . program . cursource . last if not l . kind_of? Label l = Label . new ( lexer . program . new_label ( 'instr_start' ) ) l . backtrace = tok . backtrace lexer . program . cursource << l end tok . value = l . name elsif not tok . value and tok . raw == '$$' l = lexer . program . cursource . first if not l . kind_of? Label l = Label . new ( lexer . program . new_label ( 'section_start' ) ) l . backtrace = tok . backtrace lexer . program . cursource . unshift l end tok . value = l . name elsif not tok . value and tok . raw == '$_' tok . value = lexer . program . locallabels_fwd ( 'endinstr' ) elsif not tok . value and tok . raw =~ / ^([1-9][0-9]*)([fb])$ / case $2 when 'b' ; tok . value = lexer . program . locallabels_bkw ( $1 ) when 'f' ; tok . value = lexer . program . locallabels_fwd ( $1 ) end end parse_num_value ( lexer , tok ) end
parses an integer/a float, sets its tok.value, consumes&aggregate necessary following tokens (point, mantissa..)
handles $/$$ special asm label name
XXX for binary, use _ delimiter or 0b prefix, or start with 0 : 1b may conflict with backward local anonymous label reference
parses an integer / a float sets its tok . value consumes&aggregate necessary following tokens ( point mantissa .. ) handles $ / $$ special asm label name XXX for binary use _ delimiter or 0b prefix or start with 0 : 1b may conflict with backward local anonymous label reference
# may fallback to binary parser
lexer
tok