Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert happy docbook documentation to rst #226

Merged
merged 17 commits into from
Nov 6, 2022
Merged

Convert happy docbook documentation to rst #226

merged 17 commits into from
Nov 6, 2022

Conversation

andreasabel
Copy link
Member

@andreasabel andreasabel commented Feb 27, 2022

@Ericson2314, since this was all very fresh in my mind, I did the first steps of converting the happy docs to rst. But since you said you want to take care of this and I do not want to get in the way, I leave it now. You can add to this PR.

TODO:

  • go through code blocks and set language for correct syntax highlighting
  • read through docs for obvious things to fix
  • check that links are up-to-date (github repo)
  • remove docbook/

As admin:

  • set up webhook

Once this is merged into master:

@ghost
Copy link

ghost commented Mar 1, 2022

from the Introduction section, second paragraph, this is not correct

yacc Happy is flexible:

from the Introduction section, Reporting Bugs subsection, first paragraph, this is not correct

bugs, reporting Any bugs

from the Invoking Happy section, this is not correct

literate grammar files The flags accepted

from the Info Files section, first paragraph, this is not correct

info files Happy info files,

@Ericson2314
Copy link
Collaborator

@askeblad are these errors in the conversation or original?

@ghost
Copy link

ghost commented Mar 1, 2022

there may be more

happy.xml

    <indexterm><primary>yacc</primary></indexterm>

    <para> <application>Happy</application> is flexible:

introduction.rst

yacc
Happy is flexible:

@ghost
Copy link

ghost commented Mar 4, 2022

@Ericson2314

these errors

no entries in the genindex.html page (from the conversion) were created

using.rst

yacc
Note for ``yacc`` users:

two entries for yacc in the ix01.html page (generated by DocBook) are created

@ghost
Copy link

ghost commented Mar 7, 2022

GH Wiki rendering.

Links of course will not work in this rendering.


Happy

Simon Marlow
Andy Gill

Copyright © 1997-2009 Simon Marlow

Abstract

This document describes Happy, the Haskell Parser Generator, version 1.18.

Table of Contents

Introduction
Using Happy
Generalized LR Parsing
Attribute Grammars
Invoking Happy
Syntax of Grammar Files
Info Files
Tips
Index

Introduction

Compatibility

Happy is a parser generator system for Haskell, similar to the tool yacc for C. Like yacc, it takes a file containing an annotated BNF specification of a grammar and produces a Haskell module containing a parser for the grammar.

Happy is flexible: you can have several Happy parsers in the same program, and each parser may have multiple entry points. Happy can work in conjunction with a lexical analyser supplied by the user (either hand-written or generated by another program), or it can parse a stream of characters directly (but this isn't practical in most cases). In a future version we hope to include a lexical analyser generator with Happy as a single package.

Parsers generated by Happy are fast; generally faster than an equivalent parser written using parsing combinators or similar tools. Furthermore, any future improvements made to Happy will benefit an existing grammar, without need for a rewrite.

@ghost
Copy link

ghost commented Mar 10, 2022

Cabal's sphinx setup is quite sophisticated, and they have their own style sheets.

@andreasabel quoted above from a PR comment in another Haskell Organization repository

FWIW, if the Sphinx rewrite of the documentation is factually pursued, rather than opting for the simpler Wiki format, as would appear in the previous comment, circa May 2014 J. Andersson's Cask implemented a rewrite of its documentation with Sphinx.

Whether the Cask Sphinx setup is less sophisticated than Cabal's Sphinx setup I would be uninformed on.

NB: Scrolling down the Home page appears a link to a functioning Index page.

@ghost
Copy link

ghost commented Mar 11, 2022

move from doc book (GHC's GitLab instance Wiki page)

merits and appropriateness for the GHC User Guide of DocBook alternatives addressed

Markdown

"While ubiquitous, its syntax isn't nearly expressive enough to accommodate the users guide."


This bids the question at to whether "expressiveness" is a priority for individual Hackage packages' documentation.

NB: Edit mode for GH Wiki pages includes among others AsciiDoc, Markdown (presumed default), and reStructeredText.

@ghost
Copy link

ghost commented Mar 25, 2022

Hspec User's Manual code adapted.
alex-guide

@ghost
Copy link

ghost commented Apr 8, 2022

#226 (comment)

FWIW, the c2hs repo User Guide.

@ghost
Copy link

ghost commented Apr 17, 2022

on a side note daVinci graph visualization tool is rather old

grep -nr davinci happy

grep -nr daVinci happy

@Ericson2314
Copy link
Collaborator

Once source of conversion lossiness is indexterm. Anyone know how that should be done in reStructured Text?

@Ericson2314
Copy link
Collaborator

@Ericson2314
Copy link
Collaborator

@andreasabel Sorry for the immense delay. I think this is finally ready!

@Ericson2314 Ericson2314 merged commit 72cbe6e into master Nov 6, 2022
@Ericson2314 Ericson2314 deleted the sphinx branch November 6, 2022 19:58
Ericson2314 added a commit that referenced this pull request Nov 6, 2022
Sorry I missed this in the PR #226.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants