• 検索結果がありません。

compiler

N/A
N/A
Protected

Academic year: 2018

シェア " compiler"

Copied!
1
0
0

読み込み中.... (全文を見る)

全文

(1)

情報通信工学科「コンパイラ」 2010.07.28.

定期試験問題

1. アルファベット {0,1}上の文字列のうち、0が必ず 3個以上連続して出現するもの(000, 0001,00001000など)から構成される言語を表す正則表現を示せ。(15点)

2. 次の有限オートマトンが受理する文字列のうち、長さ 4以下のものをすべて列挙せよ。(15 点)

3. 次の文法について、文字列 a = (b = c )に対する構文木(解析木)を示せ。(10点)

S  E

E  E  E ∣ E ∣ E = E ∣ a ∣ b∣ c

4. 次の文法が曖昧であることを示せ。(10点)

E  E ∧ E ∣ E∨ E ∣ true ∣ false

5. 次の文法について、以下の問に答えよ。

S  b B A

A  a A ∣ ε

B  S C ∣ a

C  c B ∣ d

a) 全ての非終端記号について FIRST と FOLLOW を計算せよ。(16点) b) 全ての生成規則について DIRECTOR を計算せよ。(14点)

c) この文法は LL(1)文法か。理由を添えて答えよ。(5点) 6. 次の翻訳スキームは何を計算するものか。(15点)

S [ A]{S.val= A.val ;}

[1]

A  ε {A.val=0 ; }

[2]

A  A

1

, D {A.val = A

1

. val D.val ;}

[3]

A  D {A.val = D.val ;}

[4]

D  0 {D.val =0 :}

[5]

D  1{D.val =1 ;}

[6]

D  2{D.val=2 ;}

[7 ]

D  3{D.val =3 ;}

[8]

D  4{D.val=4 ;}

[9 ]

D  5{D.val =5 ;}

[10]

D  6 {D.val =6 ;}

[11]

D  7 {D.val =7 ;}

[12]

D  8{D.val =8 ;}

[13]

D  9 {D.val =9 ;}

[14]

参照

関連したドキュメント

(The Elliott-Halberstam conjecture does allow one to take B = 2 in (1.39), and therefore leads to small improve- ments in Huxley’s results, which for r ≥ 2 are weaker than the result

[r]

“Breuil-M´ezard conjecture and modularity lifting for potentially semistable deformations after

lines. Notice that Theorem 4 can be reformulated so as to give the mean harmonic stability of the configuration rather than that of the separate foliations. To this end it is

S., Oxford Advanced Learner's Dictionary of Current English, Oxford University Press, Oxford

this to the reader. Now, we come back to the proof of Step 2. Assume by contradiction that V is not empty.. Let u be the minimal solution with the given boundary values and let P be

At the end of the section, we will be in the position to present the main result of this work: a representation of the inverse of T under certain conditions on the H¨older

支払方法 支払日 ※② 緊急時連絡先等 ※③.