On Mon, Aug 25, 2014 at 09:23:58PM +0100, Thomas Adam wrote: > On Mon, Aug 25, 2014 at 08:04:16PM +0100, Dominik Vogt wrote: > > No need to apologise for anything. Maybe, if we could agree that > > you work through the command list from the beginning, I could do > > some work at the end when there's time. > > And eventually meet in the middle? :) OK, I can do that. I fear > though that working from the end you're going to encounter a slightly > harder time in terms of definition.
That's fine with me. After all, many of these parsing classes were written by me. I've got up to warptowindow now (pushed). Maybe you want to skip the conditional commands and the direction definitions because I'm already doing that (all added at the end, we can clean that up later). > Note that we're accumulating a number of outstanding definition, notably > these: > > TOKEN > STRING > RESTOFLINE > RESTOFLINE_COMMAND Actually, we won't be able to capture the tokenisation in the Abnf. At the moment we're more writing down the semantics without caring about whitespace, linebreaks, quoting and tokens. Let's continue this work for now; I need to get a feeling what tokenisation really means in terms of writing Abnf. > In my mind, all of these boil down to either an option, or a > command---certainly in the case of TOKEN/STRING; there's very little > semantic difference between the two. Er, my uses of STRING up to now mean just "something that I don't know how to define at the moment". :-) > With respect to RESTOFLINE/RESTOFLINE_COMMAND, are these syntatic > placeholders for specific things, or can these be generalised to either > OPTION and COMMAND, respectively? They are actually the same and differ only in name which is just a comment how the rest of the line is going to be used later. The definition of RESTOFLINE is actually "skip whitespace after the last parsed token, then take everything that remains on the line literally". Well, unless the last parsed unit is not a token; skipping trailing whitespace is actually part of tokenisation. Soner or later we need to define character classes that describe strings, quoting etc. Let me think about that. Ciao Dominik ^_^ ^_^ -- Dominik Vogt
