+/* YUI: Documentation Comments {{{ */
+Statement_
+ : Comment { $$ = $1; }
+ ;
+/* }}} */
+
+@begin E4X
+/* Lexer State {{{ */
+LexPushRegExp
+ : { driver.PushCondition(CYDriver::RegExpCondition); }
+ ;
+
+LexPushXMLContent
+ : { driver.PushCondition(CYDriver::XMLContentCondition); }
+ ;
+
+LexPushXMLTag
+ : { driver.PushCondition(CYDriver::XMLTagCondition); }
+ ;
+
+LexPop
+ : { driver.PopCondition(); }
+ ;
+
+LexSetXMLContent
+ : { driver.SetCondition(CYDriver::XMLContentCondition); }
+ ;
+
+LexSetXMLTag
+ : { driver.SetCondition(CYDriver::XMLTagCondition); }
+ ;
+/* }}} */
+
+XMLWhitespaceOpt
+ : XMLWhitespace
+ |
+ ;
+
+/* 8.1 Context Keywords {{{ */
+Identifier
+ : "namespace" { $$ = $1; }
+ | "xml" { $$ = $1; }
+ ;
+/* }}} */
+/* 8.3 XML Initialiser Input Elements {{{ */
+XMLMarkup
+ : XMLComment { $$ = $1; }
+ | XMLCDATA { $$ = $1; }
+ | XMLPI { $$ = $1; }
+ ;
+/* }}} */
+/* 11.1 Primary Expressions {{{ */
+PrimaryExpressionNo
+ : PropertyIdentifier { $$ = new(driver.pool_) CYPropertyVariable($1); }
+ | XMLInitialiser { $$ = $1; }
+ | XMLListInitialiser { $$ = $1; }
+ ;
+
+PropertyIdentifier
+ : AttributeIdentifier { $$ = $1; }
+ | QualifiedIdentifier { $$ = $1; }
+ | WildcardIdentifier { $$ = $1; }
+ ;
+/* }}} */
+/* 11.1.1 Attribute Identifiers {{{ */
+AttributeIdentifier
+ : "@" QualifiedIdentifier_ { $$ = new(driver.pool_) CYAttribute($2); }
+ ;
+
+PropertySelector_
+ : PropertySelector { $$ = $1; }
+ | "[" Expression "]" { $$ = new(driver.pool_) CYSelector($2); }
+ ;
+
+PropertySelector
+ : Identifier { $$ = new(driver.pool_) CYSelector($1); }
+ | WildcardIdentifier { $$ = $1; }
+ ;
+/* }}} */
+/* 11.1.2 Qualified Identifiers {{{ */
+QualifiedIdentifier_
+ : PropertySelector_ { $$ = new(driver.pool_) CYQualified(NULL, $1); }
+ | QualifiedIdentifier { $$ = $1; }
+ ;
+
+QualifiedIdentifier
+ : PropertySelector "::" PropertySelector_ { $$ = new(driver.pool_) CYQualified($1, $3); }
+ ;
+/* }}} */
+/* 11.1.3 Wildcard Identifiers {{{ */
+WildcardIdentifier
+ : "*" { $$ = new(driver.pool_) CYWildcard(); }
+ ;
+/* }}} */
+/* 11.1.4 XML Initialiser {{{ */
+XMLInitialiser
+ : XMLMarkup { $$ = $1; }
+ | XMLElement { $$ = $1; }
+ ;
+
+XMLElement
+ : "<" XMLTagContent "/>" LexPop
+ | "<" XMLTagContent ">" LexSetXMLContent XMLElementContentOpt "</" LexSetXMLTag XMLTagName XMLWhitespaceOpt ">" LexPop
+ ;
+
+XMLTagContent
+ : LexPushXMLTag XMLTagName XMLAttributes
+ ;
+
+XMLExpression
+ : "{" LexPushRegExp Expression "}" LexPop
+ ;
+
+XMLTagName
+ : XMLExpression
+ | XMLName
+ ;
+
+XMLAttributes_
+ : XMLAttributes_ XMLAttribute
+ |
+ ;
+
+XMLAttributes
+ : XMLAttributes_ XMLWhitespace XMLExpression XMLWhitespaceOpt
+ | XMLAttributes_ XMLWhitespaceOpt
+ ;
+
+XMLAttributeValue_
+ : XMLExpression
+ | XMLAttributeValue
+ ;
+
+XMLAttribute
+ : XMLWhitespace XMLName XMLWhitespaceOpt "=" XMLWhitespaceOpt XMLAttributeValue_
+ ;
+
+XMLElementContent
+ : XMLExpression XMLElementContentOpt
+ | XMLMarkup XMLElementContentOpt
+ | XMLText XMLElementContentOpt
+ | XMLElement XMLElementContentOpt
+ ;
+
+XMLElementContentOpt
+ : XMLElementContent
+ |
+ ;
+/* }}} */
+/* 11.1.5 XMLList Initialiser {{{ */
+XMLListInitialiser
+ : "<>" LexPushXMLContent XMLElementContent "</>" LexPop { $$ = new(driver.pool_) CYXMLList($3); }
+ ;
+/* }}} */
+/* 11.2 Left-Hand-Side Expressions {{{ */
+PropertyIdentifier_
+ : Identifier { $$ = $1; }
+ | PropertyIdentifier { $$ = $1; }
+ ;
+
+MemberAccess
+ : "." PropertyIdentifier { $$ = new(driver.pool_) CYPropertyMember(NULL, $2); }
+ | ".." PropertyIdentifier_ { $$ = new(driver.pool_) CYDescendantMember(NULL, $2); }
+ | "." "(" Expression ")" { $$ = new(driver.pool_) CYFilteringPredicate(NULL, $3); }
+ ;
+/* }}} */
+/* 12.1 The default xml namespace Statement {{{ */
+/* XXX: DefaultXMLNamespaceStatement
+ : "default" "xml" "namespace" "=" Expression Terminator { $$ = new(driver.pool_) CYDefaultXMLNamespace($5); }
+ ;
+
+Statement_
+ : DefaultXMLNamespaceStatement { $$ = $1; }
+ ; */
+/* }}} */
+@end
+