Class: CTokenizer::CPLexer

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

Overview

C Preprocessor 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


406
407
408
409
# File 'lib/caphir/ctokenizer.rb', line 406

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