|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.oklab.compiler.SourceReader
public class SourceReader
ソースコードをファイルから読むクラス.
| フィールドの概要 | |
|---|---|
private java.io.BufferedReader |
br
|
java.lang.String |
curentIdentifer
現在保持している識別子. |
(package private) StringExt |
currentLine
|
int |
currentToken
現在このクラスが保持しているトークン. |
long |
currentValue
現在保持している値. |
java.lang.String |
filename
入力ソースコードの名前. |
| コンストラクタの概要 | |
|---|---|
SourceReader(java.lang.String filename)
初期化. |
|
| メソッドの概要 | |
|---|---|
int |
nextToken()
字句解析(Lexical analysis). |
private int |
read()
|
void |
readLine()
構文解析(Syntax analysis). |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| フィールドの詳細 |
|---|
public java.lang.String filename
public int currentToken
private java.io.BufferedReader br
StringExt currentLine
public java.lang.String curentIdentifer
public long currentValue
| コンストラクタの詳細 |
|---|
public SourceReader(java.lang.String filename)
filename - 入力ソースコードの名前.| メソッドの詳細 |
|---|
public void readLine()
throws CompileError
CompileError - 構文解析に失敗した時に投げる.
public int nextToken()
throws CompileError
CompileError - 字句解析に失敗した時に投げる.private int read()
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||