diff options
Diffstat (limited to 'src/grammar.json')
| -rw-r--r-- | src/grammar.json | 133 |
1 files changed, 132 insertions, 1 deletions
diff --git a/src/grammar.json b/src/grammar.json index 6a6437c..18a4451 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -30,6 +30,10 @@ }, { "type": "SYMBOL", + "name": "sisu_header_field" + }, + { + "type": "SYMBOL", "name": "heading" }, { @@ -125,7 +129,7 @@ "value": 20, "content": { "type": "PATTERN", - "value": "# SiSU(spine)? [0-9]+(\\.[0-9]+)*\\n" + "value": "[#%] SiSU[^\\n]*\\n" } } }, @@ -272,6 +276,133 @@ } } }, + "sisu_header_field": { + "type": "PREC", + "value": 15, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "key", + "content": { + "type": "SYMBOL", + "name": "sisu_header_key" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "sisu_header_value" + } + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "\n" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "sisu_header_continuation" + } + } + ] + } + }, + "sisu_header_key": { + "type": "TOKEN", + "content": { + "type": "PREC", + "value": 15, + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "@title:" + }, + { + "type": "STRING", + "value": "@creator:" + }, + { + "type": "STRING", + "value": "@date:" + }, + { + "type": "STRING", + "value": "@rights:" + }, + { + "type": "STRING", + "value": "@classify:" + }, + { + "type": "STRING", + "value": "@identifier:" + }, + { + "type": "STRING", + "value": "@original:" + }, + { + "type": "STRING", + "value": "@notes:" + }, + { + "type": "STRING", + "value": "@links:" + }, + { + "type": "STRING", + "value": "@links:+" + }, + { + "type": "STRING", + "value": "@make:" + }, + { + "type": "STRING", + "value": "@publisher:" + }, + { + "type": "STRING", + "value": "@language:" + }, + { + "type": "STRING", + "value": "@vocabulary:" + } + ] + } + } + }, + "sisu_header_value": { + "type": "PATTERN", + "value": "[ \\t]+[^\\n]*" + }, + "sisu_header_continuation": { + "type": "TOKEN", + "content": { + "type": "PREC", + "value": 15, + "content": { + "type": "PATTERN", + "value": " +[^ \\n][^\\n]*\\n" + } + } + }, "heading": { "type": "PREC", "value": 18, |
