Calling fromLocal8Bit() for literals is wrong, since that depends
ont the user's environment. We use latin1 strings exclusively in Qt.
Change-Id: I0cd0986787ea630425773672d3a892fbd0f0a77a
Reviewed-by: hjk <hjk121@nokiamail.com>
NonNegativeNumberNode<base>::mangledRepresentationStartsWith is used by
the tests, so moving that implementation to the .h file
Change-Id: I42267030dcbd9d128d5cc165a8d688a68354eb90
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Fix gdmi escape routine by using a traits class to adapt
QByteArray/QString.
Change-Id: Ic6d2a0c927e4613aec9f69095bbb04a393e9edb9
Reviewed-by: hjk <qthjk@ovi.com>
- Compile with QT_NO_CAST_FROM_ASCII.
- Remove single character string constants.
Change-Id: Icece98619b6c30e047d3fce00e6ae74bbcd53c67
Reviewed-by: hjk <qthjk@ovi.com>
Also try to collapse references as much as it is possible with the
current design.
Change-Id: I1de55eac2d681a36f8b77d77968c4a06d19b6fac
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
Hard to test at the moment: gcc and clang produce different manglings,
neither of which c++filt can decode.
Change-Id: Ic4ad8887a3ad76086cd8be911334dda21afa85db
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
The new stuff is mostly C++11 features (closures etc.).
Also fix a number of bugs uncovered along the way.
All tests succeed now, including the examples
from the specification.
Change-Id: I9b224b0dd82ad8f5b17d5f5d1809d1dea1a7a803
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
- Fix assertion macro.
- Make parse tree smaller by getting rid of nodes that serve no purpose.
- Add all examples from the ABI spec to the auto test.
Change-Id: Id63d8330e6380bfb7d56acd1d445f7b70a1f6e70
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Now all the parsing logic as well as the stringification is in the tree
nodes.
Change-Id: Ie8222729c14c0102d94045026fc61a75cd31cc63
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
So far, we converted the mangled to the demangled representation on the
fly while parsing. Because some demangled strings look different
depending on higher-level context, awkward string manipulations were
then necessary at some later point.
The new solution is much more easily maintainable, creating a tree with
a node for every rule in the grammar first and converting the complete
tree to the demangled string later.
Change-Id: I59088df259611d7cd78af47b81b6a21d628a787f
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>