>>>>>> "Gnter" == Gnter Nagler
> >> What exactly is a midi parser?
> Gnter> MIDI data is a series of numbers and before
> playing or Gnter> editing these numbers must be
> interpreted correctly Gnter> (e.g. distinguish
> between pause and commands, collecting Gnter>
> parameters for each command). The MIDI parser is a
> part of Gnter> the MIDI software that knows the MIDI
> data format and Gnter> interpretes the meaning of
> the numbers. The parser is used Gnter> for reading
> MIDI files and also for incoming MIDI data Gnter> from
> MIDI cable.
> Gnter> Compare with a language: a parser analyses
> grammar of a Gnter> sentence and meaning of the
> words. Similiar is done for Gnter> "language" MIDI.
> In the case of Midi it is not a real parser that is
> required, just a finite automaton. Parsing usually
> involves recursion, where the parser needs to call itself
> for a part of it's input. A Midi parser is just a regular
> expression matcher, which corresponds to the lexing and
> not the parsing stage of languages.
In any case, if you want small code and tight integration with C++,
you might be interested to check out the Boost.Spirit parser at:
http://spirit.sf.net or at http://www.boost.org
Joel de Guzman
joel at boost-consulting.com