SynthMaker

Parser requests

Archive · 2009 5 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

mwvdlee ·

Hi,

I've been running the 30-day trial version of Synthmaker for a while now to try and figure if it's worth the hefty price or not. So far so good and my experimental code is coming along nicely even though I'd really prefer to do some things in procedural code. Right now I'm working on parsing configuration info (filenames, settings, etc) from text files and notice some things I find missing in the parser kit. I've build parsers and parser frameworks in the past and Synthmaker just (IMHO) seems to be lacking some common constructs, such as...

"Set" parser, which matches any single character from a specified string.

"Any" parser (commonly depicted with "." (dot)), which matches any single character.

"Not"/"Except" parser (commonly depicted with "-" (minus)), which matches zero-length string when specified rules do NOT parse. (basically an "anything but this" parser).

"And" parser, which requires two sets of rules to both match. Returning the longest string) Note that a "and(any, not(set("...")))" construct would now be possible too!

The ability to disable whitespace skipping (either globally or locally). (and, linked to this, a specific whitespace parser)

Numbered iteration parser, * matches 0-infinite times, + matches 1-infinite times, a parser (or set thereof) that takes two input integers for the upper- and lower bound of iterations would be useful.

It'd also be nice if the "sequence" and "or" parsers could allow any number of outputs like how the Multiplex module handles this.

p.s. I can't shake the feeling the Parser kit is made using the C++ Spirit framework, or am I mistaken? It's just very uncommon to see "!" used for optional and the only other time I've ever seen it is with that framework.

-- Martijn

infuzion ·

Welcome to SM mwvdlee!

Good suggestions, but... urm... no one has posted anything about that still-"experimental" parsing system in maybe 1.5 years? I don't think it is used much anymore.

mwvdlee ·

infuzion wrote: Welcome to SM mwvdlee!

Good suggestions, but... urm... no one has posted anything about that still-"experimental" parsing system in maybe 1.5 years? I don't think it is used much anymore.

Then what are people using these days to parse text files and such, assuming that people do use text files? The presets system is fine for many cases, but I don't see how to use it for cases where you need to change just part of the settings. In my particular case I'd like to parse MIDI keymappings and try my hands at a meta language.

infuzion ·

There is a tone remapper like 3 years ago that uses the parser I think, so that can help with the MIDI remapper for you. String Array stuff & String Extract I think are more commonly use for text manipulation now.

Eska ·

I use it for importing TUN files, string calculation is too slow for bigger lists.

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.