-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial implementation of grammar.lark
- Loading branch information
1 parent
225780b
commit 587d643
Showing
1 changed file
with
36 additions
and
0 deletions.
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,36 @@ | ||
start: body footer | ||
|
||
body: params data | ||
params: detailed_params | simple_params | ||
detailed_params: INT INT INT INT [INT] info | ||
simple_params: INT INT INT INT | ||
info: "5002" INFO_BODY "6002" | ||
data: (info | "5000" | INT)+ | ||
|
||
footer: "5003" footer_line+ "6003" | ||
footer_line: rate_line | stat_line | nr_line | log_line | ||
|
||
rate_line: modality rate | ||
rate: rate_prefix INT INT | ||
rate_prefix: "Freq Per:" | ||
|
||
stat_line: modality stat | ||
stat: stat_prefix INT INT INT INT | ||
stat_prefix: "Min Max Avg StdDiff:" | ||
|
||
nr_line: nr_prefix INT INT INT INT | ||
nr_prefix: "NrTrig NrMP NrArr AcqWin:" | ||
|
||
log_line: log_prefix INT | ||
log_prefix: "LogStartMDHTime:" | ||
| "LogStopMDHTime:" | ||
| "LogStartMPCUTime:" | ||
| "LogStopMPCUTime:" | ||
|
||
modality: "ECG" | "PULS" | "RESP" | "EXT" | "EXT2" | ||
|
||
INFO_BODY: /[^\s]+.+?(?=\s*?6002)/ | ||
|
||
%import common.INT | ||
%import common.WS | ||
%ignore WS |