Skip to content

Commit

Permalink
Lint doc with mdbook-linkcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
l4l committed Jan 29, 2022
1 parent a02ca01 commit 611febc
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 12 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Test book

on: [push, pull_request]

jobs:
lint-book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'

- run: >
curl -L https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/latest/download/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip -o mdbook-linkcheck.zip &&
unzip -n "$_" mdbook-linkcheck &&
chmod +x "$_"
working-directory: ./doc
- run: env PATH=$PWD:$PATH mdbook build
working-directory: ./doc
2 changes: 2 additions & 0 deletions doc/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ site-url = "/lalrpop/"

[output.html.playpen]
editable = true

[output.linkcheck]
6 changes: 3 additions & 3 deletions doc/src/lexer_tutorial/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

This part is about controling the inner workings of LALRPOP's built-in lexer generator and using your own hand written parser.

- [LALRPOP's lexer generator](lexer_tutorial/001_lexer_gen.html)
- [Writing a custom lexer](lexer_tutorial/002_writing_custom_lexer.html)
- [Using tokens with references](lexer_tutorial/003_token_references.html)
- [LALRPOP's lexer generator](001_lexer_gen.md)
- [Writing a custom lexer](002_writing_custom_lexer.md)
- [Using tokens with references](003_token_references.md)
18 changes: 9 additions & 9 deletions doc/src/tutorial/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ This is a tutorial for how to write a complete parser for a simple calculator us
If you are unfamiliar with what a parser generator is, you should read [Crash course on parsers]
first.

- [Adding LALRPOP to your project](001_adding_lalrpop.html)
- [Parsing parenthesized numbers](002_paren_numbers.html)
- [Type inference](003_type_inference.html)
- [Handling full expressions](004_full_expressions.html)
- [Building ASTs](005_building_asts.html)
- [Macros](006_macros.html)
- [Fallible actions](007_fallible_actions.html)
- [Error recovery](008_error_recovery.html)
- [Passing state parameter](009_state_parameter.html)
- [Adding LALRPOP to your project](001_adding_lalrpop.md)
- [Parsing parenthesized numbers](002_paren_numbers.md)
- [Type inference](003_type_inference.md)
- [Handling full expressions](004_full_expressions.md)
- [Building ASTs](005_building_asts.md)
- [Macros](006_macros.md)
- [Fallible actions](007_fallible_actions.md)
- [Error recovery](008_error_recovery.md)
- [Passing state parameter](009_state_parameter.md)

This tutorial is still incomplete. Here are some topics that I aim to
cover when I get time to write about them:
Expand Down

0 comments on commit 611febc

Please sign in to comment.