World: r3wp
[Parse] Discussion of PARSE dialect
older newer | first last |
Ladislav 13-Apr-2007 [1720] | parse "" [(result-of-expression: compute-something) check-result] |
btiffin 13-Apr-2007 [1721] | guru question; Will a utype! definition be allowed to wrap builtins? SNMP MIBs require a fairly heavy weight tuple! But will a short MIB conflict with internal scans of tuple! or do utype! scans take some form of precedent? I've become curious, yet remain dumb enough to not know. |
Oldes 14-Apr-2007 [1722x5] | Isn't this a bug? >> parse [a/b] [a/b] ** Script Error: a has no value ** Near: parse [a/b] [a/b] |
I don't want the a to be evaluated in the parse rules! | |
hm... ech.. I'm stupid.. normaly is evaluated as well, so it's not a bug.. but is there any way how to parse specific path! ? | |
I mean: >> parse [a] ['a] == true >> parse [a/b] ['a/b] == false | |
Brian: only Carl probably knows that. | |
ChristianE 14-Apr-2007 [1727] | >> parse [a/b] [(path: 'a/b) path] == true >> parse [a/c] [(path: 'a/b) path] == false |
Oldes 14-Apr-2007 [1728] | that works, but it's ugly:( |
Gabriele 14-Apr-2007 [1729] | older versions did not evaluate paths. since newer version do, we need 'a/b to work. dunno if this is in RAMBO... but it needs to be fixed. |
Oldes 14-Apr-2007 [1730x4] | Yes I know they were not evaluated before, but I'm not sure if it's not a feature, that they are evaluated now. |
I just think, that maybe it would be good to have parse [a/b] ['a/b] == true as is parse [a] ['a] | |
But I'm not sure at all. | |
..because it would not be useful anyway as I would have to write a special rule for each refinement. | |
Gabriele 14-Apr-2007 [1734] | it's not a bug that they are evaluated (in fact it was requested in a rambo ticket). it's a bug that - since now they are evaluated - lit-paths are not used to match paths. |
Anton 14-Apr-2007 [1735] | Maybe if the result of parens were parsed, we could use a paren to evaluate a path (and don't use a paren to leave as is). |
BrianH 16-Apr-2007 [1736x2] | What's the status on implementing the PARSE suggestions that we hammered out months ago? |
Many of the requests here would be handled easily by the extensions we proposed last year. | |
Gabriele 16-Apr-2007 [1738x2] | it looks like that 3.0 won't have a new parse, but i don't have any details and i'm just guessing. |
it's also true that some requests could be implemented rather easily... so maybe they can make it in for the first release. | |
PeterWood 16-Apr-2007 [1740] | Does that imply there won't be a Unicode Charset with which to parse unicode strings? |
btiffin 16-Apr-2007 [1741x2] | There is going to be a unicode! datatype |
sorry. Didn't finish...hit wrong key... but I'm not sure what that means for charsets | |
Henrik 17-Apr-2007 [1743] | Perhaps vector! will play a part in solving the unicode problem |
Pekr 17-Apr-2007 [1744] | having Unicode datytype does not mean we have unicode datatype ;-) |
Gabriele 17-Apr-2007 [1745] | you can make a bitset with 65000 bits in r2... so why not in r3? |
Pekr 17-Apr-2007 [1746x2] | Gabriele - how do you create unicode (mostly 16bit, or varrying) charset in R2? :-) |
btw - pity R3 does not integrate any parser helpers, which could make life easier | |
Ladislav 17-Apr-2007 [1748] | what do you mean by "does not integrate" and by "parser helpers"? |
Pekr 17-Apr-2007 [1749x3] | helpers = suggestions ... historically there were 2 or 3 lists with various suggestions, to some of them even Carl said he could consider to add them. First one was Robert's site, next one was yours, and several times ono various altme channels? |
I don't know, as for me, I just wanted to|thru [a | b | c] :-) | |
I would let others more skilled parse gurus to raise their wishes ... | |
Gabriele 17-Apr-2007 [1752x2] | petr, i didn't say r3 won't improve on parse, i said that the first release may not have the new features. |
we won't stop at 3.0... there will be a 3.1 and so on... at least we hope so :) | |
Gabriele 18-Apr-2007 [1754x3] | (lost my connection yesterday night and the message i was typing...) |
parsing utf-8 in r2 is easy. utf-16 and utf-32 are less confortable but should be easy too. | |
of course with r3 it's much easier because - i guess - you can just parse the unicode! string. | |
Rebolek 24-May-2007 [1757] | Is it possible to combine two bitset!s? |
Maxim 24-May-2007 [1758] | using 'union |
Rebolek 24-May-2007 [1759x2] | great, thanks! |
Is there some way to make this work: parse "aaa" [some "a" "a"] or PARSE just don't work this way? | |
Geomol 24-May-2007 [1761] | What do you mean? >> parse "aaa" [some "a"] == true Why the second "a"? |
Rebolek 24-May-2007 [1762] | It may seem strange I know, but this is automaticaly created rule |
Geomol 24-May-2007 [1763] | Parsing for [some "a" "a"] will return false, because you've already parsed past the "a"s. |
Rebolek 24-May-2007 [1764] | OK I need to find some other way :) Is it possible to go back in parse? -1 skip doesn't seem to work. |
Geomol 24-May-2007 [1765] | I was thinking the same. I seem to remember, that at some time (some version of REBOL), -1 skip did work!? Hmm... |
Rebolek 24-May-2007 [1766] | Wasn't it just proposed for R3? |
Geomol 24-May-2007 [1767] | A clumsy way of doing it: >> parse "aaa" [some "a" p: (p: skip p -1) :p "a"] == true |
Rebolek 24-May-2007 [1768] | OK thanks, that may help |
Anton 24-May-2007 [1769] | That's not so clumsy. You want to backtrack and that's what you're doing. |
older newer | first last |