Class: Rouge::Lexers::KickAssembler

Inherits:
RegexLexer show all
Defined in:
lib/rouge/lexers/kick_assembler.rb

Overview

Find the reference for the KickAssembler syntax at www.theweb.dk/KickAssembler/KickAssembler.pdf

Constant Summary

Constants inherited from RegexLexer

RegexLexer::MAX_NULL_SCANS

Constants included from Token::Tokens

Token::Tokens::Num, Token::Tokens::Str

Instance Attribute Summary

Attributes inherited from Rouge::Lexer

#options

Class Method Summary collapse

Methods inherited from RegexLexer

append, #delegate, #fallthrough!, get_state, #get_state, #goto, #group, #groups, #in_state?, #pop!, prepend, #push, #recurse, replace_state, #reset!, #reset_stack, #stack, start, start_procs, state, #state, #state?, state_definitions, states, #step, #stream_tokens, #token

Methods inherited from Rouge::Lexer

aliases, all, #as_bool, #as_lexer, #as_list, #as_string, #as_token, assert_utf8!, #bool_option, continue_lex, #continue_lex, debug_enabled?, demo, demo_file, desc, detect?, detectable?, disable_debug!, eager_load!, #eager_load!, enable_debug!, filenames, find, find_fancy, guess, guess_by_filename, guess_by_mimetype, guess_by_source, guesses, #hash_option, #initialize, lazy, lex, #lex, #lexer_option, #list_option, lookup_fancy, mimetypes, option, option_docs, #reset!, skip_auto_load?, #stream_tokens, #string_option, tag, #tag, title, #token_option, #with

Methods included from Token::Tokens

token

Constructor Details

This class inherits a constructor from Rouge::Lexer

Class Method Details

.mnemonicsObject



17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/rouge/lexers/kick_assembler.rb', line 17

def self.mnemonics
  @mnemonics ||= Set.new %w(
    lda ldx ldy sta stx sty tax tay txa tya tsx txs pha php pla plp
    and eor ora bit adc sbc cmp cpx cpy inc inx iny dec dex dey asl
    lsr rol ror jmp jsr rts rti bcc bcs beq bmi bne bpl bvc bvs
    clc cld cli clv sec sed sei brk nop
    phx plx phy ply
    stz trb tsb bra
    neg asr dea ina
    ahx alr anc anc2 arr axs dcp isc las lax rla rra sax shx shy slo sre tas xaa
  )
end

.preprocessor_directivesObject



41
42
43
44
45
46
47
# File 'lib/rouge/lexers/kick_assembler.rb', line 41

def self.preprocessor_directives
  @preprocessor_directives ||= Set.new %w(
    define undef import importonce importif
    if endif else elif
    print printnow error asserterror
  )
end

.type_directivesObject



30
31
32
33
34
35
36
37
38
39
# File 'lib/rouge/lexers/kick_assembler.rb', line 30

def self.type_directives
  @type_directives ||= Set.new %w(
    .align .assert .asserterror .break .by .byte .cpu
    .disk .dword .dw .encoding .enum .error .errorif .eval
    .file .fill .fillword .for .function .import .importonce
    .label .lohifill .macro .memblock .modify .namespace
    .pc .print .printnow .pseudocommand .pseudopc .return
    .segment .segmentdef .struct .text .var .word .while .zp
  )
end