Skip to content

Commit 8e95a85

Browse files
committed
update tvkl.gram
1 parent 987e871 commit 8e95a85

1 file changed

Lines changed: 29 additions & 6 deletions

File tree

tvkl/grammar/tvkl.gram

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,29 @@
1-
line := ":" "|" ( ( "'" name "'" | name ) attrDecl? "|")* "-"
2-
attrDecl := "[" attr+ "]"
3-
attr := length
4-
length := number
5-
number := "$" NUMBER
6-
name := *
1+
# =============================================================================
2+
# TVKL GRAMMAR SPECIFICATION
3+
#
4+
# This document defines the formal EBNF for the Terminal Virtual Keyboard Layout.
5+
#
6+
# SYMBOLS:
7+
# ::= Production
8+
# | Alternation (OR)
9+
# [] Optional (0 or 1)
10+
# {}* Zero or more repetitions
11+
# {}+ One or more repetitions
12+
# "" Literal string
13+
# =============================================================================
14+
15+
line ::= ":" "|" { item "|" }* "-"
16+
17+
item ::= ( quoted_name | name ) [ attr_decl ]
18+
19+
quoted_name ::= ( "'" name "'" ) | ( '"' name '"' )
20+
21+
attr_decl ::= "[" { attr }+ "]"
22+
23+
attr ::= length
24+
25+
length ::= "$" number
26+
27+
name ::= { ? any character ? }+ ;
28+
29+
number ::= [0-9]+ [ "." [0-9]+ ]

0 commit comments

Comments
 (0)