| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
Make more use of the parser library for parisng instead of driving it
mostly through program logic. Also try more to populate the
CubaseProject struct during parsing.
For now we also mostly ignore container nodes. List them to the
terminal, but we only care about parsing the actial object nodes. This
may change in the future, but for now looks like a useful strategy.
|
| |
|
|
|
|
|
|
| |
Make it explicit what container and object tags we're expecting. Even
though we're not using that information, the parser will expect all
elements to be in place, and fail if they are not.
|
|
|
|
|
| |
The sub parser is applied to the chunk payload, and the returned output
is the output of the sub parser.
|
| |
|
| |
|
|
|
|
| |
Stop parsing at terminating null instead of searching for it afterwards.
|
|
|
|
|
|
| |
This is the meat of the file, and the majority of the data. Don't expect
this to be trivial, or how much of it I really need to understand. Let's
take it slowly and see where it takes us.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Parsing the chunks separately was not a good idea. The file layout seems
to be alternating ROOT and ARCH chunks, where the ROOT chunk describes
what kind of data to expect in the following ARCH chunk.
That is:
+------+------+------+
| RIFF | SIZE | NUND |
+------+------+------+------+ \
| ROOT | SIZE | NAME | TYPE | |
+------+------+------+------+ > One unit
| ARCH | SIZE | DATA.... | |
+------+------+-------------+ /
:
:
+------+------+------+------+ \
| ROOT | SIZE | NAME | TYPE | |
+------+------+------+------+ > Last unit
| ARCH | SIZE | DATA.... | |
+------+------+-------------+ /
EOF
The NAME and TYPE are counted (and possibly zero terminated) strings
describing the name of the following chunk (e.g. "Version"), and data
type (e.g. "PAppVersion") respectively.
The order of the chunk pairs does not seem significant, but the pairs
are always a ROOT chunk followed by an ARCH chunk.
|
|
|
|
|
| |
With the Node Enum, we don't need to unwrap the contents just for s
debug printout.
|
| |
|
|
|
|
|
| |
This way I can pass the node name and the mysterious number up to the
parent parsers.
|
| |
|
|
|
|
|
|
| |
Only, now the root_chunk parser will return the value it has parsed, so
it can be used outside of the parser. Not used for anything other than
printing the information for now, though.
|
|
|
|
|
|
| |
Split the file into chunks (with their payload) to begin with. This way
it will be easier to parse each chunk separately. At least that's the
idea. Let's see how it goes.
|
| |
|
|
|
|
| |
No longer needed after cmstring strips the null terminator.
|
| |
|
| |
|
| |
|
|
Experimenting with reading Cubase project files using the nom parser
library for Rust.
|