Grammar

This grammar is LALR(2)

Number of Rules 140

Number of Terminals 64

Number of Lr0 States88

Number of La States1

BNF

Accept ::= document

1: document ::= prolog element misc*

2: prolog ::= xmlDecl? misc* (doctypedecl misc*)?

3: element ::= sTag

10: sTag ::= sTagName

11: misc ::= (comment|pi)

12: xmlDecl ::= byteOrderMark? xmlPrefix versionInfo encodingDecl? sdDecl? '?>'

18: xmlPrefix ::= utf16LEPrefix

19: xmlPrefix ::= utf32BEPrefix

20: xmlPrefix ::= utf32LEPrefix

21: xmlPrefix ::= utf8Prefix

22: xmlPrefix ::= utf16BEPrefix

23: versionInfo ::= 'version' eq versionNum

28: doctypedecl ::= doctypedeclStart doctypedeclContent doctypedeclEnd

29: byteOrderMark ::= utf8

30: byteOrderMark ::= utf16LE

31: byteOrderMark ::= utf32LE

32: byteOrderMark ::= utf16BE

33: byteOrderMark ::= utf32BE

34: eq ::= '='

35: versionNum ::= version

36: encodingDecl ::= 'encoding' eq '"' encName '"'

37: encodingDecl ::= 'encoding' eq ''' encName '''

38: sdDecl ::= 'standalone' eq yesNo '''

39: sdDecl ::= 'standalone' eq yesNo '"'

40: doctypedeclStart ::= '<!DOCTYPE' qName optExternalID

41: doctypedeclContent ::= ('\[' intSubset '\]')?

42: doctypedeclEnd ::= '>'

43: utf8 ::= 'xEFxBBxBF'

44: utf16LE ::= 'xFFxFE'

45: utf32LE ::= 'xFFxFEx00x00'

46: utf16BE ::= 'xFExFF'

47: utf32BE ::= 'x00x00xFExFF'

48: optExternalID ::=

49: optExternalID ::= externalID

52: externalID ::= 'SYSTEM' systemLiteral

53: externalID ::= 'PUBLIC' pubidLiteral systemLiteral

55: pubidLiteral ::= pubidLiteralMinusApostrophe

56: pubidLiteral ::= pubidLiteralWithApostrophe

57: intSubset ::= markupdecl*

60: markupdecl ::= attlistDecl

61: markupdecl ::= elementdecl

62: markupdecl ::= entityDecl

63: markupdecl ::= notationDecl

64: attlistDecl ::= '<!ATTLIST' qName attDef* '>'

65: elementdecl ::= '<!ELEMENT' qName contentspec '>'

66: entityDecl ::= geDecl

67: entityDecl ::= peDecl

68: notationDecl ::= '<!NOTATION' name externalID '>'

69: notationDecl ::= '<!NOTATION' name publicID '>'

72: contentspec ::= 'EMPTY'

73: contentspec ::= 'ANY'

74: contentspec ::= children

75: contentspec ::= mixed

76: geDecl ::= '<!ENTITY' name entityDef '>'

77: peDecl ::= '<!ENTITY' '%' name peDef '>'

78: publicID ::= 'PUBLIC' pubidLiteral

79: attDef ::= nsAttName attType defaultDecl

80: attDef ::= qName attType defaultDecl

81: children ::= seq ('[\+\*\?]')?

82: children ::= choice ('[\+\*\?]')?

83: mixed ::= '(' '#PCDATA' ')'

84: mixed ::= '(' '#PCDATA' mixedNames ')' '*'

85: entityDef ::= externalID nDataDecl?

86: entityDef ::= entityValue

87: peDef ::= externalID

88: peDef ::= entityValue

89: attType ::= stringType

90: attType ::= tokenizedType

91: attType ::= enumeratedType

92: defaultDecl ::= '#IMPLIED'

93: defaultDecl ::= '#FIXED'? attValue

94: defaultDecl ::= '#REQUIRED'

95: seq ::= '(' cp ('\,' cp)* ')'

98: choice ::= '(' cp ('\|' cp)+ ')'

99: mixedNames ::=

100: mixedNames ::= mixedNames '|' qName

103: entityValue ::= quotEntityValueStart

104: entityValue ::= aposEntityValueStart

105: stringType ::= 'CDATA'

106: tokenizedType ::= 'ID' 'REF'

107: tokenizedType ::= 'ENTITY'

108: tokenizedType ::= 'ID' 'REF' 'S'

109: tokenizedType ::= 'NMTOKEN'

110: tokenizedType ::= 'ID'

111: tokenizedType ::= 'NMTOKEN' 'S'

112: tokenizedType ::= 'ENTITIES'

113: enumeratedType ::= enumeration

114: enumeratedType ::= notationType

117: attValue ::= quotAttValueStart

118: attValue ::= aposAttValueStart

119: cp ::= qName ('[\+\*\?]')?

120: cp ::= seq ('[\+\*\?]')?

121: cp ::= choice ('[\+\*\?]')?

127: nDataDecl ::= 'NDATA' name

128: quotEntityValueStart ::= '"'

129: aposEntityValueStart ::= '''

130: enumeration ::= '(' nmtoken enumerationNMTokens ')'

131: notationType ::= 'NOTATION' '(' name notationTypeNames ')'

132: quotAttValueStart ::= '"'

133: aposAttValueStart ::= '''

136: enumerationNMTokens ::= enumerationNMTokens '|' nmtoken

137: enumerationNMTokens ::=

138: notationTypeNames ::= notationTypeNames '|' name

139: notationTypeNames ::=

Terminals

comment = '<!\-\-[\x01-\uD7FF\uE000-\uFFFD\x{10000}-\x{10FFFF}]*\-\->'

name = '[:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\x{10000}-\x{10FFFF}][:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\x{10000}-\x{10FFFF}\-\.0-9\xB7\u0300-\u036F\u203F-\u2040]*'

s = '[\x20\x09\x0A]+'

version = '"[0-9]\.[0-9]"|'[0-9]\.[0-9]''

systemLiteral = '"[^"]*"|'[^']*''

pubidLiteralWithApostrophe = '"[\x20\x0D\x0Aa-zA-Z0-9\-'\(\)\+\,\./:=\?;!\*#@\$_%]*"'

pubidLiteralMinusApostrophe = ''[\x20\x0D\x0Aa-zA-Z0-9\-\(\)\+\,\./:=\?;!\*#@\$_%]*''

qName = '[A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\x{10000}-\x{10FFFF}][A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\x{10000}-\x{10FFFF}\-\.0-9\xB7\u0300-\u036F\u203F-\u2040]*(:[A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\x{10000}-\x{10FFFF}][A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\x{10000}-\x{10FFFF}\-\.0-9\xB7\u0300-\u036F\u203F-\u2040]*)?'

eol = '\x0d\x0a|\x0d\x85|\x85|\x0d|\u2028'

pi = '<\?[\x01-\uD7FF\uE000-\uFFFD\x{10000}-\x{10FFFF}]*\?>'

nsAttName = 'xmlns(:[A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\x{10000}-\x{10FFFF}][A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\x{10000}-\x{10FFFF}\-\.0-9\xB7\u0300-\u036F\u203F-\u2040]*)?'

sTagName = '<[A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\x{10000}-\x{10FFFF}][A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\x{10000}-\x{10FFFF}\-\.0-9\xB7\u0300-\u036F\u203F-\u2040]*(:[A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\x{10000}-\x{10FFFF}][A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\x{10000}-\x{10FFFF}\-\.0-9\xB7\u0300-\u036F\u203F-\u2040]*)?'

yesNo = '(yes)|(no)'

utf8Prefix = '<\?xml'

encName = '[A-Za-z][A-Za-z0-9\._\-]*'

nmtoken = '[:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\x{10000}-\x{10FFFF}\-\.0-9\xB7\u0300-\u036F\u203F-\u2040]+'

utf32BEPrefix = '\x00\x00\x00<\x00\x00\x00\?\x00\x00\x00x\x00\x00\x00m\x00\x00\x00l'

utf32LEPrefix = '<\x00\x00\x00\?\x00\x00\x00x\x00\x00\x00m\x00\x00\x00l\x00\x00\x00'

utf16BEPrefix = '\x00<\x00\?\x00x\x00m\x00l'

utf16LEPrefix = '<\x00\?\x00x\x00m\x00l\x00'

States

State 1

( )

Accept->.document

byteOrderMark?->. (16)

xmlDecl?->. (6)

'xEFxBBxBF' Sh/Rd 43

'xFFxFE' Sh/Rd 44

'xFFxFEx00x00' Sh/Rd 45

'xFExFF' Sh/Rd 46

'x00x00xFExFF' Sh/Rd 47

document Goto 2

prolog Goto 3

xmlDecl Gt/Rd 7

byteOrderMark Gt/Rd 17

utf32BE Gt/Rd 33

utf16BE Gt/Rd 32

utf32LE Gt/Rd 31

utf16LE Gt/Rd 30

utf8 Gt/Rd 29

byteOrderMark? Goto 4

xmlDecl? Goto 5

utf16LEPrefix Reduce 16

utf32BEPrefix Reduce 16

utf32LEPrefix Reduce 16

utf8Prefix Reduce 16

utf16BEPrefix Reduce 16

pi Reduce 6

comment Reduce 6

'<!DOCTYPE' Reduce 6

sTagName Reduce 6

State 2

( 1 )

Accept->document . (0)

Accept->document . (0)

Eof Reduce 0

State 3

( 1 )

document->prolog .element misc*

sTagName Sh/Rd 10

element Goto 6

sTag Gt/Rd 3

State 4

( 1 )

xmlDecl->byteOrderMark? .xmlPrefix versionInfo encodingDecl? sdDecl? '?>'

utf16BEPrefix Sh/Rd 22

utf8Prefix Sh/Rd 21

utf32LEPrefix Sh/Rd 20

utf32BEPrefix Sh/Rd 19

utf16LEPrefix Sh/Rd 18

xmlPrefix Goto 7

State 5

( 1 )

prolog->xmlDecl? .misc* (doctypedecl misc*)?

misc*->. (5)

misc* Goto 8

'<!DOCTYPE' Reduce 5

pi Reduce 5

comment Reduce 5

sTagName Reduce 5

State 6

( 3 )

document->prolog element .misc*

misc*->. (5)

misc* Goto 9

pi Reduce 5

comment Reduce 5

Eof Reduce 5

State 7

( 4 )

xmlDecl->byteOrderMark? xmlPrefix .versionInfo encodingDecl? sdDecl? '?>'

'version' Shift 11

versionInfo Goto 10

State 8

( 5 )

prolog->xmlDecl? misc* .(doctypedecl misc*)?

misc*->misc* .misc

(doctypedecl misc*)?->. (8)

'<!DOCTYPE' Shift 13

comment Sh/Rd 15

pi Sh/Rd 14

misc Gt/Rd 4

(doctypedecl misc*)? Gt/Rd 2

(doctypedecl misc*) Gt/Rd 9

doctypedeclStart Goto 12

doctypedecl Goto 14

(comment|pi) Gt/Rd 11

sTagName Reduce 8

State 9

( 6 )

document->prolog element misc* . (1)

misc*->misc* .misc

document->prolog element misc* . (1)

comment Sh/Rd 15

pi Sh/Rd 14

misc Gt/Rd 4

(comment|pi) Gt/Rd 11

Eof Reduce 1

State 10

( 7 )

xmlDecl->byteOrderMark? xmlPrefix versionInfo .encodingDecl? sdDecl? '?>'

encodingDecl?->. (25)

'encoding' Shift 16

encodingDecl? Goto 15

encodingDecl Gt/Rd 24

'standalone' Reduce 25

'?>' Reduce 25

State 11

( 7 )

versionInfo->'version' .eq versionNum

'=' Sh/Rd 34

eq Goto 17

State 12

( 8 )

doctypedecl->doctypedeclStart .doctypedeclContent doctypedeclEnd

('\[' intSubset '\]')?->. (50)

'[' Shift 19

doctypedeclContent Goto 18

('\[' intSubset '\]')? Gt/Rd 41

('\[' intSubset '\]') Gt/Rd 51

'>' Reduce 50

State 13

( 8 )

doctypedeclStart->'<!DOCTYPE' .qName optExternalID

qName Shift 20

State 14

( 8 )

(doctypedecl misc*)->doctypedecl .misc*

misc*->. (5)

misc* Goto 21

pi Reduce 5

comment Reduce 5

sTagName Reduce 5

State 15

( 10 )

xmlDecl->byteOrderMark? xmlPrefix versionInfo encodingDecl? .sdDecl? '?>'

sdDecl?->. (27)

'standalone' Shift 23

sdDecl? Goto 22

sdDecl Gt/Rd 26

'?>' Reduce 27

State 16

( 10 )

encodingDecl->'encoding' .eq '"' encName '"'

encodingDecl->'encoding' .eq ''' encName '''

'=' Sh/Rd 34

eq Goto 24

State 17

( 11 )

versionInfo->'version' eq .versionNum

version Sh/Rd 35

versionNum Gt/Rd 23

State 18

( 12 )

doctypedecl->doctypedeclStart doctypedeclContent .doctypedeclEnd

'>' Sh/Rd 42

doctypedeclEnd Gt/Rd 28

State 19

( 12 )

('\[' intSubset '\]')->'[' .intSubset ']'

markupdecl*->. (58)

intSubset Goto 25

markupdecl* Goto 26

'<!ATTLIST' Reduce 58

'<!ELEMENT' Reduce 58

'<!ENTITY' Reduce 58

'<!NOTATION' Reduce 58

']' Reduce 58

State 20

( 13 )

doctypedeclStart->'<!DOCTYPE' qName .optExternalID

optExternalID->. (48)

'PUBLIC' Shift 27

'SYSTEM' Shift 28

optExternalID Gt/Rd 40

externalID Gt/Rd 49

'[' Reduce 48

'>' Reduce 48

State 21

( 14 )

misc*->misc* .misc

(doctypedecl misc*)->doctypedecl misc* . (13)

(doctypedecl misc*)->doctypedecl misc* . (13)

comment Sh/Rd 15

pi Sh/Rd 14

misc Gt/Rd 4

(comment|pi) Gt/Rd 11

sTagName Reduce 13

State 22

( 15 )

xmlDecl->byteOrderMark? xmlPrefix versionInfo encodingDecl? sdDecl? .'?>'

'?>' Sh/Rd 12

State 23

( 15 )

sdDecl->'standalone' .eq yesNo '''

sdDecl->'standalone' .eq yesNo '"'

'=' Sh/Rd 34

eq Goto 29

State 24

( 16 )

encodingDecl->'encoding' eq .'"' encName '"'

encodingDecl->'encoding' eq .''' encName '''

''' Shift 30

'"' Shift 31

State 25

( 19 )

('\[' intSubset '\]')->'[' intSubset .']'

']' Sh/Rd 54

State 26

( 19 )

intSubset->markupdecl* . (57)

markupdecl*->markupdecl* .markupdecl

intSubset->markupdecl* . (57)

'<!NOTATION' Shift 32

'<!ENTITY' Shift 33

'<!ELEMENT' Shift 34

'<!ATTLIST' Shift 35

markupdecl Gt/Rd 59

notationDecl Gt/Rd 63

entityDecl Gt/Rd 62

elementdecl Gt/Rd 61

attlistDecl Gt/Rd 60

peDecl Gt/Rd 67

geDecl Gt/Rd 66

']' Reduce 57

State 27

( 20 42 48 )

externalID->'PUBLIC' .pubidLiteral systemLiteral

pubidLiteralWithApostrophe Sh/Rd 56

pubidLiteralMinusApostrophe Sh/Rd 55

pubidLiteral Goto 36

State 28

( 20 40 42 48 )

externalID->'SYSTEM' .systemLiteral

systemLiteral Sh/Rd 52

State 29

( 23 )

sdDecl->'standalone' eq .yesNo '''

sdDecl->'standalone' eq .yesNo '"'

yesNo Shift 37

State 30

( 24 )

encodingDecl->'encoding' eq ''' .encName '''

encName Shift 38

State 31

( 24 )

encodingDecl->'encoding' eq '"' .encName '"'

encName Shift 39

State 32

( 26 )

notationDecl->'<!NOTATION' .name externalID '>'

notationDecl->'<!NOTATION' .name publicID '>'

name Shift 40

State 33

( 26 )

geDecl->'<!ENTITY' .name entityDef '>'

peDecl->'<!ENTITY' .'%' name peDef '>'

'%' Shift 41

name Shift 42

State 34

( 26 )

elementdecl->'<!ELEMENT' .qName contentspec '>'

qName Shift 43

State 35

( 26 )

attlistDecl->'<!ATTLIST' .qName attDef* '>'

qName Shift 44

State 36

( 27 )

externalID->'PUBLIC' pubidLiteral .systemLiteral

systemLiteral Sh/Rd 53

State 37

( 29 )

sdDecl->'standalone' eq yesNo .'''

sdDecl->'standalone' eq yesNo .'"'

'"' Sh/Rd 39

''' Sh/Rd 38

State 38

( 30 )

encodingDecl->'encoding' eq ''' encName .'''

''' Sh/Rd 37

State 39

( 31 )

encodingDecl->'encoding' eq '"' encName .'"'

'"' Sh/Rd 36

State 40

( 32 )

notationDecl->'<!NOTATION' name .externalID '>'

notationDecl->'<!NOTATION' name .publicID '>'

'SYSTEM' Shift 28

'PUBLIC' Shift 47

publicID Goto 45

externalID Goto 46

State 41

( 33 )

peDecl->'<!ENTITY' '%' .name peDef '>'

name Shift 48

State 42

( 33 )

geDecl->'<!ENTITY' name .entityDef '>'

'"' Sh/Rd 128

''' Sh/Rd 129

'PUBLIC' Shift 27

'SYSTEM' Shift 28

entityDef Goto 49

entityValue Gt/Rd 86

externalID Goto 50

aposEntityValueStart Gt/Rd 104

quotEntityValueStart Gt/Rd 103

State 43

( 34 )

elementdecl->'<!ELEMENT' qName .contentspec '>'

'ANY' Sh/Rd 73

'EMPTY' Sh/Rd 72

'(' Shift 52

contentspec Goto 51

mixed Gt/Rd 75

children Gt/Rd 74

choice Goto 53

seq Goto 54

State 44

( 35 )

attlistDecl->'<!ATTLIST' qName .attDef* '>'

attDef*->. (70)

attDef* Goto 55

'>' Reduce 70

nsAttName Reduce 70

qName Reduce 70

State 45

( 40 )

notationDecl->'<!NOTATION' name publicID .'>'

'>' Sh/Rd 69

State 46

( 40 )

notationDecl->'<!NOTATION' name externalID .'>'

'>' Sh/Rd 68

State 47

( 40 )

externalID->'PUBLIC' .pubidLiteral systemLiteral

publicID->'PUBLIC' .pubidLiteral

pubidLiteralWithApostrophe Sh/Rd 56

pubidLiteralMinusApostrophe Sh/Rd 55

pubidLiteral Goto 56

State 48

( 41 )

peDecl->'<!ENTITY' '%' name .peDef '>'

'"' Sh/Rd 128

''' Sh/Rd 129

'PUBLIC' Shift 27

'SYSTEM' Shift 28

peDef Goto 57

entityValue Gt/Rd 88

externalID Gt/Rd 87

aposEntityValueStart Gt/Rd 104

quotEntityValueStart Gt/Rd 103

State 49

( 42 )

geDecl->'<!ENTITY' name entityDef .'>'

'>' Sh/Rd 76

State 50

( 42 )

entityDef->externalID .nDataDecl?

nDataDecl?->. (102)

'NDATA' Shift 58

nDataDecl? Gt/Rd 85

nDataDecl Gt/Rd 101

'>' Reduce 102

State 51

( 43 )

elementdecl->'<!ELEMENT' qName contentspec .'>'

'>' Sh/Rd 65

State 52

( 43 )

mixed->'(' .'#PCDATA' ')'

mixed->'(' .'#PCDATA' mixedNames ')' '*'

seq->'(' .cp ('\,' cp)* ')'

choice->'(' .cp ('\|' cp)+ ')'

'#PCDATA' Shift 60

qName Shift 63

'(' Shift 64

cp Goto 59

choice Goto 61

seq Goto 62

State 53

( 43 )

children->choice .('[\+\*\?]')?

('[\+\*\?]')?->. (97)

'[+*?]' Sh/Rd 124

('[\+\*\?]')? Gt/Rd 82

('[\+\*\?]') Gt/Rd 96

'>' Reduce 97

State 54

( 43 )

children->seq .('[\+\*\?]')?

('[\+\*\?]')?->. (97)

'[+*?]' Sh/Rd 124

('[\+\*\?]')? Gt/Rd 81

('[\+\*\?]') Gt/Rd 96

'>' Reduce 97

State 55

( 44 )

attlistDecl->'<!ATTLIST' qName attDef* .'>'

attDef*->attDef* .attDef

'>' Sh/Rd 64

qName Shift 65

nsAttName Shift 66

attDef Gt/Rd 71

State 56

( 47 )

externalID->'PUBLIC' pubidLiteral .systemLiteral

publicID->'PUBLIC' pubidLiteral . (78)

publicID->'PUBLIC' pubidLiteral . (78)

systemLiteral Sh/Rd 53

'>' Reduce 78

State 57

( 48 )

peDecl->'<!ENTITY' '%' name peDef .'>'

'>' Sh/Rd 77

State 58

( 50 )

nDataDecl->'NDATA' .name

name Sh/Rd 127

State 59

( 52 64 )

seq->'(' cp .('\,' cp)* ')'

choice->'(' cp .('\|' cp)+ ')'

('\,' cp)*->. (122)

'|' Shift 69

('\,' cp)* Goto 67

('\|' cp) Gt/Rd 126

('\|' cp)+ Goto 68

')' Reduce 122

',' Reduce 122

State 60

( 52 )

mixed->'(' '#PCDATA' .')'

mixed->'(' '#PCDATA' .mixedNames ')' '*'

mixedNames->. (99)

')' Shift 89

mixedNames Goto 70

'|' Reduce 99

State 61

( 52 64 69 77 )

cp->choice .('[\+\*\?]')?

('[\+\*\?]')?->. (97)

'[+*?]' Sh/Rd 124

('[\+\*\?]')? Gt/Rd 121

('[\+\*\?]') Gt/Rd 96

')' Reduce 97

',' Reduce 97

'|' Reduce 97

State 62

( 52 64 69 77 )

cp->seq .('[\+\*\?]')?

('[\+\*\?]')?->. (97)

'[+*?]' Sh/Rd 124

('[\+\*\?]')? Gt/Rd 120

('[\+\*\?]') Gt/Rd 96

')' Reduce 97

',' Reduce 97

'|' Reduce 97

State 63

( 52 64 69 77 )

cp->qName .('[\+\*\?]')?

('[\+\*\?]')?->. (97)

'[+*?]' Sh/Rd 124

('[\+\*\?]')? Gt/Rd 119

('[\+\*\?]') Gt/Rd 96

')' Reduce 97

',' Reduce 97

'|' Reduce 97

State 64

( 52 64 69 77 )

seq->'(' .cp ('\,' cp)* ')'

choice->'(' .cp ('\|' cp)+ ')'

qName Shift 63

'(' Shift 64

cp Goto 59

choice Goto 61

seq Goto 62

State 65

( 55 )

attDef->qName .attType defaultDecl

'(' Shift 72

'NOTATION' Shift 73

'ENTITIES' Sh/Rd 112

'NMTOKEN' Shift 74

'ENTITY' Sh/Rd 107

'ID' Shift 75

'CDATA' Sh/Rd 105

attType Goto 71

enumeratedType Gt/Rd 91

tokenizedType Gt/Rd 90

stringType Gt/Rd 89

notationType Gt/Rd 114

enumeration Gt/Rd 113

State 66

( 55 )

attDef->nsAttName .attType defaultDecl

'(' Shift 72

'NOTATION' Shift 73

'ENTITIES' Sh/Rd 112

'NMTOKEN' Shift 74

'ENTITY' Sh/Rd 107

'ID' Shift 75

'CDATA' Sh/Rd 105

attType Goto 76

enumeratedType Gt/Rd 91

tokenizedType Gt/Rd 90

stringType Gt/Rd 89

notationType Gt/Rd 114

enumeration Gt/Rd 113

State 67

( 59 )

seq->'(' cp ('\,' cp)* .')'

('\,' cp)*->('\,' cp)* .('\,' cp)

')' Sh/Rd 95

',' Shift 77

('\,' cp) Gt/Rd 123

State 68

( 59 )

choice->'(' cp ('\|' cp)+ .')'

('\|' cp)+->('\|' cp)+ .('\|' cp)

')' Sh/Rd 98

'|' Shift 69

('\|' cp) Gt/Rd 125

State 69

( 59 68 )

('\|' cp)->'|' .cp

qName Shift 63

'(' Shift 64

cp Gt/Rd 135

choice Goto 61

seq Goto 62

State 70

( 60 )

mixed->'(' '#PCDATA' mixedNames .')' '*'

mixedNames->mixedNames .'|' qName

'|' Shift 78

')' Shift 79

State 71

( 65 )

attDef->qName attType .defaultDecl

'#FIXED'?->. (115)

'#REQUIRED' Sh/Rd 94

'#IMPLIED' Sh/Rd 92

'#FIXED' Sh/Rd 116

defaultDecl Gt/Rd 80

'#FIXED'? Goto 80

'"' Reduce 115

''' Reduce 115

State 72

( 65 66 )

enumeration->'(' .nmtoken enumerationNMTokens ')'

nmtoken Shift 81

State 73

( 65 66 )

notationType->'NOTATION' .'(' name notationTypeNames ')'

'(' Shift 82

State 74

( 65 66 )

tokenizedType->'NMTOKEN' . (109)

tokenizedType->'NMTOKEN' .'S'

tokenizedType->'NMTOKEN' . (109)

'S' Sh/Rd 111

'#IMPLIED' Reduce 109

'#FIXED' Reduce 109

'"' Reduce 109

''' Reduce 109

'#REQUIRED' Reduce 109

State 75

( 65 66 )

tokenizedType->'ID' .'REF'

tokenizedType->'ID' .'REF' 'S'

tokenizedType->'ID' . (110)

tokenizedType->'ID' . (110)

'REF' Shift 83

'#IMPLIED' Reduce 110

'#FIXED' Reduce 110

'"' Reduce 110

''' Reduce 110

'#REQUIRED' Reduce 110

State 76

( 66 )

attDef->nsAttName attType .defaultDecl

'#FIXED'?->. (115)

'#REQUIRED' Sh/Rd 94

'#IMPLIED' Sh/Rd 92

'#FIXED' Sh/Rd 116

defaultDecl Gt/Rd 79

'#FIXED'? Goto 80

'"' Reduce 115

''' Reduce 115

State 77

( 67 )

('\,' cp)->',' .cp

qName Shift 63

'(' Shift 64

cp Gt/Rd 134

choice Goto 61

seq Goto 62

State 78

( 70 )

mixedNames->mixedNames '|' .qName

qName Sh/Rd 100

State 79

( 70 )

mixed->'(' '#PCDATA' mixedNames ')' .'*'

'*' Sh/Rd 84

State 80

( 71 76 )

defaultDecl->'#FIXED'? .attValue

''' Sh/Rd 133

'"' Sh/Rd 132

attValue Gt/Rd 93

aposAttValueStart Gt/Rd 118

quotAttValueStart Gt/Rd 117

State 81

( 72 )

enumeration->'(' nmtoken .enumerationNMTokens ')'

enumerationNMTokens->. (137)

enumerationNMTokens Goto 84

')' Reduce 137

'|' Reduce 137

State 82

( 73 )

notationType->'NOTATION' '(' .name notationTypeNames ')'

name Shift 85

State 83

( 75 )

tokenizedType->'ID' 'REF' . (106)

tokenizedType->'ID' 'REF' .'S'

tokenizedType->'ID' 'REF' . (106)

'S' Sh/Rd 108

'#IMPLIED' Reduce 106

'#FIXED' Reduce 106

'"' Reduce 106

''' Reduce 106

'#REQUIRED' Reduce 106

State 84

( 81 )

enumeration->'(' nmtoken enumerationNMTokens .')'

enumerationNMTokens->enumerationNMTokens .'|' nmtoken

'|' Shift 86

')' Sh/Rd 130

State 85

( 82 )

notationType->'NOTATION' '(' name .notationTypeNames ')'

notationTypeNames->. (139)

notationTypeNames Goto 87

')' Reduce 139

'|' Reduce 139

State 86

( 84 )

enumerationNMTokens->enumerationNMTokens '|' .nmtoken

nmtoken Sh/Rd 136

State 87

( 85 )

notationType->'NOTATION' '(' name notationTypeNames .')'

notationTypeNames->notationTypeNames .'|' name

'|' Shift 88

')' Sh/Rd 131

State 88

( 87 )

notationTypeNames->notationTypeNames '|' .name

name Sh/Rd 138

Lookahead States

State 89

(
60 )

'>' Sh/Rd 83

'*' Reduce 99

First Map for Nonterminals

stringType ==>> { 'CDATA'}

(doctypedecl misc*)? ==>> { Empty '<!DOCTYPE'}

utf8 ==>> { '\xEF\xBB\xBF'}

enumerationNMTokens ==>> { '\|' Empty}

nDataDecl? ==>> { 'NDATA' Empty}

aposEntityValueStart ==>> { '''}

markupdecl ==>> { '<!ATTLIST' '<!ELEMENT' '<!ENTITY' '<!NOTATION'}

doctypedecl ==>> { '<!DOCTYPE'}

peDef ==>> { 'SYSTEM' 'PUBLIC' '"' '''}

mixedNames ==>> { Empty '\|'}

tokenizedType ==>> { 'ID' 'ENTITY' 'NMTOKEN' 'ENTITIES'}

publicID ==>> { 'PUBLIC'}

notationTypeNames ==>> { '\|' Empty}

(doctypedecl misc*) ==>> { '<!DOCTYPE'}

entityValue ==>> { '"' '''}

misc* ==>> { pi comment Empty}

element ==>> { sTagName}

entityDef ==>> { 'SYSTEM' 'PUBLIC' '"' '''}

('\|' cp) ==>> { '\|'}

peDecl ==>> { '<!ENTITY'}

xmlDecl? ==>> { Empty '\xEF\xBB\xBF' '\xFF\xFE' '\xFF\xFE\x00\x00' '\xFE\xFF' '\x00\x00\xFE\xFF' utf16LEPrefix utf32BEPrefix utf32LEPrefix utf8Prefix utf16BEPrefix}

doctypedeclStart ==>> { '<!DOCTYPE'}

xmlPrefix ==>> { utf16LEPrefix utf32BEPrefix utf32LEPrefix utf8Prefix utf16BEPrefix}

externalID ==>> { 'SYSTEM' 'PUBLIC'}

attDef ==>> { nsAttName qName}

sTag ==>> { sTagName}

prolog ==>> { '\xEF\xBB\xBF' '\xFF\xFE' '\xFF\xFE\x00\x00' '\xFE\xFF' '\x00\x00\xFE\xFF' utf16LEPrefix utf32BEPrefix utf32LEPrefix utf8Prefix utf16BEPrefix pi comment '<!DOCTYPE' Empty}

cp ==>> { qName '\('}

('\[' intSubset '\]')? ==>> { Empty '\['}

markupdecl* ==>> { Empty '<!ATTLIST' '<!ELEMENT' '<!ENTITY' '<!NOTATION'}

defaultDecl ==>> { '#IMPLIED' '#FIXED' '"' ''' '#REQUIRED'}

enumeration ==>> { '\('}

contentspec ==>> { 'EMPTY' 'ANY' '\('}

attlistDecl ==>> { '<!ATTLIST'}

attValue ==>> { '"' '''}

('[\+\*\?]')? ==>> { '[\+\*\?]' Empty}

elementdecl ==>> { '<!ELEMENT'}

versionNum ==>> { version}

quotAttValueStart ==>> { '"'}

byteOrderMark? ==>> { Empty '\xEF\xBB\xBF' '\xFF\xFE' '\xFF\xFE\x00\x00' '\xFE\xFF' '\x00\x00\xFE\xFF'}

optExternalID ==>> { Empty 'SYSTEM' 'PUBLIC'}

(comment|pi) ==>> { pi comment}

choice ==>> { '\('}

utf16BE ==>> { '\xFE\xFF'}

children ==>> { '\('}

attType ==>> { 'CDATA' 'ID' 'ENTITY' 'NMTOKEN' 'ENTITIES' '\(' 'NOTATION'}

xmlDecl ==>> { '\xEF\xBB\xBF' '\xFF\xFE' '\xFF\xFE\x00\x00' '\xFE\xFF' '\x00\x00\xFE\xFF' utf16LEPrefix utf32BEPrefix utf32LEPrefix utf8Prefix utf16BEPrefix}

doctypedeclEnd ==>> { '>'}

('\|' cp)+ ==>> { '\|'}

document ==>> { '\xEF\xBB\xBF' '\xFF\xFE' '\xFF\xFE\x00\x00' '\xFE\xFF' '\x00\x00\xFE\xFF' utf16LEPrefix utf32BEPrefix utf32LEPrefix utf8Prefix utf16BEPrefix pi comment '<!DOCTYPE' sTagName}

sdDecl? ==>> { 'standalone' Empty}

entityDecl ==>> { '<!ENTITY'}

('\,' cp) ==>> { '\,'}

mixed ==>> { '\('}

utf32LE ==>> { '\xFF\xFE\x00\x00'}

utf32BE ==>> { '\x00\x00\xFE\xFF'}

notationType ==>> { 'NOTATION'}

('\[' intSubset '\]') ==>> { '\['}

('\,' cp)* ==>> { Empty '\,'}

versionInfo ==>> { 'version'}

enumeratedType ==>> { '\(' 'NOTATION'}

nDataDecl ==>> { 'NDATA'}

pubidLiteral ==>> { pubidLiteralMinusApostrophe pubidLiteralWithApostrophe}

('[\+\*\?]') ==>> { '[\+\*\?]'}

'#FIXED'? ==>> { Empty '#FIXED'}

attDef* ==>> { Empty nsAttName qName}

sdDecl ==>> { 'standalone'}

aposAttValueStart ==>> { '''}

doctypedeclContent ==>> { '\[' Empty}

encodingDecl? ==>> { 'encoding' Empty}

quotEntityValueStart ==>> { '"'}

misc ==>> { pi comment}

utf16LE ==>> { '\xFF\xFE'}

notationDecl ==>> { '<!NOTATION'}

seq ==>> { '\('}

intSubset ==>> { '<!ATTLIST' '<!ELEMENT' '<!ENTITY' '<!NOTATION' Empty}

geDecl ==>> { '<!ENTITY'}

byteOrderMark ==>> { '\xEF\xBB\xBF' '\xFF\xFE' '\xFF\xFE\x00\x00' '\xFE\xFF' '\x00\x00\xFE\xFF'}

encodingDecl ==>> { 'encoding'}

eq ==>> { '='}

Accept ==>> { '\xEF\xBB\xBF' '\xFF\xFE' '\xFF\xFE\x00\x00' '\xFE\xFF' '\x00\x00\xFE\xFF' utf16LEPrefix utf32BEPrefix utf32LEPrefix utf8Prefix utf16BEPrefix pi comment '<!DOCTYPE' sTagName}

Closure for Nonterminals

stringType ==>> {}

(doctypedecl misc*)? ==>> { doctypedecl doctypedeclStart ?{doctypedecl,misc?}}

utf8 ==>> {}

enumerationNMTokens ==>> {}

nDataDecl? ==>> { nDataDecl}

aposEntityValueStart ==>> {}

markupdecl ==>> { notationDecl geDecl peDecl entityDecl elementdecl attlistDecl}

doctypedecl ==>> { doctypedeclStart}

peDef ==>> { quotEntityValueStart aposEntityValueStart entityValue externalID}

mixedNames ==>> {}

tokenizedType ==>> {}

publicID ==>> {}

notationTypeNames ==>> {}

(doctypedecl misc*) ==>> { doctypedeclStart doctypedecl}

entityValue ==>> { aposEntityValueStart quotEntityValueStart}

misc* ==>> {}

element ==>> { sTag}

entityDef ==>> { quotEntityValueStart aposEntityValueStart entityValue externalID}

('\|' cp) ==>> {}

peDecl ==>> {}

xmlDecl? ==>> { byteOrderMark¿ utf8 utf16LE utf32LE utf16BE utf32BE byteOrderMark xmlDecl}

doctypedeclStart ==>> {}

xmlPrefix ==>> {}

externalID ==>> {}

attDef ==>> {}

sTag ==>> {}

prolog ==>> { xmlDecl byteOrderMark utf32BE utf16BE utf32LE utf16LE utf8 byteOrderMark¿ xmlDecl¿}

cp ==>> { choice seq}

('\[' intSubset '\]')? ==>> { ?{'\[',intSubset,'\]'}}

markupdecl* ==>> {}

defaultDecl ==>> { '#FIXED'¿}

enumeration ==>> {}

contentspec ==>> { mixed seq choice children}

attlistDecl ==>> {}

attValue ==>> { aposAttValueStart quotAttValueStart}

('[\+\*\?]')? ==>> { ?{'[\+\*\?]'}}

elementdecl ==>> {}

versionNum ==>> {}

quotAttValueStart ==>> {}

byteOrderMark? ==>> { utf8 utf16LE utf32LE utf16BE utf32BE byteOrderMark}

optExternalID ==>> { externalID}

(comment|pi) ==>> {}

choice ==>> {}

utf16BE ==>> {}

children ==>> { choice seq}

attType ==>> { enumeration notationType enumeratedType tokenizedType stringType}

xmlDecl ==>> { byteOrderMark utf32BE utf16BE utf32LE utf16LE utf8 byteOrderMark¿}

doctypedeclEnd ==>> {}

('\|' cp)+ ==>> { ?{'\|',cp}}

document ==>> { xmlDecl¿ byteOrderMark¿ utf8 utf16LE utf32LE utf16BE utf32BE byteOrderMark xmlDecl prolog}

sdDecl? ==>> { sdDecl}

entityDecl ==>> { peDecl geDecl}

('\,' cp) ==>> {}

mixed ==>> {}

utf32LE ==>> {}

utf32BE ==>> {}

notationType ==>> {}

('\[' intSubset '\]') ==>> {}

('\,' cp)* ==>> {}

versionInfo ==>> {}

enumeratedType ==>> { notationType enumeration}

nDataDecl ==>> {}

pubidLiteral ==>> {}

('[\+\*\?]') ==>> {}

'#FIXED'? ==>> {}

attDef* ==>> {}

sdDecl ==>> {}

aposAttValueStart ==>> {}

doctypedeclContent ==>> { ?{'\[',intSubset,'\]'} ?{'\[',intSubset,'\]'}¿}

encodingDecl? ==>> { encodingDecl}

quotEntityValueStart ==>> {}

misc ==>> { ?{comment|pi}}

utf16LE ==>> {}

notationDecl ==>> {}

seq ==>> {}

intSubset ==>> { markupdecl?}

geDecl ==>> {}

byteOrderMark ==>> { utf32BE utf16BE utf32LE utf16LE utf8}

encodingDecl ==>> {}

eq ==>> {}

Accept ==>> { prolog xmlDecl byteOrderMark utf32BE utf16BE utf32LE utf16LE utf8 byteOrderMark¿ xmlDecl¿ document}

Nullable Nonterminals

stringType ==>> false

(doctypedecl misc*)? ==>> true

utf8 ==>> false

enumerationNMTokens ==>> true

nDataDecl? ==>> true

aposEntityValueStart ==>> false

markupdecl ==>> false

doctypedecl ==>> false

peDef ==>> false

mixedNames ==>> true

tokenizedType ==>> false

publicID ==>> false

notationTypeNames ==>> true

(doctypedecl misc*) ==>> false

entityValue ==>> false

misc* ==>> true

element ==>> false

entityDef ==>> false

('\|' cp) ==>> false

peDecl ==>> false

xmlDecl? ==>> true

doctypedeclStart ==>> false

xmlPrefix ==>> false

externalID ==>> false

attDef ==>> false

sTag ==>> false

prolog ==>> true

cp ==>> false

('\[' intSubset '\]')? ==>> true

markupdecl* ==>> true

defaultDecl ==>> false

enumeration ==>> false

contentspec ==>> false

attlistDecl ==>> false

attValue ==>> false

('[\+\*\?]')? ==>> true

elementdecl ==>> false

versionNum ==>> false

quotAttValueStart ==>> false

byteOrderMark? ==>> true

optExternalID ==>> true

(comment|pi) ==>> false

choice ==>> false

utf16BE ==>> false

children ==>> false

attType ==>> false

xmlDecl ==>> false

doctypedeclEnd ==>> false

('\|' cp)+ ==>> false

document ==>> false

sdDecl? ==>> true

entityDecl ==>> false

('\,' cp) ==>> false

mixed ==>> false

utf32LE ==>> false

utf32BE ==>> false

notationType ==>> false

('\[' intSubset '\]') ==>> false

('\,' cp)* ==>> true

versionInfo ==>> false

enumeratedType ==>> false

nDataDecl ==>> false

pubidLiteral ==>> false

('[\+\*\?]') ==>> false

'#FIXED'? ==>> true

attDef* ==>> true

sdDecl ==>> false

aposAttValueStart ==>> false

doctypedeclContent ==>> true

encodingDecl? ==>> true

quotEntityValueStart ==>> false

misc ==>> false

utf16LE ==>> false

notationDecl ==>> false

seq ==>> false

intSubset ==>> true

geDecl ==>> false

byteOrderMark ==>> false

encodingDecl ==>> false

eq ==>> false

Accept ==>> false