mirror of
https://github.com/cirruslabs/tart.git
synced 2026-10-05 13:41:15 +02:00
15 lines
423 B
ANTLR
15 lines
423 B
ANTLR
grammar Reference;
|
|
|
|
root: host (':' port)? '/' namespace reference? EOF;
|
|
host: host_component ('.' host_component)*;
|
|
port: DIGIT+;
|
|
host_component: name ('-' name)*;
|
|
namespace: namespace_component ('/' namespace_component)*;
|
|
namespace_component: (name separator?)+;
|
|
reference: (':' tag) | ('@' name ':' name);
|
|
tag: name (separator name)*;
|
|
separator: '.' | '-' | '_';
|
|
name: (LETTER | DIGIT)+;
|
|
DIGIT: [0-9];
|
|
LETTER: [A-Za-z];
|