Recipient Command Exp Command Address Command HASH function

  • Slides: 9
Download presentation

非終端記号(生成規則)定義 Recipient : = Command. Exp : = [Command] Address Command : = HASH

非終端記号(生成規則)定義 Recipient : = Command. Exp : = [Command] Address Command : = HASH function [PERIOD alias] HASH Address : = Add. Exp AT Domain : = Subdomain [PERIOD Domain. Arg]+ Add. Exp : = Mul. Exp [MINUS Mul. Exp | PLUS Mul. Exp] Mul. Exp : = Exp [PERIOD Exp] Exp : = rule OP_BRACE Paralist END_BRACE Paralist : = Para [PLUS Para] Para : = value [MINUS value]

文法(生成規則)定義 ( )* : 0回以上の繰り返し ( )+: 1回以上の繰り返し ( )? : 0回または 1回 Command.

文法(生成規則)定義 ( )* : 0回以上の繰り返し ( )+: 1回以上の繰り返し ( )? : 0回または 1回 Command. Exp() { ( Command() )? Address() } Command() {  Arg() ( Arg() )*  } Address() { Add. Exp() domain() } domain() { Arg() ( Arg() )+ } Add. Exp() { Mul. Exp() ( Mul. Exp() | Mul. Exp() )* } Mul. Exp() { Exp() ( Exp() )* } Exp() { Arg() Paralist()  } Paralist() { Para() ( Para() )* } Para() { Arg() ( Arg() )* } Arg() {  }

dept{ics}. grade{3 -4}@keio. rmx. jp rule: dept grade Address (q 1) intersect (q 3)

dept{ics}. grade{3 -4}@keio. rmx. jp rule: dept grade Address (q 1) intersect (q 3) Mul. Exp q 1 rule [dept] Exp q 3 value [ics] keio. properties dept[1]=q 1 grade[1]=q 2 grade[2]=q 3 Domain q 3 rule sub d. Arg [keio] [rmx] d. Arg [jp] Paralist q 3 [grade] Para value [3] [4]