SymbiFlow/uxsdcxx

sequences accept the wrong inputs

Closed this issue · 0 comments

duck2 commented
  <xsd:sequence>
     <xsd:element name="isbn" type="isbn"/>
     <xsd:element name="title" type="title"/>
     <xsd:element name="genre" type="genre"/>
     <xsd:element name="author" type="author" maxOccurs="unbounded"/>
   </xsd:sequence>

generates this state machine:

enum class gtok_t_book {ISBN, TITLE, GENRE, AUTHOR};
[...]
int gstate_t_book[NUM_T_BOOK_STATES][NUM_T_BOOK_INPUTS] = {
	{0, -1, -1, -1},
	{0, -1, -1, -1},
	{-1, 1, -1, -1},
	{-1, -1, -1, 2},
	{-1, -1, 3, -1},
};

where initial state is 4 and accept state is 0.
This implies an expected input of "author genre title isbn isbn isbn ..." which is the complete reverse of the described DFA.