⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bison, the yacc-compatible parser generator.htm

📁 Lex和Yacc的Manual
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0050)http://dinosaur.compilertools.net/bison/index.html -->
<HTML><HEAD><TITLE>Bison, The YACC-compatible Parser Generator</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2800.1276" name=GENERATOR></HEAD>
<BODY bgColor=white><A href="http://dinosaur.compilertools.net/">The Lex &amp; 
Yacc Page</A> 
<P>
<H1>Bison<BR>The YACC-compatible Parser Generator </H1><B><I>November 1995, 
Bison Version 1.25<BR>by Charles Donnelly and Richard Stallman 
</I></B><BR><BR><BR>
<UL>
  <LI><A href="http://dinosaur.compilertools.net/bison/bison_1.html#SEC1" 
  name=SEC1>Introduction</A> 
  <LI><A href="http://dinosaur.compilertools.net/bison/bison_2.html#SEC2" 
  name=SEC2>Conditions for Using Bison</A> 
  <LI><A href="http://dinosaur.compilertools.net/bison/bison_3.html#SEC3" 
  name=SEC3>GNU GENERAL PUBLIC LICENSE</A> 
  <UL>
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_3.html#SEC4" 
    name=SEC4>Preamble</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_3.html#SEC5" 
    name=SEC5>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND 
    MODIFICATION</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_3.html#SEC6" 
    name=SEC6>How to Apply These Terms to Your New Programs</A> </LI></UL>
  <LI><A href="http://dinosaur.compilertools.net/bison/bison_4.html#SEC7" 
  name=SEC7>The Concepts of Bison</A> 
  <UL>
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_4.html#SEC8" 
    name=SEC8>Languages and Context-Free Grammars</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_4.html#SEC9" 
    name=SEC9>From Formal Rules to Bison Input</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_4.html#SEC10" 
    name=SEC10>Semantic Values</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_4.html#SEC11" 
    name=SEC11>Semantic Actions</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_4.html#SEC12" 
    name=SEC12>Bison Output: the Parser File</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_4.html#SEC13" 
    name=SEC13>Stages in Using Bison</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_4.html#SEC14" 
    name=SEC14>The Overall Layout of a Bison Grammar</A> </LI></UL>
  <LI><A href="http://dinosaur.compilertools.net/bison/bison_5.html#SEC15" 
  name=SEC15>Examples</A> 
  <UL>
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_5.html#SEC16" 
    name=SEC16>Reverse Polish Notation Calculator</A> 
    <UL>
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_5.html#SEC17" 
      name=SEC17>Declarations for <CODE>rpcalc</CODE></A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_5.html#SEC18" 
      name=SEC18>Grammar Rules for <CODE>rpcalc</CODE></A> 
      <UL>
        <LI><A href="http://dinosaur.compilertools.net/bison/bison_5.html#SEC19" 
        name=SEC19>Explanation of <CODE>input</CODE></A> 
        <LI><A href="http://dinosaur.compilertools.net/bison/bison_5.html#SEC20" 
        name=SEC20>Explanation of <CODE>line</CODE></A> 
        <LI><A href="http://dinosaur.compilertools.net/bison/bison_5.html#SEC21" 
        name=SEC21>Explanation of <CODE>expr</CODE></A> </LI></UL>
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_5.html#SEC22" 
      name=SEC22>The <CODE>rpcalc</CODE> Lexical Analyzer</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_5.html#SEC23" 
      name=SEC23>The Controlling Function</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_5.html#SEC24" 
      name=SEC24>The Error Reporting Routine</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_5.html#SEC25" 
      name=SEC25>Running Bison to Make the Parser</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_5.html#SEC26" 
      name=SEC26>Compiling the Parser File</A> </LI></UL>
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_5.html#SEC27" 
    name=SEC27>Infix Notation Calculator: <CODE>calc</CODE></A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_5.html#SEC28" 
    name=SEC28>Simple Error Recovery</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_5.html#SEC29" 
    name=SEC29>Multi-Function Calculator: <CODE>mfcalc</CODE></A> 
    <UL>
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_5.html#SEC30" 
      name=SEC30>Declarations for <CODE>mfcalc</CODE></A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_5.html#SEC31" 
      name=SEC31>Grammar Rules for <CODE>mfcalc</CODE></A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_5.html#SEC32" 
      name=SEC32>The <CODE>mfcalc</CODE> Symbol Table</A> </LI></UL>
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_5.html#SEC33" 
    name=SEC33>Exercises</A> </LI></UL>
  <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC34" 
  name=SEC34>Bison Grammar Files</A> 
  <UL>
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC35" 
    name=SEC35>Outline of a Bison Grammar</A> 
    <UL>
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC36" 
      name=SEC36>The C Declarations Section</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC37" 
      name=SEC37>The Bison Declarations Section</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC38" 
      name=SEC38>The Grammar Rules Section</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC39" 
      name=SEC39>The Additional C Code Section</A> </LI></UL>
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC40" 
    name=SEC40>Symbols, Terminal and Nonterminal</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC41" 
    name=SEC41>Syntax of Grammar Rules</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC42" 
    name=SEC42>Recursive Rules</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC43" 
    name=SEC43>Defining Language Semantics</A> 
    <UL>
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC44" 
      name=SEC44>Data Types of Semantic Values</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC45" 
      name=SEC45>More Than One Value Type</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC46" 
      name=SEC46>Actions</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC47" 
      name=SEC47>Data Types of Values in Actions</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC48" 
      name=SEC48>Actions in Mid-Rule</A> </LI></UL>
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC49" 
    name=SEC49>Bison Declarations</A> 
    <UL>
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC50" 
      name=SEC50>Token Type Names</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC51" 
      name=SEC51>Operator Precedence</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC52" 
      name=SEC52>The Collection of Value Types</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC53" 
      name=SEC53>Nonterminal Symbols</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC54" 
      name=SEC54>Suppressing Conflict Warnings</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC55" 
      name=SEC55>The Start-Symbol</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC56" 
      name=SEC56>A Pure (Reentrant) Parser</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC57" 
      name=SEC57>Bison Declaration Summary</A> </LI></UL>
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_6.html#SEC58" 
    name=SEC58>Multiple Parsers in the Same Program</A> </LI></UL>
  <LI><A href="http://dinosaur.compilertools.net/bison/bison_7.html#SEC59" 
  name=SEC59>Parser C-Language Interface</A> 
  <UL>
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_7.html#SEC60" 
    name=SEC60>The Parser Function <CODE>yyparse</CODE></A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_7.html#SEC61" 
    name=SEC61>The Lexical Analyzer Function <CODE>yylex</CODE></A> 
    <UL>
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_7.html#SEC62" 
      name=SEC62>Calling Convention for <CODE>yylex</CODE></A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_7.html#SEC63" 
      name=SEC63>Semantic Values of Tokens</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_7.html#SEC64" 
      name=SEC64>Textual Positions of Tokens</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_7.html#SEC65" 
      name=SEC65>Calling Conventions for Pure Parsers</A> </LI></UL>
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_7.html#SEC66" 
    name=SEC66>The Error Reporting Function <CODE>yyerror</CODE></A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_7.html#SEC67" 
    name=SEC67>Special Features for Use in Actions</A> </LI></UL>
  <LI><A href="http://dinosaur.compilertools.net/bison/bison_8.html#SEC68" 
  name=SEC68>The Bison Parser Algorithm</A> 
  <UL>
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_8.html#SEC69" 
    name=SEC69>Look-Ahead Tokens</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_8.html#SEC70" 
    name=SEC70>Shift/Reduce Conflicts</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_8.html#SEC71" 
    name=SEC71>Operator Precedence</A> 
    <UL>
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_8.html#SEC72" 
      name=SEC72>When Precedence is Needed</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_8.html#SEC73" 
      name=SEC73>Specifying Operator Precedence</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_8.html#SEC74" 
      name=SEC74>Precedence Examples</A> 
      <LI><A href="http://dinosaur.compilertools.net/bison/bison_8.html#SEC75" 
      name=SEC75>How Precedence Works</A> </LI></UL>
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_8.html#SEC76" 
    name=SEC76>Context-Dependent Precedence</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_8.html#SEC77" 
    name=SEC77>Parser States</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_8.html#SEC78" 
    name=SEC78>Reduce/Reduce Conflicts</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_8.html#SEC79" 
    name=SEC79>Mysterious Reduce/Reduce Conflicts</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_8.html#SEC80" 
    name=SEC80>Stack Overflow, and How to Avoid It</A> </LI></UL>
  <LI><A href="http://dinosaur.compilertools.net/bison/bison_9.html#SEC81" 
  name=SEC81>Error Recovery</A> 
  <LI><A href="http://dinosaur.compilertools.net/bison/bison_10.html#SEC82" 
  name=SEC82>Handling Context Dependencies</A> 
  <UL>
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_10.html#SEC83" 
    name=SEC83>Semantic Info in Token Types</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_10.html#SEC84" 
    name=SEC84>Lexical Tie-ins</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_10.html#SEC85" 
    name=SEC85>Lexical Tie-ins and Error Recovery</A> </LI></UL>
  <LI><A href="http://dinosaur.compilertools.net/bison/bison_11.html#SEC86" 
  name=SEC86>Debugging Your Parser</A> 
  <LI><A href="http://dinosaur.compilertools.net/bison/bison_12.html#SEC87" 
  name=SEC87>Invoking Bison</A> 
  <UL>
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_12.html#SEC88" 
    name=SEC88>Bison Options</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_12.html#SEC89" 
    name=SEC89>Option Cross Key</A> 
    <LI><A href="http://dinosaur.compilertools.net/bison/bison_12.html#SEC90" 
    name=SEC90>Invoking Bison under VMS</A> </LI></UL>
  <LI><A href="http://dinosaur.compilertools.net/bison/bison_13.html#SEC91" 
  name=SEC91>Bison Symbols</A> 
  <LI><A href="http://dinosaur.compilertools.net/bison/bison_14.html#SEC92" 
  name=SEC92>Glossary</A> 
  <LI><A href="http://dinosaur.compilertools.net/bison/bison_15.html#SEC93" 
  name=SEC93>Index</A> </LI></UL></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -