nitc :: InjectedLexer :: _injected_after
The tokens to use after the real tokens (in order).nitc :: InjectedLexer :: _injected_before
The tokens to use before the real tokens (in order).nitc :: InjectedLexer :: _is_finished
nitc :: InjectedLexer :: defaultinit
nitc :: InjectedLexer :: injected_after
The tokens to use after the real tokens (in order).nitc :: InjectedLexer :: injected_after=
The tokens to use after the real tokens (in order).nitc :: InjectedLexer :: injected_before
The tokens to use before the real tokens (in order).nitc :: InjectedLexer :: injected_before=
The tokens to use before the real tokens (in order).nitc :: InjectedLexer :: is_finished
nitc :: InjectedLexer :: is_finished=
nitc $ InjectedLexer :: SELF
Type of this instance, automatically specialized in every classnitc $ InjectedLexer :: get_token
Primitive method to return a token, or return null if it is discardednitc :: InjectedLexer :: _injected_after
The tokens to use after the real tokens (in order).nitc :: InjectedLexer :: _injected_before
The tokens to use before the real tokens (in order).nitc :: InjectedLexer :: _is_finished
nitc :: Lexer :: _last_token
The last peeked token to chain themcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: InjectedLexer :: defaultinit
nitc :: Lexer :: defaultinit
core :: Object :: defaultinit
nitc :: TablesCapable :: defaultinit
nitc :: InjectedLexer :: injected_after
The tokens to use after the real tokens (in order).nitc :: InjectedLexer :: injected_after=
The tokens to use after the real tokens (in order).nitc :: InjectedLexer :: injected_before
The tokens to use before the real tokens (in order).nitc :: InjectedLexer :: injected_before=
The tokens to use before the real tokens (in order).nitc :: InjectedLexer :: is_finished
nitc :: InjectedLexer :: is_finished=
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
nitc :: Lexer :: last_token
The last peeked token to chain themnitc :: Lexer :: last_token=
The last peeked token to chain themnitc :: TablesCapable :: lexer_accept
The accept value of the lexer at initc :: TablesCapable :: lexer_goto
The goto value of the lexer at row i, column j-1nitc :: Lexer :: make_token
Allocate the right Token object for a given identifiercore :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).nitc :: TablesCapable :: parser_action
The action value of the parser at row i, column j-1nitc :: TablesCapable :: parser_goto
The goto value of the parser at row i, column j-1nitc :: Lexer :: stream_pos=
Current character in the stream
# A modified lexer that feed tokens before and after the real tokens.
class InjectedLexer
super Lexer
# The tokens to use before the real tokens (in order).
var injected_before = new List[Token]
# The tokens to use after the real tokens (in order).
# The real EOF token is produced after these tokens.
var injected_after = new List[Token]
private var is_finished = false
redef fun get_token
do
if not injected_before.is_empty then
var tok = injected_before.shift
return tok
end
if not is_finished then
var next = super
if not next isa EOF then return next
injected_after.push(next)
is_finished = true
end
var tok = injected_after.shift
return tok
end
end
src/parser_util.nit:225,1--253,3