Class: CTokenizer::CLexer

Inherits:
LexerBase show all
Defined in:
lib/caphir/ctokenizer.rb

Overview

C Lexer

Constant Summary

Constants included from CTokenizer

CP_RESERVED, C_RESERVED, EOF_TOKEN

Instance Attribute Summary

Attributes included from Sourced

#source

Instance Method Summary collapse

Methods inherited from LexerBase

#initialize

Methods included from Sourced

#empty?, #file, #file=, #line, #line=, #match?, #scan

Methods included from CTokenizer

#collect, #each, #error, error, line_count, #parse_error, #to_a, #token_error, #unmatched_error, #warning

Constructor Details

This class inherits a constructor from CTokenizer::LexerBase

Instance Method Details

#shiftObject



398
399
400
401
# File 'lib/caphir/ctokenizer.rb', line 398

def shift
	t = super
	C_RESERVED.fetch(t.at(1), t)
end