-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathObject Pascal DFM Grammar.bnf
52 lines (33 loc) · 1.38 KB
/
Object Pascal DFM Grammar.bnf
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
/**
This files contains the grammar to describe Object Pascal DFM Files.
@Version 1.0
@Author David Hoyle
@Date 06 Aug 2016
@usesemicolon
**/
<Goal> ::= <Object>;
<Object> ::= ( 'OBJECT' | 'INLINE' ) <Identifier> ':' <Type> [ <Index> ]
( <Property> | <Object> )*
'END';
<Property> ::= <QualifiedIdent> '=' <PropertyValue>;
<PropertyValue> ::= <Identifier> |
<StringLiteral> |
<Number> |
<Set> |
<ItemList> |
<BinaryData> |
<PositionData>;
<ItemList> ::= '<' <Item>* '>';
<Item> ::= 'ITEM'
( <Property> )*
'END';
<Type> ::= <Identifier>;
<Set> ::= '[' [ <IdentList> ] ']';
<PositionData> ::= '(' <Number>* ')';
<IdentList> ::= <Identifier> [ ( ',' <Identifier> )* ];
<QualifiedIdent> ::= <Identifier> [ ( '.' <Identifier> )* ];
<Index> ::= '[' <Number> ']';
<Identifier> ::= ? Valid object pascal identifier. ?;
<StringLiteral> ::= ? Text startingh and ending with single doubles. ?;
<Number> ::= [ '-' ] ? Pascal decimal or hexidecimal number. ?;
<BinaryData> ::= ? Pascal brace comment { ... } ?;