class_body
{ "{"
block_comment "/** The end of stream symbol */"
field_declaration
modifiers
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "END_OF_STREAM"
= "="
unary_expression
- "-"
decimal_integer_literal "1"
; ";"
block_comment "/** Undefined state for the lookahead char */"
field_declaration
modifiers
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "UNDEFINED"
= "="
unary_expression
- "-"
decimal_integer_literal "2"
; ";"
block_comment "/** The last char returned */"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "lastChar"
= "="
identifier "UNDEFINED"
; ";"
block_comment "/** The line counter */"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "lineCounter"
= "="
decimal_integer_literal "0"
; ";"
block_comment "/**\n * Created extended buffered reader using default bu"...
constructor_declaration
identifier "ExtendedBufferedReader"
formal_parameters
( "("
formal_parameter
type_identifier "Reader"
identifier "r"
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
identifier "r"
) ")"
; ";"
} "}"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
integral_type
int "int"
identifier "read"
formal_parameters
( "("
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "current"
= "="
method_invocation
super "super"
. "."
identifier "read"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression any 1:2
identifier "current"
== "=="
character_literal "'\\n'"
) ")"
block
{ "{"
expression_statement
update_expression
identifier "lineCounter"
++ "++"
; ";"
} "}"
expression_statement
assignment_expression
identifier "lastChar"
= "="
identifier "current"
; ";"
return_statement
return "return"
identifier "lastChar"
; ";"
} "}"
block_comment "/**\n * Returns the last character that was read as an in"...
method_declaration
integral_type
int "int"
identifier "readAgain"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "lastChar"
; ";"
} "}"
method_declaration (+227 nodes collapsed)
block_comment "/**\n * Calls {@link BufferedReader#readLine()} which dro"...
method_declaration (+101 nodes collapsed)
block_comment "/**\n * Returns the next character in the current reader "...
method_declaration (+50 nodes collapsed)
block_comment "/**\n * Returns the nof line read\n *\n * @return t"...
method_declaration
integral_type
int "int"
identifier "getLineNumber"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "lineCounter"
; ";"
} "}"
} "}"