Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 8de1f55ea6a1a64d0f3f3ea116288458 > files > 86

happy-1.17-3mdv2009.0.i586.rpm

<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Happy User Guide</title><link rel="stylesheet" href="fptools.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><meta name="description" content="This document describes Happy, the Haskell Parser Generator, version 1.17."><link rel="start" href="index.html" title="Happy User Guide"><link rel="next" href="happy-introduction.html" title="Chapter 1. Introduction"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Happy User Guide</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="happy-introduction.html">Next</a></td></tr></table><hr></div><div class="book" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="happy"></a>Happy User Guide</h1></div><div><div class="author"><h3 class="author"><span class="firstname">Simon</span> <span class="surname">Marlow</span></h3></div></div><div><div class="author"><h3 class="author"><span class="firstname">Andy</span> <span class="surname">Gill</span></h3></div></div><div><p class="copyright">Copyright © 1997-2001 Simon Marlow</p></div><div><div class="abstract"><p class="title"><b>Abstract</b></p><p>This document describes Happy, the Haskell Parser
	Generator, version 1.17.</p></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="happy-introduction.html">1. Introduction</a></span></dt><dd><dl><dt><span class="sect1"><a href="happy-introduction.html#sec-compatibility">1.1. Compatibility</a></span></dt><dt><span class="sect1"><a href="sec-reporting-bugs.html">1.2. Reporting Bugs</a></span></dt><dt><span class="sect1"><a href="sec-license.html">1.3. License</a></span></dt><dt><span class="sect1"><a href="sec-obtaining.html">1.4. Obtaining <span class="application">Happy</span></a></span></dt></dl></dd><dt><span class="chapter"><a href="sec-using.html">2. Using <span class="application">Happy</span></a></span></dt><dd><dl><dt><span class="sect1"><a href="sec-using.html#sec-other-datatypes">2.1. Returning other datatypes</a></span></dt><dt><span class="sect1"><a href="sec-sequences.html">2.2. Parsing sequences</a></span></dt><dd><dl><dt><span class="sect2"><a href="sec-sequences.html#sec-separators">2.2.1. Sequences with separators</a></span></dt></dl></dd><dt><span class="sect1"><a href="sec-Precedences.html">2.3. Using Precedences</a></span></dt><dd><dl><dt><span class="sect2"><a href="sec-Precedences.html#how-precedence-works">2.3.1. How precedence works</a></span></dt><dt><span class="sect2"><a href="sec-Precedences.html#context-precedence">2.3.2. Context-dependent Precedence</a></span></dt></dl></dd><dt><span class="sect1"><a href="sec-type-signatures.html">2.4. Type Signatures</a></span></dt><dt><span class="sect1"><a href="sec-monads.html">2.5. Monadic Parsers</a></span></dt><dd><dl><dt><span class="sect2"><a href="sec-monads.html#sec-exception">2.5.1. Handling Parse Errors</a></span></dt><dt><span class="sect2"><a href="sec-monads.html#sec-lexers">2.5.2. Threaded Lexers</a></span></dt><dd><dl><dt><span class="sect3"><a href="sec-monads.html#id2546160">2.5.2.1. Monadic productions with %lexer</a></span></dt></dl></dd><dt><span class="sect2"><a href="sec-monads.html#sec-line-numbers">2.5.3. Line Numbers</a></span></dt><dt><span class="sect2"><a href="sec-monads.html#sec-monad-summary">2.5.4. Summary</a></span></dt></dl></dd><dt><span class="sect1"><a href="sec-error.html">2.6. The Error Token</a></span></dt><dt><span class="sect1"><a href="sec-multiple-parsers.html">2.7. Generating Multiple Parsers From a Single Grammar</a></span></dt></dl></dd><dt><span class="chapter"><a href="sec-glr.html">3. Generalized LR Parsing</a></span></dt><dd><dl><dt><span class="sect1"><a href="sec-glr.html#sec-glr-intro">3.1. Introduction</a></span></dt><dt><span class="sect1"><a href="sec-glr-using.html">3.2. Basic use of a Happy-generated GLR parser</a></span></dt><dd><dl><dt><span class="sect2"><a href="sec-glr-using.html#sec-glr-using-intro">3.2.1. Overview</a></span></dt><dt><span class="sect2"><a href="sec-glr-using.html#sec-glr-using-main">3.2.2. The main function</a></span></dt><dt><span class="sect2"><a href="sec-glr-using.html#sec-glr-using-input">3.2.3. The input</a></span></dt><dt><span class="sect2"><a href="sec-glr-using.html#sec-glr-using-output">3.2.4. The Parse Result</a></span></dt><dt><span class="sect2"><a href="sec-glr-using.html#sec-glr-using-compiling">3.2.5. Compiling the parser</a></span></dt></dl></dd><dt><span class="sect1"><a href="sec-glr-semantics.html">3.3. Including semantic results</a></span></dt><dd><dl><dt><span class="sect2"><a href="sec-glr-semantics.html#sec-glr-semantics-intro">3.3.1. Forms of semantics</a></span></dt><dt><span class="sect2"><a href="sec-glr-semantics.html#sec-glr-semantics-tree">3.3.2. Tree decoding</a></span></dt><dt><span class="sect2"><a href="sec-glr-semantics.html#sec-glr-semantics-label">3.3.3. Label decoding</a></span></dt><dt><span class="sect2"><a href="sec-glr-semantics.html#sec-glr-semantics-tree-monad">3.3.4. Monadic tree decoding</a></span></dt></dl></dd><dt><span class="sect1"><a href="sec-glr-misc.html">3.4. Further information</a></span></dt><dd><dl><dt><span class="sect2"><a href="sec-glr-misc.html#sec-glr-misc-examples">3.4.1. The GLR examples</a></span></dt><dt><span class="sect2"><a href="sec-glr-misc.html#sec-glr-misc-graphs">3.4.2. Viewing forests as graphs</a></span></dt><dt><span class="sect2"><a href="sec-glr-misc.html#sec-glr-misc-applications">3.4.3. Some Applications of GLR parsing</a></span></dt><dt><span class="sect2"><a href="sec-glr-misc.html#sec-glr-misc-workings">3.4.4. Technical details</a></span></dt><dt><span class="sect2"><a href="sec-glr-misc.html#sec-glr-misc-filter">3.4.5. The <code class="option">--filter</code> option</a></span></dt><dt><span class="sect2"><a href="sec-glr-misc.html#sec-glr-misc-limitations">3.4.6. Limitations and future work</a></span></dt><dt><span class="sect2"><a href="sec-glr-misc.html#sec-glr-misc-acknowledgements">3.4.7. Thanks and acknowledgements</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="sec-AttributeGrammar.html">4. Attribute Grammars</a></span></dt><dd><dl><dt><span class="sect1"><a href="sec-AttributeGrammar.html#sec-introAttributeGrammars">4.1. Introduction</a></span></dt><dt><span class="sect1"><a href="sec-AtrributeGrammarsInHappy.html">4.2. Attribute Grammars in Happy</a></span></dt><dd><dl><dt><span class="sect2"><a href="sec-AtrributeGrammarsInHappy.html#sec-declaringAttributes">4.2.1. Declaring Attributes</a></span></dt><dt><span class="sect2"><a href="sec-AtrributeGrammarsInHappy.html#sec-semanticRules">4.2.2. Semantic Rules</a></span></dt></dl></dd><dt><span class="sect1"><a href="sec-AttrGrammarLimits.html">4.3. Limits of Happy Attribute Grammars</a></span></dt><dt><span class="sect1"><a href="sec-AttributeGrammarExample.html">4.4. Example Attribute Grammars</a></span></dt></dl></dd><dt><span class="chapter"><a href="sec-invoking.html">5. Invoking <span class="application">Happy</span></a></span></dt><dt><span class="chapter"><a href="sec-grammar-files.html">6. Syntax of Grammar Files</a></span></dt><dd><dl><dt><span class="sect1"><a href="sec-grammar-files.html#sec-lexical-rules">6.1. Lexical Rules</a></span></dt><dt><span class="sect1"><a href="sec-module-header.html">6.2. Module Header</a></span></dt><dt><span class="sect1"><a href="sec-directives.html">6.3. Directives</a></span></dt><dd><dl><dt><span class="sect2"><a href="sec-directives.html#sec-token-type">6.3.1. Token Type</a></span></dt><dt><span class="sect2"><a href="sec-directives.html#sec-tokens">6.3.2. Tokens</a></span></dt><dt><span class="sect2"><a href="sec-directives.html#sec-parser-name">6.3.3. Parser Name</a></span></dt><dt><span class="sect2"><a href="sec-directives.html#sec-partial-parsers">6.3.4. Partial Parsers</a></span></dt><dt><span class="sect2"><a href="sec-directives.html#sec-monad-decl">6.3.5. Monad Directive</a></span></dt><dt><span class="sect2"><a href="sec-directives.html#sec-lexer-decl">6.3.6. Lexical Analyser</a></span></dt><dt><span class="sect2"><a href="sec-directives.html#sec-prec-decls">6.3.7. Precedence declarations</a></span></dt><dt><span class="sect2"><a href="sec-directives.html#sec-expect">6.3.8. Expect declarations</a></span></dt><dt><span class="sect2"><a href="sec-directives.html#sec-error-directive">6.3.9. Error declaration</a></span></dt><dt><span class="sect2"><a href="sec-directives.html#sec-attributes">6.3.10. Attribute Type Declaration</a></span></dt><dt><span class="sect2"><a href="sec-directives.html#sec-attribute">6.3.11. Attribute declaration</a></span></dt></dl></dd><dt><span class="sect1"><a href="sec-grammar.html">6.4. Grammar</a></span></dt><dt><span class="sect1"><a href="sec-module-trailer.html">6.5. Module Trailer</a></span></dt></dl></dd><dt><span class="chapter"><a href="sec-info-files.html">7. Info Files</a></span></dt><dt><span class="chapter"><a href="sec-tips.html">8. Tips</a></span></dt><dd><dl><dt><span class="sect1"><a href="sec-tips.html#sec-performance-tips">8.1. Performance Tips</a></span></dt><dt><span class="sect1"><a href="sec-compilation-time.html">8.2. Compilation-Time Tips</a></span></dt><dt><span class="sect1"><a href="sec-finding-errors.html">8.3. Finding Type Errors</a></span></dt><dt><span class="sect1"><a href="sec-conflict-tips.html">8.4. Conflict Tips</a></span></dt><dd><dl><dt><span class="sect2"><a href="sec-conflict-tips.html#sec-lalr">8.4.1. LALR(1) parsers</a></span></dt></dl></dd><dt><span class="sect1"><a href="sec-happy-ghci.html">8.5. Using Happy with <span class="application">GHCi</span></a></span></dt></dl></dd><dt><span class="index"><a href="ix01.html">Index</a></span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="happy-introduction.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> Chapter 1. Introduction</td></tr></table></div></body></html>