Yacc Form of grammar XmlAnnotation.grm


Copyright © 2019 by Hassan Aït-Kaci; All Rights Reserved.

This yacc grammar was generated on Tue Apr 30 07:44:51 CEST 2019 from the annotated Jacc grammar file XmlAnnotation.grm.


XmlAnnotation
	: AnnotationPairs 
	;

AnnotationPairs
	: /* empty */
	| AnnotationPairs AnnotationPair 
	;

AnnotationPair
	: NSPrefixPair 
	| LocalNamePair 
	| AttributesPair 
	| ChildrenPair 
	;

NSPrefixPair
	: NSPrefixKey NSPrefixValue 
	;

NSPrefixKey
	: NSPREFIX KeyValSep_opt 
	;

NSPrefixValue
	: SYMBOL 
	;

LocalNamePair
	: LocalNameKey LocalNameValue 
	;

LocalNameKey
	: LOCALNAME KeyValSep_opt 
	;

LocalNameValue
	: SYMBOL 
	;

AttributesPair
	: AttributesKey AttributesValue 
	;

AttributesKey
	: ATTRIBUTES KeyValSep_opt 
	;

AttributesValue
	: '{' Attributes '}' 
	;

Attributes
	: Attribute 
	| Attributes ListSep_opt Attribute 
	;

Attribute
	: SYMBOL KeyValSep_opt AttributeValue 
	;

AttributeValue
	: SpecialForm 
	| SYMBOL 
	| POSITION XmlPath_opt AttributeName_opt 
	;

SpecialForm
	: VALUE 
	| TEXT '(' TextArguments ')' 
	;

TextArguments
	: TextArgument 
	| TextArguments ListSep_opt TextArgument 
	;

TextArgument
	: SYMBOL 
	| TextRef 
	;

TextRef
	: ChildXmlTree AttributeName_opt 
	;

AttributeName
	: SLASH SYMBOL 
	;

XmlChildSpec
	: WrapperPath_opt ChildXmlTree 
	;

ChildXmlTree
	: SpecialForm 
	| POSITION XmlPath_opt 
	;

WrapperPath_opt
	: /* empty */
	| WrapperPath 
	;

WrapperPath
	: SYMBOL DotOrStar 
	| WrapperPath SYMBOL DotOrStar 
	;

DotOrStar
	: DOT 
	| STAR 
	;

XmlPath_opt
	: /* empty */
	| '[' XmlPath ']' 
	;

XmlPath
	: POSITION 
	| XmlPath DOT POSITION 
	;

ChildrenPair
	: ChildrenKey ChildrenValue 
	;

ChildrenKey
	: CHILDREN KeyValSep_opt 
	;

ChildrenValue
	: '(' XmlTreeRefs ')' 
	;

XmlTreeRefs
	: XmlTreeRef 
	| XmlTreeRefs ListSep_opt XmlTreeRef 
	;

XmlTreeRef
	: XmlChildSpec AttributeName_opt 
	;

AttributeName_opt
	: /* empty */
	| AttributeName 
	;

KeyValSep_opt
	: /* empty */
	| KEYVALSEP 
	;

ListSep_opt
	: /* empty */
	| LISTSEP 
	;


Copyright © 2019 by Hassan Aït-Kaci; All Rights Reserved.