• 沒有找到結果。

一、 1. F 2. T 二、 1. A 2. A 3. B 三 1.

N/A
N/A
Protected

Academic year: 2021

Share "一、 1. F 2. T 二、 1. A 2. A 3. B 三 1."

Copied!
2
0
0

加載中.... (立即查看全文)

全文

(1)

一、

1. F 2. T

二、

1. A 2. A 3. B

三 1.

b

b b

b a

a

a

a

0 1 2 3

2.

(a) declaration  type var-list

type  int | float

var-list  identifier ID ID  , var-list | ε

(b)

FIRST(declaration) = { int, float } FOLLOW(declaration) = { $ } FIRST(type) = { int, float} FOLLOW(type) = { identifier } FIRST(var-list) = { identifier } FOLLOW(var-list) = { $ } FIRST(ID) = { , , ε} FOLLOW(ID) = { $ }

(2)

(c)

int float , identifier $

declaration

declaration

 type var-list

declaration  type var-list type type  int type  float

var-list var-list 

identifier ID

ID ID  ,

var-list ID  ε

(d)

Parsing Input Action

$declaration int x, y, z$ declaration  type var-list

$var-list type int x, y, z$ type  int

$var-list int int x, y, z$ match

$var-list x, y, z$ var-list  identifier ID

$ID identifier x, y, z$ match

$ID , y, z$ ID  , var-list

$var-list , , y, z$ match

$var-list y, z$ var-list  identifier ID

$ID identifier y, z$ match

$ID , z$ ID  , var-list

$var-list , , z$ match

$var-list z$ var-list  identifier ID

$ID identifier z$ match

$ID $ ID ε

$ $ accept

參考文獻

相關文件

如圖,已知平行四邊形 EFGH 是平行四邊形 ABCD 的縮放圖形,則:... 阿美的房間長 3.2 公尺,寬

Quality kindergarten education should be aligned with primary and secondary education in laying a firm foundation for the sustainable learning and growth of

[r]

[r]

[r]

 If a DSS school charges a school fee exceeding 2/3 and up to 2 & 1/3 of the DSS unit subsidy rate, then for every additional dollar charged over and above 2/3 of the DSS

We compare the results of analytical and numerical studies of lattice 2D quantum gravity, where the internal quantum metric is described by random (dynamical)

[r]