diff --git a/lib/n65/regexes.rb b/lib/n65/regexes.rb index 192fa84..6e35aed 100644 --- a/lib/n65/regexes.rb +++ b/lib/n65/regexes.rb @@ -1,15 +1,14 @@ - +# frozen_string_literal: true module N65 - - #### - ## All the regexes used to parse in one module + # All the regexes used to parse in one module module Regexes - ## Mnemonics + # rubocop:disable Naming/ConstantName + # Mnemonics Mnemonic = '([A-Za-z]{3})' Branches = '(BPL|BMI|BVC|BVS|BCC|BCS|BNE|BEQ|bpl|bmi|bvc|bvs|bcc|bcs|bne|beq)' - ## Numeric Literals + # Numeric Literals Hex8 = '\$([A-Fa-f0-9]{1,2})' Hex16 = '\$([A-Fa-f0-9]{3,4})' @@ -17,17 +16,17 @@ module N65 Bin16 = '%([01]{9,16})' Num8 = Regexp.union(Regexp.new(Hex8), Regexp.new(Bin8)).to_s - Num16 = Regexp.union(Regexp.new(Hex16),Regexp.new(Bin16)).to_s + Num16 = Regexp.union(Regexp.new(Hex16), Regexp.new(Bin16)).to_s Immediate = "\##{Num8}" - ## Symbols, must begin with a letter, and supports dot syntax + # Symbols, must begin with a letter, and supports dot syntax Sym = '([a-zA-Z][a-zA-Z\d_\.]*(?:[\+\-\*\/]\d+)*)' - - ## The X or Y register + # The X or Y register XReg = '[Xx]' YReg = '[Yy]' - end + # rubocop:enable Naming/ConstantName + end end