-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace participle with PEG based parser
- Loading branch information
1 parent
52756dd
commit cba666e
Showing
6 changed files
with
1,572 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package grammar | ||
|
||
type Node interface{} | ||
|
||
type Telegram struct { | ||
Header *Header | ||
Data []*Object | ||
Footer *Footer | ||
} | ||
|
||
type Header struct { | ||
Value string | ||
} | ||
|
||
type Footer struct { | ||
Value string | ||
} | ||
|
||
// Object is a COSEM object in the Telegram represented by the | ||
// OBIS (Object Identification System) and one or more attributes. | ||
type Object struct { | ||
Id *OBIS | ||
Value interface{} | ||
} | ||
|
||
// ... | ||
type OBIS struct { | ||
A int | ||
B int | ||
C int | ||
D int | ||
E int | ||
} |
Oops, something went wrong.