Previous:
Glossary
, Up:
Top
索引
1文字リテラル
:
Symbols
action
:
Actions
action data types
:
Action Types
action fetures summary
:
Action Features
actions in mid-rule
:
Mid-Rule Actions
actions, semantic
:
Semantic Actions
additional C code section
:
C Code
algorithm of parser
:
Algorithm
associativity
:
Why Precedence
Backus-Naur form
:
Language and Grammar
Bison declaration summary
:
Decl Summary
Bison declarations
:
Declarations
Bison declarations (introduction)
:
Bison Declarations
Bison grammar
:
Grammar in Bison
Bison invocation
:
Invocation
Bison parser
:
Bison Parser
Bison parser algorithm
:
Algorithm
Bison symbols, table of
:
Table of Symbols
Bison utility
:
Bison Parser
Bison 文法
:
Grammar in Bison
Bisonの記号一覧
:
Table of Symbols
Bisonの使用方法
:
Stages
Bisonの実行
:
Invocation
Bisonの実行
:
Rpcalc Gen
Bisonユーティリティ
:
Bison Parser
Bison構文解析器
:
Bison Parser
Bison構文解析器のアルゴリズム
:
Algorithm
Bison実行のオプション
:
Invocation
Bison宣言
:
Declarations
Bison宣言(導入)
:
Bison Declarations
Bison宣言の要約
:
Decl Summary
BNF
:
Language and Grammar
C code, section for additional
:
C Code
C declarations section
:
C Declarations
C-language interface
:
Interface
calc
:
Infix Calc
calculator, infix notation
:
Infix Calc
calculator, multi-function
:
Multi-function Calc
calculator, simple
:
RPN Calc
character token
:
Symbols
compiling the parser
:
Rpcalc Compile
conflicts
:
Shift/Reduce
conflicts, reduce/reduce
:
Reduce/Reduce
conflicts, suppressing warnings of
:
Expect Decl
context-dependent precedence
:
Contextual Precedence
context-free grammar
:
Language and Grammar
controlling function
:
Rpcalc Main
Cプログラム, 追加の
:
C Code
C言語インターフェイス
:
Interface
C宣言部
:
C Declarations
dangling else
:
Shift/Reduce
data types in actions
:
Action Types
data types of semantic values
:
Value Type
debugging
:
Debugging
declaration summary
:
Decl Summary
declarations, Bison
:
Declarations
declarations, Bison (introduction)
:
Bison Declarations
declarations, C
:
C Declarations
declaring literal string tokens
:
Token Decl
declaring operator precedence
:
Precedence Decl
declaring the start symbol
:
Start Decl
declaring token type names
:
Token Decl
declaring value types
:
Union Decl
declaring value types, nonterminals
:
Type Decl
default action
:
Actions
default data type
:
Value Type
default stack limit
:
Stack Overflow
default start symbol
:
Start Decl
defining language semantics
:
Semantics
else, dangling
:
Shift/Reduce
else, ぶらさがり
:
Shift/Reduce
error
:
Grammar in Bison
error recovery
:
Error Recovery
error recovery, simple
:
Simple Error Recovery
error reporting function
:
Error Reporting
error reporting routine
:
Rpcalc Error
examples, simple
:
Examples
exercises
:
Exercises
file format
:
Grammar Layout
finite-state machine
:
Parser States
formal grammar
:
Grammar in Bison
format of grammar file
:
Grammar Layout
glossary
:
Glossary
grammar file
:
Grammar Layout
grammar rule syntax
:
Rules
grammar rules section
:
Grammar Rules
grammar, Bison
:
Grammar in Bison
grammar, context-free
:
Language and Grammar
grouping, syntactic
:
Language and Grammar
infix notation calculator
:
Infix Calc
interface
:
Interface
introduction
:
Introduction
invoking Bison
:
Invocation
invoking Bison under VMS
:
VMS Invocation
LALR(1)
:
Mystery Conflicts
language semantics, defining
:
Semantics
layout of Bison grammar
:
Grammar Layout
left recursion
:
Recursion
lexical analyzer
:
Lexical
lexical analyzer, purpose
:
Bison Parser
lexical analyzer, writing
:
Rpcalc Lexer
lexical tie-in
:
Lexical Tie-ins
literal string token
:
Symbols
literal token
:
Symbols
look-ahead token
:
Look-Ahead
LR(1)
:
Mystery Conflicts
main function in simple example
:
Rpcalc Main
main関数
:
Rpcalc Main
mfcalc
:
Multi-function Calc
mid-rule actions
:
Mid-Rule Actions
multi-character literal
:
Symbols
multi-function calculator
:
Multi-function Calc
mutual recursion
:
Recursion
nonterminal symbol
:
Symbols
operator precedence
:
Precedence
operator precedence, declaring
:
Precedence Decl
options for invoking Bison
:
Invocation
overflow of parser stack
:
Stack Overflow
parse error
:
Error Reporting
parser
:
Bison Parser
parser stack
:
Algorithm
parser stack overflow
:
Stack Overflow
parser state
:
Parser States
polish notation calculator
:
RPN Calc
precedence declarations
:
Precedence Decl
precedence of operators
:
Precedence
precedence, context-dependent
:
Contextual Precedence
precedence, unary operator
:
Contextual Precedence
preventing warnings about conflicts
:
Expect Decl
pure parser
:
Pure Decl
recovery from errors
:
Error Recovery
recursive rule
:
Recursion
reduce/reduce conflict
:
Reduce/Reduce
reduction
:
Algorithm
reentrant parser
:
Pure Decl
reverse polish notation
:
RPN Calc
right recursion
:
Recursion
rpcalc
:
RPN Calc
rule syntax
:
Rules
rules section for grammar
:
Grammar Rules
running Bison (introduction)
:
Rpcalc Gen
semantic actions
:
Semantic Actions
semantic value
:
Semantic Values
semantic value type
:
Value Type
shift/reduce conflicts
:
Shift/Reduce
shifting
:
Algorithm
simple examples
:
Examples
single-character literal
:
Symbols
stack overflow
:
Stack Overflow
stack, parser
:
Algorithm
stages in using Bison
:
Stages
start symbol
:
Language and Grammar
start symbol, declaring
:
Start Decl
state (of parser)
:
Parser States
string token
:
Symbols
summary, action features
:
Action Features
summary, Bison declaration
:
Decl Summary
suppressing conflict warnings
:
Expect Decl
symbol
:
Symbols
symbol table example
:
Mfcalc Symtab
symbols (abstract)
:
Language and Grammar
symbols in Bison, table of
:
Table of Symbols
syntactic grouping
:
Language and Grammar
syntax error
:
Error Reporting
syntax of grammar rules
:
Rules
terminal symbol
:
Symbols
token
:
Language and Grammar
token type
:
Symbols
token type names, declaring
:
Token Decl
tracing the parser
:
Debugging
unary operator precedence
:
Contextual Precedence
using Bison
:
Stages
value type, semantic
:
Value Type
value types, declaring
:
Union Decl
value types, nonterminals, declaring
:
Type Decl
value, semantic
:
Semantic Values
VMS
:
VMS Invocation
warnings, preventing
:
Expect Decl
writing a lexical analyzer
:
Rpcalc Lexer
ぶらさがりelse
:
Shift/Reduce
まえがき
:
Introduction
アクション
:
Actions
アクション
:
Semantic Actions
アクション, 規則の途中
:
Mid-Rule Actions
アクションのデータ型
:
Action Types
アクションの要約
:
Action Features
インターフェイス
:
Interface
エラーからの回復
:
Error Recovery
エラー回復
:
Simple Error Recovery
エラー報告関数
:
Error Reporting
エラー報告関数
:
Rpcalc Error
オーバーフロー, 構文解析器のスタック
:
Stack Overflow
オプション, Bison実行
:
Invocation
グループ
:
Language and Grammar
コンパイル
:
Rpcalc Compile
シフト
:
Algorithm
シフト還元衝突
:
Shift/Reduce
シンボル
:
Language and Grammar
スタック, 構文解析器
:
Algorithm
スタックの限界, 省略時
:
Stack Overflow
スタックオーバーフロー
:
Stack Overflow
データ型, アクション
:
Action Types
トークン
:
Language and Grammar
トークン型
:
Symbols
トークン型名, 宣言
:
Token Decl
トークン型名の宣言
:
Token Decl
バッカス-ナウア記法
:
Language and Grammar
ファイル書式
:
Grammar Layout
リテラルトークン
:
Symbols
リテラル文字列トークン
:
Symbols
リテラル文字列トークンの宣言
:
Token Decl
意味アクション
:
Semantic Actions
意味値
:
Semantic Values
意味値のデータ型
:
Value Type
意味値型
:
Value Type
右再帰
:
Recursion
演算子の優先順位
:
Precedence
演算子の優先順位
:
Precedence Decl
回避, 衝突警告
:
Expect Decl
回復
:
Error Recovery
開始記号
:
Language and Grammar
開始記号の宣言
:
Start Decl
還元
:
Algorithm
還元/還元衝突
:
Reduce/Reduce
規則の構文
:
Rules
規則の途中のアクション
:
Mid-Rule Actions
規則部,文法に対する
:
Grammar Rules
記号
:
Symbols
記号
:
Language and Grammar
記号一覧, Bison
:
Table of Symbols
記号表の例
:
Mfcalc Symtab
逆ポーランド記法
:
RPN Calc
形式文法
:
Grammar in Bison
警告, 衝突
:
Expect Decl
結合性
:
Why Precedence
言語の意味の定義
:
Semantics
構文, 文法規則
:
Rules
構文解析エラー
:
Error Reporting
構文解析器
:
Bison Parser
構文解析器のスタック
:
Algorithm
構文解析器のスタックオーバーフロー
:
Stack Overflow
構文解析器の状態
:
Parser States
構文解析器の追跡
:
Debugging
左再帰
:
Recursion
再帰的規則
:
Recursion
再入可能構文解析器
:
Pure Decl
使用方法
:
Stages
字句解析器
:
Lexical
字句解析器
:
Rpcalc Lexer
字句解析器
:
Bison Parser
字句解析結び付き
:
Lexical Tie-ins
実行, Bison
:
Invocation
実行, VMS上
:
VMS Invocation
終端記号
:
Symbols
終端記号
:
Language and Grammar
純粋構文解析器
:
Pure Decl
省略時のスタックの限界
:
Stack Overflow
省略時アクション
:
Actions
省略時データ型
:
Value Type
省略時開始記号
:
Start Decl
衝突
:
Shift/Reduce
衝突, 還元/還元
:
Reduce/Reduce
衝突, 警告の回避
:
Expect Decl
衝突警告の回避
:
Expect Decl
状態, 構文解析器
:
Parser States
制御関数
:
Rpcalc Main
先読みトークン
:
Look-Ahead
宣言, Bison
:
Declarations
宣言, Bison(導入)
:
Bison Declarations
宣言, C
:
C Declarations
宣言, 演算子の優先順位
:
Precedence Decl
宣言, 開始記号
:
Start Decl
宣言, 値型
:
Union Decl
宣言, 非終端記号の値型
:
Type Decl
宣言の要約
:
Decl Summary
相互再帰
:
Recursion
多機能電卓
:
Multi-function Calc
単項演算子の優先順位
:
Contextual Precedence
単純な例
:
Examples
単純な例のmain関数
:
Rpcalc Main
値
:
Semantic Values
値型, 意味
:
Value Type
値型の宣言
:
Union Decl
値型の宣言, 非終端記号
:
Type Decl
中間記法
:
Infix Calc
追加のCプログラム部
:
C Code
追跡, 構文解析器
:
Debugging
定義, 言語の意味
:
Semantics
電卓
:
RPN Calc
電卓, 多機能
:
Multi-function Calc
非終端記号
:
Symbols
非終端記号
:
Language and Grammar
非終端記号, 値型の宣言
:
Type Decl
複数文字リテラル
:
Symbols
文字トークン
:
Symbols
文字列トークン
:
Symbols
文法
:
Language and Grammar
文法エラー
:
Error Reporting
文法グループ
:
Language and Grammar
文法ファイル
:
Grammar Layout
文法規則の構文
:
Rules
文法規則部
:
Grammar Rules
文脈依存優先順位
:
Contextual Precedence
文脈自由文法
:
Language and Grammar
優先順位, 演算子
:
Precedence
優先順位, 単項演算子
:
Contextual Precedence
優先順位, 文脈依存
:
Contextual Precedence
優先順位宣言
:
Precedence Decl
有限状態機械
:
Parser States
用語集
:
Glossary
要約, Bison宣言
:
Decl Summary
要約, アクション
:
Action Features
例
:
Examples
練習問題
:
Exercises
Table of Contents
まえがき
日本語訳にあたって
Bisonの利用条件
GNU GENERAL PUBLIC LICENSE
Preamble
How to Apply These Terms to Your New Programs
1 Bisonの概念
1.1 言語と文脈自由文法
1.2 形式規則からBisonの入力へ
1.3 意味値
1.4 意味アクション
1.5 Bisonの出力――構文解析器ファイル
1.6 Bisonを使う手順
1.7 Bison文法の全体像
2 例
2.1 逆ポーランド記法電卓
2.1.1
rpcalc
のための宣言
2.1.2
rpcalc
のための文法規則
2.1.2.1
input
の説明
2.1.2.2
line
の説明
2.1.2.3
expr
の説明
2.1.3
rpcalc
字句解析器
2.1.4 制御関数
2.1.5 エラー報告関数
2.1.6 構文解析器を生成するためにBisonを実行
2.1.7 構文解析器ファイルのコンパイル
2.2 中間記法電卓:
calc
2.3 単純なエラー回復
2.4 多機能電卓:
mfcalc
2.4.1
mfcalc
のための定義
2.4.2
mfcalc
のための文法規則
2.4.3
mfcalc
の記号表
2.5 練習問題
3 Bison文法ファイル
3.1 Bison文法の概要
3.1.1 C宣言部
3.1.2 Bison宣言部
3.1.3 文法規則部
3.1.4 追加のCプログラム部
3.2 記号、終端と非終端
3.3 文法規則の構文
3.4 再帰的規則
3.5 言語の意味の定義
3.5.1 データ型と意味値
3.5.2 複数の値型
3.5.3 アクション
3.5.4 アクション中の値のデータ型
3.5.5 規則の途中のアクション
3.6 Bison宣言
3.6.1 トークン型名
3.6.2 演算子の優先順位
3.6.3 値型の集合
3.6.4 非終端記号
3.6.5 衝突警告の回避
3.6.6 開始記号
3.6.7 純粋(再入可能)構文解析器
3.6.8 Bison宣言の要約
3.7 同一プログラム中の複数の構文解析器
4 構文解析器のC言語インターフェイス
4.1 構文解析器関数
yyparse
4.2 字句解析器関数
yylex
4.2.1
yylex
を呼び出す方法
4.2.2 トークンの意味値
4.2.3 トークンのテキスト中の位置
4.2.4 再入可能構文解析器を呼び出す方法
4.3 エラー報告関数
yyerror
4.4 アクション中で使える特別な機能
5 Bison構文解析器のアルゴリズム
5.1 先読みトークン
5.2 シフト還元衝突
5.3 演算子の優先順位
5.3.1 優先順位が必要な場合
5.3.2 演算子の優先順位の指定
5.3.3 優先順位の例
5.3.4 優先順位が働く仕組み
5.4 文脈依存優先順位
5.5 構文解析器の状態
5.6 還元/還元衝突
5.7 不可解な還元/還元衝突
5.8 スタックオーバーフローと防ぎ方
6 エラーからの回復
7 文脈依存性の処理
7.1 トークン型の意味情報
7.2 字句解析結び付き
7.3 字句解析結び付きとエラー回復
8 構文解析器のデバッグ
9 Bisonの実行
9.1 Bisonのオプション
9.2 オプション対応表
9.3 VMS上での実行
Appendix A Bisonの記号一覧
Appendix B 用語集
索引