branch: externals/parser-generator
commit e070522b230b7e88b91d1180ea1d51dabc1514c5
Author: Christian Johansson <[email protected]>
Commit: Christian Johansson <[email protected]>
Fixed broken link in documentation
---
docs/Syntax-Analysis/LRk-Infix-Calculator.md | 3 ++-
docs/Syntax-Analysis/LRk.md | 10 +++++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/docs/Syntax-Analysis/LRk-Infix-Calculator.md
b/docs/Syntax-Analysis/LRk-Infix-Calculator.md
index e0ef3e0..bc43aef 100644
--- a/docs/Syntax-Analysis/LRk-Infix-Calculator.md
+++ b/docs/Syntax-Analysis/LRk-Infix-Calculator.md
@@ -116,5 +116,6 @@ Example reproduced from GNU Bison manual [Infix Notation
Calculator](https://www
(kill-buffer))
```
-[Back to LR(k) Parser](../LRk.md)
+[Back to LR(k) Parser](LRk.md)
+
[Back to syntax analysis](../Syntax-Analysis.md)
diff --git a/docs/Syntax-Analysis/LRk.md b/docs/Syntax-Analysis/LRk.md
index 484012e..388695f 100644
--- a/docs/Syntax-Analysis/LRk.md
+++ b/docs/Syntax-Analysis/LRk.md
@@ -28,6 +28,7 @@ You can set global symbol operator precedence and also
context-sensitive precede
``` emacs-lisp
(require 'parser-generator-lr)
+
(setq
parser-generator--global-attributes
'(%left %precedence %right))
@@ -82,6 +83,7 @@ Calculate the set of LR items valid for any viable prefix S.
```
``` emacs-lisp
+(require 'parser-generator-lr)
(require 'ert)
(parser-set-grammar '((Sp S) (a b) ((Sp S) (S (S a S b)) (S e)) Sp))
@@ -134,6 +136,9 @@ Perform a right-parse of input-stream.
Each production RHS can optionally contain a lambda-expression that will be
called if specified when a reduction is made, example:
```emacs-lisp
+(require 'parser-generator-lr)
+(require 'ert)
+
(let ((buffer (generate-new-buffer "*a*")))
(switch-to-buffer buffer)
(insert "if (a) { b; }")
@@ -229,6 +234,9 @@ Each production RHS can optionally contain a
lambda-expression that will be call
The export should be executed after a parser has been generated, example:
```emacs-lisp
+(require 'parser-generator-lr)
+(require 'ert)
+
;; Generate parser
(parser-generator-set-grammar
'((Sp S) (a b) ((Sp S) (S (S a S b)) (S e)) Sp))
@@ -278,6 +286,6 @@ The export should be executed after a parser has been
generated, example:
(message "Passed parse for exported parser")))
```
-[Example LR(k) Infix Calculator](../LRk-Infix-Calculator.md)
+[Example LR(k) Infix Calculator](LRk-Infix-Calculator.md)
[Back to syntax analysis](../Syntax-Analysis.md)