How to implement an MCI parser in java
<p>I want to parse an mci file format for storing petri net unfolding prefixes in java so that I can use it to generate SAT formula</p>

<p>the below text describes the MCI file format for storing
Petri net unfolding prefixes. </p>

<p>Below, CHAR is a 1-byte char, and UINT4 is a little-endian
(i.e. the least significant byte is at the lowest address,
and the other bytes follow in increasing order of
significance.) 4-byte unsigned int (Intel is little-endian).</p>

<ul>
<li><p>the total number of conditions (UINT4)</p></li>
<li><p>the total number of events (UINT4)</p></li>
<li><p>for each event (from first to last):
-- the number of the original transition (UINT4)</p></li>
<li><p>for each condition (from first to last):
--  the number of the original place (UINT4)
--  the number of the preset event (UINT4); 
    it's 0 if the condition is initial
--  NULL(UINT4)-terminated list of postset events numbers (UINT4)</p></li>
<li><p>for each cut-off event
--  the number of cut-off event (UINT4)
--  the number of corresponding event (UINT4) or 
    NULL(UINT4) if the corresponding event is the 
    virtual initial event </p></li>
<li><p>separating NULL(UINT4)</p></li>
<li><p>for each configuration:
-- NULL(UINT4)-terminated list of events numbers. 
   (This is used by some ancient model checker; 
   PUNF doesn't create it and just outputs the 
   terminating NULL(UINT4).)</p></li>
<li><p>separating NULL(UINT4)</p></li>
<li><p>the total number of places in the original net (UINT4)</p></li>
<li><p>the total number of transitions the in original net (UINT4)</p></li>
<li><p>the maximal string length for place/transition names (UINT4) 
(useful for memory allocation in the parser)</p></li>
<li><p>for each place in original net:
-- the name (NULL(CHAR)-terminated string)</p></li>
<li><p>separating NULL(UINT4)</p></li>
<li><p>for each transition in original net:
-- the name (NULL(CHAR)-terminated string)</p></li>
<li><p>terminating NULL(UINT4).</p></li>
</ul>

<p><em><strong>Note : I have got the implementation in C++ but I want it in java. For your info. I have used so many tools to convert it to java but none of them worked completely. So, I will appreciate any help from you guys.More, I ll put the code in C++ if needed.</em></strong></p>
