Regex Pattern for URI
Regex Pattern for URI
terminal URI returns URIDataType: SCHEME ':' IHIER_PART ( '#' IFRAGMENT )?; terminal fragment SCHEME: ALPHA ( ALPHA | DIGIT | '+' | '-' | '.' )*; terminal fragment IHIER_PART: '//' IAUTHORITY IPATH?; terminal fragment IFRAGMENT: ISEGMENT; terminal fragment IAUTHORITY: ( IUSER_INFO '@' )? IHOST ( ':' PORT )?; terminal fragment IPATH: ISEGMENT ('/' ISEGMENT)*; terminal fragment ISEGMENT: IPCHAR+; terminal fragment IUSER_INFO: IUSER_PART (':' IUSER_PART)*; terminal fragment IUSER_PART: ( UNRESERVED | PCT_ENCODED )+; terminal fragment IUNRESERVED: ALPHA IUNRESERVED_PART? ( '.' IUNRESERVED_PART )*; terminal fragment IUNRESERVED_PART: ALPHA | DIGIT | '-' | '_' | '~'; terminal fragment IHOST: IPV4_ADDRESS | IUNRESERVED; terminal fragment IPV4_ADDRESS: DEC_OCTET '.' DEC_OCTET '.' DEC_OCTET '.' DEC_OCTET; terminal fragment DEC_OCTET: ( DIGIT | '1' DIGIT | '2' DIGIT04 DIGIT | '25' DIGIT05); terminal fragment DIGIT04: '0'..'4'; terminal fragment DIGIT05: '0'..'5';
TODO The pattern is incomplete...
Regex pattern for UUID
Regex pattern for UUID
LiteralUUID returns LiteralUUID: {LiteralUUID} uuid=UUIDDataType; UUIDDataType returns UUIDDataType: UUID; terminal UUID returns UUIDDataType: 'uuid=' HEX_8DIGITS '-' HEX_4DIGITS '-' HEX_4DIGITS '-' HEX_4DIGITS '-' HEX_12DIGITS; terminal fragment HEX_12DIGITS: HEX_8DIGITS HEX_4DIGITS; terminal fragment HEX_8DIGITS: HEX_4DIGITS HEX_4DIGITS; terminal fragment HEX_4DIGITS: HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT; terminal fragment HEX_LETTER: 'a'..'f' | 'A'..'F'; terminal fragment HEX_DIGIT: DIGIT | HEX_LETTER;
A string representation of a literal value of some kind
A non-empty LiteralValue if v matches the syntax of a LiteralBoolean
A string representation of a literal value of some kind
A non-empty LiteralValue if v matches the syntax of a LiteralString LiteralString returns LiteralString: {LiteralString} string=STRING_VALUE; terminal STRING_VALUE returns StringDataType: '"' ( '\\' . ('b'|'t'|'n'|'f'|'r'|'"'|"'"|'\\')| !('\\'|'"') )* '"';
A string representation of a literal value of some kind
A non-empty LiteralValue if v matches the syntax of a LiteralURI
A string representation of a literal value of some kind
A non-empty LiteralValue if v matches the syntax of a LiteralUUID
Xtext grammar: LiteralValue : LiteralBoolean | LiteralDateTime | LiteralString | LiteralUUID | LiteralURI | LiteralNumber;