File: specs.cljc

package info (click to toggle)
instaparse-clojure 1.4.7-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 536 kB
  • sloc: xml: 124; makefile: 25
file content (52 lines) | stat: -rw-r--r-- 789 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
(ns instaparse.specs)

(def cfg1 "S = 'a'")
(def cfg2 
  "S = X
   X = Y
   Y = Z")
(def cfg3
  "S = X | Y
   Y = A Z
   Z = 'a'")
(def cfg4
  "S := A B | C
   C := (A | B) C")
(def cfg5
  "S=A?")
(def cfg6
  "S =(A | B)?")
(def cfg7
  "S = A, B?, (C C)*, D+, E")
(def cfg8
  "<S> = <A B?> (C | D)")
(def cfg9
  "S = A, &B")
(def cfg10
  "S = &B A")
(def cfg11
  "S = &B+ A")
(def cfg12
  "S = !B A")
(def cfg13
  "S = !&B A")
(def cfg15
  "S = 'a' S | Epsilon;
   C = 'b'.
   D = A")
(def cfg16
  "S = 'a' / 'b'")
(def cfg17
  "S = 'a' / 'b' | 'c'")
(def cfg18
  "S = 'a' | 'b' / 'c'")
(def cfg19
  "S = A ('a' | 'b')+
   A = !B
   B = 'a' !'b'")
(def cfg20
  "(* A comment about this grammar 
   *split* (across) lines *)
   (* And some (* nested *) comments *)
   S = (A*)
   A = 'a'")