nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
jwrapper: accept interfaces
[nit.git]
/
src
/
parser
/
lexer_work.nit
diff --git
a/src/parser/lexer_work.nit
b/src/parser/lexer_work.nit
index
e7102b6
..
b933208
100644
(file)
--- a/
src/parser/lexer_work.nit
+++ b/
src/parser/lexer_work.nit
@@
-39,11
+39,6
@@
redef class Token
end
redef class EOF
end
redef class EOF
- redef fun parser_index: Int
- do
- return 97
- end
-
init init_tk(loc: Location)
do
_cached_text = ""
init init_tk(loc: Location)
do
_cached_text = ""
@@
-85,8
+80,9
@@
end
# It is better user with the Parser
class Lexer
super TablesCapable
# It is better user with the Parser
class Lexer
super TablesCapable
+
# Last peeked token
# Last peeked token
- var token: nullable Token
+ var token: nullable Token = null
# Lexer current state
private var state: Int = 0
# Lexer current state
private var state: Int = 0
@@
-103,18
+99,12
@@
class Lexer
# Current column in the input stream
var pos: Int = 0
# Current column in the input stream
var pos: Int = 0
- # Was the last character a cariage-return?
+ # Was the last character a carriage-return?
var cr: Bool = false
# Constante state values
private fun state_initial: Int do return 0 end
var cr: Bool = false
# Constante state values
private fun state_initial: Int do return 0 end
- # Create a new lexer for a stream (and a name)
- init(file: SourceFile)
- do
- self.file = file
- end
-
# The last peeked token to chain them
private var last_token: nullable Token = null
# The last peeked token to chain them
private var last_token: nullable Token = null