JPH04145534A - 属性文法規則解析システム - Google Patents

属性文法規則解析システム

Info

Publication number
JPH04145534A
JPH04145534A JP26890790A JP26890790A JPH04145534A JP H04145534 A JPH04145534 A JP H04145534A JP 26890790 A JP26890790 A JP 26890790A JP 26890790 A JP26890790 A JP 26890790A JP H04145534 A JPH04145534 A JP H04145534A
Authority
JP
Japan
Prior art keywords
attribute
rule
contents
syntax
rules
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP26890790A
Other languages
English (en)
Inventor
Shinichi Morimoto
真一 森本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP26890790A priority Critical patent/JPH04145534A/ja
Publication of JPH04145534A publication Critical patent/JPH04145534A/ja
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は属性文法の構文規則と意味規則を解析するシス
テムに関し、特に構文規則と意味規則の表現形式に関す
る。
〔従来の技術〕
従来、属性文法解析システムでは、読込んだ構文規則と
意味規則の内容を属性文法解析システムを記述している
プログラミング言語のデータ構造に変換しており、構文
規則と意味規則に対する解析を属性文法解析システムを
記述しているプログラミング言語のデータ構造に対する
演算によって記述している。
〔発明が解決しようとする課題〕
しかるに構文規則と意味規則に対する解析は、構文規則
と意味規則の要素の集合に関する演算として表現される
ものがほとんどであるにもかかわらず、集合というデー
タ構造はプログラミング言語の基本的なデータ構造では
ないので、解析の内容をデータ構造に関する演算を使用
して表現する必要があり、解析の内容をデータ構造に関
する演算を使用して表現する際に誤りが発生しやすかっ
た。
〔課題を解決するための手段〕
本発明の属性文法規則解析システムは、与えられた属性
文法規則を読込んで、その内容をネットワークモデル形
式に変形し、前記ネットワークモデル形式で表現された
前記属性文法規則の内容を記憶し、与えられた前記属性
文法に対する各種の解析をネットワークモデルとして統
一的に表現するようにして構成される。
〔実施例〕
次に、本発明の実施例について説明する。
第1図は本発明の一実施例を示すブロック図、第2図は
構文規則と意味規則の内容の表現形式を表した説明図、
第3図は構文規則と意味規則の例を示す説明図、第4図
は第3図の構文規則と意味規則をネットワーク形式で表
現した説明図である。
第1図において、1は属性規則読込部、2は属性規則変
形部、3は属性規則記憶部である。属性規則読込部1は
与えられた属性文法の構文規則と意味規則を読込んで属
性規則変形部2に渡す。属性規則変形部2は属性規則読
込部1から渡された内容をネットワークモデルの形式に
変形して表現し属性規則記憶部3に渡す。
第2図において、SymbOlは読込んだ構文規則に現
れる構文記号に対応するレコード、QCcurence
は読込んだ構文規則に現れる構文規則の出現位置に対応
するレコード、attr+buteは読込んだ構文規則
に現れるoccurenceの属性に対応するレコード
、5ynruleは読込んだ構文規則に対応するレコー
ド、atr  ruleは読込んだ属性規則に対応する
レコード、func  occurは読込んだ属性規則
の各attributeの値を現わす関数に対応するレ
コード、nextは各occurenceとそのすぐ右
にある0CCurenCeを結ぶレコードタイプ、5o
ftは各occurenceとその種類を表わすSYm
bOlを結ぶレコードタイプ、1eftは各ruleと
その左辺にある0CCurenCeを結ぶレコードタイ
プN topは各ruleとその右辺の最も左にあるo
ccurenceを結ぶレコードタイプ、valは各f
unc  cccurとその返却値であるattrib
uteを結ぶレコードタイプ、funcは各atr  
ruleをそこに現れる関数に対応するfunc  o
ccurを結ぶレコードタイプである。
第3図の例は2つの構文規則(r L  r 2)から
構成され、それぞれの構文規則は1つの意味規則(al
l、a21)を持っている。構文規則r1ではN e 
x e + M U Lという構文記号が現れる。rl
ではexpは左辺および右辺の左から1番目と3番目に
出現するので、rlは3つのQCcurence(ex
pll、expl2.expl3)を持つ。またexp
は属性valを持ち、allによりexplのvalの
値はexpl2、valとexpl3.valの値から
MULTIPLYという関数のallにおけるoccu
rence (MULTIPLYI 1)によって求め
られている。
第4図は第3図の例のレコードタイプの内容を表したも
のである。例えば第2図では、rlはMULIはexp
l2の右にeXp13はMULlの右にありr2ではe
xp22はMINUS2の右にあるので、nextとい
うrelati。
nはeXp12とMULI、MULIとexpl3、M
INUS21とexp22の間に存在する。
〔発明の効果〕
以上、説明したように、本発明によれば、与えられた属
性文法の構文規則と意味規則の内容をネトワークモデル
の形式で表現する事により、構文規則と意味規則に対す
る解析(与えられた属性文法の構文規則と意味規則がL
属性かどうかなど)の内容を、解析内容の記述に使用さ
れている集合演算と同じ基本演算に変形してモデルに対
する演算を用いて統一的に記述できる。したがって構文
規則と意味規則に対する解析を従来のようにプログラミ
ング言語のデータ構造に関する演算に翻訳する必要がな
く、かつ誤りを少なく実行する事が可能になる。
【図面の簡単な説明】
第1図は本発明の一実施例を示すブロック図、第2図は
属性規則の内容の表現形式を示す説明図、第3図は構文
規則と意味規則の例を示す説明図、第4図(a)〜(i
)は第3図の構文規則と意味規則をネットワーク形式で
表現した説明図である。 1・・・属性規則読込部、2・・・属性規則変形部、3
・・・属性規則記憶部。

Claims (1)

    【特許請求の範囲】
  1. 与えられた属性文法規則を読込んで、その内容をネット
    ワークモデル形式に変形し、前記ネットワークモデル形
    式で表現された前記属性文法規則の内容を記憶し、与え
    られた前記属性文法に対する各種の解析をネットワーク
    モデルとして統一的に表現することを特徴とする属性文
    法規則解析システム。
JP26890790A 1990-10-05 1990-10-05 属性文法規則解析システム Pending JPH04145534A (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26890790A JPH04145534A (ja) 1990-10-05 1990-10-05 属性文法規則解析システム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26890790A JPH04145534A (ja) 1990-10-05 1990-10-05 属性文法規則解析システム

Publications (1)

Publication Number Publication Date
JPH04145534A true JPH04145534A (ja) 1992-05-19

Family

ID=17464927

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26890790A Pending JPH04145534A (ja) 1990-10-05 1990-10-05 属性文法規則解析システム

Country Status (1)

Country Link
JP (1) JPH04145534A (ja)

Similar Documents

Publication Publication Date Title
US5355493A (en) System for encoding units of entity/relationship data to include prefixes with codes for length, action, and unit identifier
US7992088B2 (en) Method and system for copy and paste technology for stylesheet editing
US5548508A (en) Machine translation apparatus for translating document with tag
US7694284B2 (en) Shareable, bidirectional mechanism for conversion between object model and XML
EP1313032A1 (en) Document conversion
US20070136698A1 (en) Method, system and apparatus for a parser for use in the processing of structured documents
JPH0630066B2 (ja) テーブル型言語翻訳方法
US6922704B2 (en) Method for generating application specific input files
Abbott et al. Objectives of OpenMath
JPH04145534A (ja) 属性文法規則解析システム
US20070028164A1 (en) Computer readable storage medium and document processing method
US9047325B2 (en) Modularizing complex XML data for generation and extraction
JPH03260766A (ja) 括弧生成判定機能付翻訳装置
US7617089B2 (en) Method and apparatus for compiling two-level morphology rules
JPH0335325A (ja) 構文規則解析システム
JPH04153834A (ja) 属性文法規則解析システム
US7349916B2 (en) Information organization using markup languages
Ramalho et al. Algebraic specification of documents
KR100283023B1 (ko) 텍스트 사전 관리시스템에서의 표준 사전 편집 및 파일 처리 방법
JPH06202824A (ja) ページ記述言語処理装置
Roche Smaller representations for finite-state transducers and finite-state automata
Nelder et al. Input/output in statistical programming
KR970056198A (ko) 교환시스템의 데이타베이스 생성 방법
JPH01217630A (ja) Fortran言語における書式なし記録の入出力方式
JPH0689183A (ja) インタプリタ処理方式