Skip to content

Commit

Permalink
Merge pull request #4 from camchenry/add-eleventy-site
Browse files Browse the repository at this point in the history
Merge to main
  • Loading branch information
camchenry authored Jul 7, 2022
2 parents 7607b3f + 07b211d commit 1103dbb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
name: Deploy to GitHub Pages

on: workflow_dispatch
on:
workflow_dispatch:
inputs:
branch:
type: choice
description: Which branch to deploy to peggyjs.org
required: true
options:
- stable

jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.branch }}
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
Expand Down
4 changes: 1 addition & 3 deletions docs/.eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ module.exports = function (eleventyConfig) {
return {
// Control which files Eleventy will process
// e.g.: *.md, *.njk, *.html, *.liquid
templateFormats: ["html", "njk"],
// Process .html files with nunjucks
htmlTemplateEngine: "njk",
templateFormats: ["html", "njk", "liquid", "md"],
// Path prefix for URLs
pathPrefix: "/",
// Config for input/output/data/etc. directories
Expand Down
18 changes: 9 additions & 9 deletions docs/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ <h3 id="generating-a-parser-command-line">Command Line</h3>
<pre><code class="language-console">$ peggy arithmetics.pegjs</code></pre>

<p>This writes parser source code into a file with the same name as the grammar
file but with &ldquo;.js&rdquo; extension. You can also specify the output file
file but with .js extension. You can also specify the output file
explicitly:</p>

<pre><code class="language-console">$ peggy -o arithmetics-parser.js arithmetics.pegjs</code></pre>
Expand Down Expand Up @@ -562,16 +562,16 @@ <h2 id="grammar-syntax-and-semantics">Grammar Syntax and Semantics</h2>
first rule, which is also called the <em>start rule</em>.</p>

<p>A rule name must be a JavaScript identifier. It is followed by an equality
sign (&ldquo;=&rdquo;) and a parsing expression. If the rule has a human-readable name, it
sign (“=”) and a parsing expression. If the rule has a human-readable name, it
is written as a JavaScript string between the rule name and the equality sign.
Rules need to be separated only by whitespace (their beginning is easily
recognizable), but a semicolon (&ldquo;;&rdquo;) after the parsing expression is
recognizable), but a semicolon (“;”) after the parsing expression is
allowed.</p>

<p>The first rule can be preceded by a <em>global initializer</em> and/or a
<em>per-parse initializer</em>, in that order. Both are pieces of JavaScript
code in double curly braces (&ldquo;{{'{{'}}&rdquo; and &ldquo;}}&rdquo;) and single curly braces (&ldquo;{&rdquo; and
&ldquo;}&rdquo;) respectively. All variables and functions defined in both
code in double curly braces ({{'{{'}} and “}}”) and single curly braces (“{” and
“}”) respectively. All variables and functions defined in both
<em>initializers</em> are accessible in rule actions and semantic predicates.
Curly braces in both <em>initializers</em> code must be balanced.</p>
<p>The <em>global initializer</em> is executed once and only once, when the
Expand Down Expand Up @@ -642,7 +642,7 @@ <h2 id="grammar-syntax-and-semantics">Grammar Syntax and Semantics</h2>
match result when parsing is successful.</p>

<p>One special case of parser expression is a <em>parser action</em> &mdash; a
piece of JavaScript code inside curly braces (&ldquo;{&rdquo; and &ldquo;}&rdquo;) that takes match
piece of JavaScript code inside curly braces (“{” and “}”) that takes match
results of some of the the preceding expressions and returns a JavaScript value.
This value is considered match result of the preceding expression (in other
words, the parser action is a match result transformer).</p>
Expand Down Expand Up @@ -721,9 +721,9 @@ <h3 id="grammar-syntax-and-semantics-parsing-expression-types">Parsing Expressio
<p>Match one character from a set and return it as a string. The characters
in the list can be escaped in exactly the same way as in JavaScript string.
The list of characters can also contain ranges (e.g. <code>[a-z]</code>
means &ldquo;all lowercase letters&rdquo;). Preceding the characters with <code>^</code>
inverts the matched set (e.g. <code>[^a-z]</code> means &ldquo;all character but
lowercase letters&rdquo;). Appending <code>i</code> right after the literal makes
means all lowercase letters). Preceding the characters with <code>^</code>
inverts the matched set (e.g. <code>[^a-z]</code> means all character but
lowercase letters). Appending <code>i</code> right after the literal makes
the match case-insensitive.</p>

<div class="example">
Expand Down

0 comments on commit 1103dbb

Please sign in to comment.