« first day (3776 days earlier)      last day (4 days later) » 

3:19 AM
posted on March 03, 2021 by hostilefork

This is a small step toward broadening the applications of SET-WORD! and GET-WORD! in the parse dialect. The idea is that SET-WORD! will be used for capturing more than just parse positions, so the general purpose HERE rule can be used in the case that the parse position is what you want. If you use a lone SET-WORD! without HERE after it, the near-term behavior for that will be to raise

 
3:42 AM
posted on March 03, 2021 by hostilefork

Working with assignments in UPARSE via SET-WORD!s has convinced me that it's the right strategy. I was a little hesitant before because it might make PARSE code "look too much like DO code". But the reality seems to suggest that's not so much of an issue. At least...if you have a problem with dialects looking "kind of like other Rebol code because it uses the same bricks"...you

 
 
4 hours later…
7:36 AM
posted on March 03, 2021 by hostilefork

Background The general concept of a parser combinator is that it processes some amount of input and returns the remainder...but also typically returns a value of arbitrary type. So if you want to get an IP address structure from a string, you would build a combinator for that out of a combinator that gave an integer from a string...and a combinator that could detect a dot and ski

 
 
13 hours later…
8:49 PM
posted on March 03, 2021 by hostilefork

Has anyone ever actually used THEN? Does anyone actually understand what it's for? Red describes it as: then : regardless of failure or success of what follows, skip the next alternate rule But the easiest way to think of it is that these two things are equivalent: rule1 THEN rule2 | rule3 [rule1 (cont: rule2) | (cont: rule3)] cont It doesn't fit into the combinator model

 
9:37 PM
posted on March 03, 2021 by hostilefork

So there's a bit of an issue with the NOT combinator in UPARSE. It fails when the rule you give it as a parameter succeeds: >> uparse [1] [not integer!] ; fails... because it *was* an integer ; null The NOT combinator received information about how much of the input the INTEGER! matched. But it threw that information away. So what if you tried to negate it again...with

 

« first day (3776 days earlier)      last day (4 days later) »