From 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 14 Aug 2025 22:58:58 -0500 Subject: removing all downloaded devdocs files --- devdocs/elisp/smie-grammar.html | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 devdocs/elisp/smie-grammar.html (limited to 'devdocs/elisp/smie-grammar.html') diff --git a/devdocs/elisp/smie-grammar.html b/devdocs/elisp/smie-grammar.html deleted file mode 100644 index f09ae7822..000000000 --- a/devdocs/elisp/smie-grammar.html +++ /dev/null @@ -1,34 +0,0 @@ -

Defining the Grammar of a Language

The usual way to define the SMIE grammar of a language is by defining a new global variable that holds the precedence table by giving a set of BNF rules. For example, the grammar definition for a small Pascal-like language could look like:

-
(require 'smie)
-(defvar sample-smie-grammar
-  (smie-prec2->grammar
-   (smie-bnf->prec2
-
-
    '((id)
-      (inst ("begin" insts "end")
-            ("if" exp "then" inst "else" inst)
-            (id ":=" exp)
-            (exp))
-      (insts (insts ";" insts) (inst))
-      (exp (exp "+" exp)
-           (exp "*" exp)
-           ("(" exps ")"))
-      (exps (exps "," exps) (exp)))
-
-
    '((assoc ";"))
-    '((assoc ","))
-    '((assoc "+") (assoc "*")))))
-
-

A few things to note:

-

- Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
- https://www.gnu.org/software/emacs/manual/html_node/elisp/SMIE-Grammar.html -

-
-- cgit v1.2.3