I was using the solidity grammar specification https://github.com/ethereum/solidity/blob/develop/docs/grammar.txt to write a parser in Smalltalk. After coding a first version of the parser, I started to test examples from the solidity documentation https://media.readthedocs.org/pdf/solidity/develop/solidity.pdf. I was surprised that many examples did not work, mostly because the documentation is not consistent with the grammar specification.
I am just going to show one simple example of these inconsistencies. In the grammar, string literals are written by double quotes only (line 125). On the other hand, the documentation specifies that string literals are written with either double or single quotes (page 41). This is just one of many inconsistencies I found by a quick look at the documentation.
So, my question is which one is the most correct? The grammar or the documentation? I need to know which one I must take into account to write a parser that can handle solidity.
Edit: Here is the current Pharo/Smalltalk Solidity Parser, in case anyone wants to see. https://github.com/hscrocha/SmaCC-Solidity
Edit 2: I saw that a few days ago the Solidity grammar was updated on github. This update did not fix the inconsistencies I found between the grammar and documentation.
Thanks and best regards,