[REBOL] parse problem

2003-11-16 Thread Patrick . Philipot
Hi List I have being struggling all day with a parse problem: extracting all strings from a Rebol script. It may seem trivial at the first look. However as you know strings are delimited by a pair of () or by ({) and (}) and inclusions are allowed. {Hello vous} and Salut {you} are valid

[REBOL] Parse limitation ?

2003-10-08 Thread patrick la poste
Hi List, I'd like to parse a string searching for two things at the same time. it seems to me that this is impossible. For example, a text from which I want to extract the HREF and the SRC target. myText: {A HREF=#section1IMG SRC=foobar.gifA HREF=#section1} parse myText [ any [ thru

[REBOL] Parse rules for Rebol values

2002-09-22 Thread Andrew Martin
Rebol has these: time?-- for testing a value to see if it's a time! value. time!-- to indicate a value of time! type. time -- a generic value that contains a time! value. What would be a suitable name for a parse rule that picks out a time value from text? How

[REBOL] parse/recycle bug

2002-09-13 Thread Ladislav Mecir
Hi all, Romano wrote a small macro interpreter. I simplified it a bit, used two variants (the second variant uses explicit RECYCLE command) and here are my results: delimit: [*(] notpar: complement charset ) compose-string: function [ [catch] String [string!] /trace ][ macro

[REBOL] parse crash proposed new parse behaviour

2002-09-12 Thread Anton
Hello, run the first parse below for a nice crash. :P Crashes on these windows versions: - a clean REBOL/View 1.2.8.3.1 3-Aug-2002 (beta) - a clean REBOL/View 1.2.1.3.1 21-Jun-2001 - Rebol/Link 1.0.2.3.1 25-Mar-2002/14:58:06-8:00 (clean meaning no user defined functions in user.r etc.)

[REBOL] parse crash - (was: Re: parse consumption)

2002-09-11 Thread Anton
Well, here is a simple example, tested on a clean REBOL/View 1.2.8.3.1 3-Aug-2002 (beta) and a clean REBOL/View 1.2.1.3.1 21-Jun-2001 I could probably do some more experiments and figure out some more details, but anyway: --- crash: func [demonstrates a bug in parse that crashes rebol

[REBOL] Parse types - was Re: Sort by first part of line

2002-09-07 Thread Brett Handley
parse/all data [ some [ h: any copy num integer! I must have missed this or knew it and lost it from memory, but I didn't realise you could parse string data by specifying a datatype (I knew it for blocks of course - they are already loaded). So: parse {3} [integer!] == true

[REBOL] parse Slashdot news headers

2002-07-06 Thread Andrew Martin
Joanna wrote: Has anyone made REBOL script that could parse Slashdot news headers and view them on small window? All info (including links to files) are on http://slashdot.org/code.shtml There is no example on REBOL. IMHO it woud make an nice example how REBOL/VIEW can be used. I looked

[REBOL] Parse Question: html-to-text conversion help.

2002-05-01 Thread alan parman
I have a working html-to-text converter, but would like to add the links to the text as well. The following parse rule works well to extract only the links... link: [some [thru a href= copy lnk to (append text lnk)]] ... but is there any way to add this to the converter below? I'm

[REBOL] parse stack overflow

2002-03-09 Thread Jose (jm)
Can anybody give me any hints why this small script causes stack overflow ? thanks Jose REBOL [] txt-parser: make object! [ text: make string! 3 html-code: [ [ thru ] | copy txt to (append text txt) ] parse: func [source [string!]] [ clear

[REBOL] Parse This

2002-02-11 Thread Hans-Erik
Hiyas all:-))) I have just downloaded REBOL/view and have startet playing with nntp.r and have stumpled into some problems. I have no problems connection to the news-server and getting the subject-lines from the news-group i'm interrested in. But here comes the problem. I receive them in one

[REBOL] parse vs. load/markup (a bit long)

2002-01-24 Thread Hallvard Ystad
Hello folks, I have a script that loads a given HTML page, parses it, and triggers different actions for the different tags it comes across. For the parsing, I have a parse rule that I invoke like this (those of you who don't bother reading all the code, skip to the bottom to see some

[REBOL] Parse experiments: help needed

2001-11-27 Thread Cassani Mario
Hallo all, I am (still) experimenting how to colourise email texts using Cyphre's color-text.r style. The script already colourise in a slrn-like style the messages I receive but something is still missing. What I need now is to make bold the strings delimited with #*, underline the ones

[REBOL] Parse: Restaring rule evaluation

2001-11-15 Thread Robert M. Muench
Hi, I have found out that 'parse restarts the rule evaluation at the top as soon as one rule could be satisfied. Wouldn't it be faster to continue to evaluate the rest of the rules? Further it would be possible to solve some parsing problems easier if rule ordering could be used. Robert -- To

[REBOL] parse to x or end

2001-05-01 Thread ryan . christiansen
The following syntax is incorrect. Is there any way to accomplish my intentions? parse/all sample [copy text to [- | end] (print text)] Ryan C. Christiansen Web Developer Intellisol International 4733 Amber Valley Parkway Fargo, ND 58104 701-235-3390 ext. 6671 FAX: 701-235-9940

[REBOL] parse-header

2001-04-30 Thread ryan . christiansen
Can anyone point me to usage documentation for 'parse-header? Using 'help, I get the following, but I'm still not sure what 'parse-header is used for? (I'm trying to digest mime-model.r and it uses 'parse-header) help parse-header USAGE: PARSE-HEADER parent data DESCRIPTION: Returns

[REBOL] PARSE question

2001-03-30 Thread David Vydra
We are parsing large files as blocks. If there is an error somewhere, how can we find out where the error was? Can we get a count of items parsed correctly? Thanks dv = please reply to: [EMAIL PROTECTED] __ Do You Yahoo!? Get email at your

[REBOL] parse oddity

2001-03-26 Thread Fantam
Hello, Is the following behavior expected? parse "html" ["html" | "htm"] == true and parse "html" ["htm" | "html"] == false (the above is what bothers me) while: parse "htm" ["html" | "htm"] == true and parse "htm" ["htm" | "html"] == true thanks in advance, fantam --

[REBOL] Parse doing weird things...

2001-03-19 Thread Mat Bettinson
Heya, While I'm at it; I've noticed this issue repeatedly in my data mining scripts. The parse command sometimes just will not work with the following format; webpage: read http://www.yaddayadda.com datamine: make string! "" parse webpage [thru "something" copy datamine to "somethingelse"] In

[REBOL] ~parse-xml

2001-01-22 Thread David Vydra
is there a function that reverses parse-xml; builds xml from the block? regards david example: s: "aHello/a" parse-xml s = [document none [["a" none ["Hello" __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices.

[REBOL] 'parse trick and 'unset

2000-12-16 Thread Shannon Baker
Anton wrote: Try this out: line1: "Julie1234" id: [thru "" 3 4 digits ""] rule: [a: some [id | [skip b:]] (print copy/part a b)] parse line1 rule Nice trick, I would never have thought of it. It will really be useful for 'extract rule checking (see my last post). I was surprised by the

[REBOL] 'Parse is peculiar! - more details

2000-12-14 Thread Shannon Baker
NOTE: I think my last reply was blocked due to having one 'Re:' too many in the sunbject line. If you already read this please ignore. Message Begins Thanks Peter and Andrew, you both know your 'parse. Unfortunately your answers didn't help me with the first

[REBOL] 'Parse is peculiar!

2000-12-13 Thread Shannon Baker
Hi REBOL Community, The REBOL philosophy goes "Simple things should be simple". Well I have to say that the 'parse function is an exception! I've had to use it extensively for parsing log files but it has literally taken me months to do simple things - compared to a few weeks for the rest of the

[REBOL] parse examples?

2000-11-01 Thread balayo
Hey list, none of my mail has been leaving my computer lately, so sorry if this turns out to be a repeat queston. Does anyone have a list of parse examples? I have the ones from all the current documentation, but was thinking more along the lines of "a parse for any occasion". This time, I'd

[REBOL] parse, I think

2000-09-30 Thread balayo
-- Spend less time composing sigs. -tom

[REBOL] parse, I think, (again)

2000-09-30 Thread balayo
hey guys, sorry about that blank post. If given a block, ["text, text -b text --b , text"], how do I replace -b and --b with b and /b, respectively? -- Turn your computer off. Go outside. -tom

[REBOL] parse, I think, (again) Re:

2000-09-30 Thread Al . Bri
tom wrote: If given a block, ["text, text -b text --b , text"], how do I replace -b and --b with b and /b, respectively? This is the most direct way: block: ["text, text -b text --b , text"] == ["text, text -b text --b , text"] string: copy first block == "text, text -b text --b , text"

[REBOL] parse or Re:(5)

2000-09-21 Thread rryost
- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 20, 2000 10:00 PM Subject: [REBOL] parse or Re:(4) Ahh, but this is not enough, because if the report has more than one newline character following a paragraph, you will end up with empty paragraphs. But what if

[REBOL] parse or Re:(6)

2000-09-21 Thread joel . neely
[EMAIL PROTECTED] wrote: Sure. In the interests of advancing its popularity, I offered up a simplistic example of PARSE. :-) Paragraphs can end in a variety of punctuation ("!?.-;:), with different quantities (as Russ pointed out), no? -jeff Sure! Nothing wrong with simple

[REBOL] parse or Re:(6)

2000-09-21 Thread joel . neely
Hi, Ryan... [EMAIL PROTECTED] wrote: [snip] You missed another option, which I had been using previously. Here is the function: [snip] In other words, replace all instances of a set of characters with a new character that can be recognized later... You're absolutely right! Thanks

[REBOL] parse or Re:(6)

2000-09-21 Thread joel . neely
r of every conceivable paragraph! Russell [EMAIL PROTECTED] - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 20, 2000 10:00 PM Subject: [REBOL] parse or Re:(4) Ahh, but this is not enough, because if the report has more than on

[REBOL] parse or Re:(6)

2000-09-21 Thread norsepower
Point well-taken. It seems I have forgotten the KISS law. -Ryan "Keep It Simple, Stupid." So what? Seems the application that's going to use the block of paragraphs could easily deal with the "" for an empty paragraph. To me, that's preferable than trying to outguess the final character of

[REBOL] parse or Re:(7)

2000-09-21 Thread brett
Hey Joel, Re-remembering the subtle differences between BNF and REs was (for me, at least) the hardest part of getting productive with parse . It would be really handy if you (or others) could list some of the differences you refer to. I've never actually used REs but have read up on them

[REBOL] parse or Re:(7)

2000-09-21 Thread norsepower
Ahh, yes, of course, the reason for my dilemma in the first place. "Paragraphs" are much different animals than "lines." I don't think that just breaking on {^/} solves the problem as posted. The objective, as I read it, was to break on PARAGRAPHS (not lines) where a paragraph is defined as the

[REBOL] parse or Re:(7)

2000-09-21 Thread RChristiansen
"plain English.") The function follows... REBOL [] parse-paragraphs: func [ "Parse a document into a block of paragraphs." document [string!] "the document to be parsed" ][ paragraph-block: copy [] current-paragraph: copy "" stopper: cha

[REBOL] parse or Re:(7)

2000-09-21 Thread rryost
t position to define what he means by "paragraph". As I recall the original problem, paragraphs *were* defined "according to Joel". .Russell [EMAIL PROTECTED] - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, September 21, 2000 5:08 AM S

[REBOL] parse or Re:(8)

2000-09-21 Thread joel . neely
[EMAIL PROTECTED] wrote: Joel- ... I also changed some of the 'words because I like my scripts to read like "plain English.") The function follows... Thanks! It's nice to watch these things evolve. (As far as the coding style, I freely confess to getting fairly terse at times; I just

[REBOL] parse or Re:(8)

2000-09-21 Thread joel . neely
Ooooh! Typo on my part. Apologies for any confusion it caused. Where I typed The objective, as I read it, was to break on PARAGRAPHS (not lines) where a paragraph is defined as the end of a sentence that concides with the end of a line... I intended to be saying (correction in all

[REBOL] parse or

2000-09-20 Thread RChristiansen
paragraphs: {First paragraph.^/Second "paragraph."^/Third paragraph.} == {First paragraph. Second "paragraph." Third paragraph.} probe parse paragraphs [{.^/} | {."^/}] false == false probe parse paragraphs ({.^/} or {."^/}) ** Script Error: Cannot use or~ on string! value. ** Where: ".^/" or

[REBOL] parse or Re:(2)

2000-09-20 Thread rryost
"h" is present. parse/all st "gb" == ["a" "cdef"] ; Split at the single char that matched. Russell [EMAIL PROTECTED] - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 20, 2000 12:26 PM Subject: [REBOL] parse

[REBOL] parse or Re:(2)

2000-09-20 Thread RChristiansen
paragraphs: {First paragraph.^/Second "paragraph."^/Third paragraph.} parse paragraphs [some [thru {.^/} | thru {."^/} | thru "." end]] This returns "true" But what if I'm trying to parse a report and wish to make each paragraph a separate string within a block? paragraphs: {First

[REBOL] parse or Re:(3)

2000-09-20 Thread jeff
Howdy, Ryan: paragraphs: {First paragraph.^/Second "paragraph."^/Third paragraph.} parse paragraphs [some [thru {.^/} | thru {."^/} | thru "." end]] This returns "true" Yep, that means that PARSE successfully made it through the whole string. To break up your paragraphs,

[REBOL] parse or Re:(3)

2000-09-20 Thread rryost
- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 20, 2000 1:54 PM Subject: [REBOL] parse or Re:(2) Hi Ryan: Here's a one liner that may help: st: "abcdef" == "abcdef" parse/all st "ed" == ["abc" "" &

[REBOL] parse or Re:(4)

2000-09-20 Thread rryost
Will Jeff's approach work if the paragraphs contain multiple periods? Russell [EMAIL PROTECTED] - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 20, 2000 1:41 PM Subject: [REBOL] parse or Re:(3) Howdy, Ryan: paragraphs: {First

[REBOL] parse or Re:(4)

2000-09-20 Thread joel . neely
Hi, Jeff... you beat me to the "Send" button! ;-) Since I'm now obligated to add value, instead of just saying "me too", see additional remarks below. [EMAIL PROTECTED] wrote: Howdy, Ryan: paragraphs: {First paragraph.^/Second "paragraph."^/Third paragraph.} parse paragraphs

[REBOL] parse or Re:(5)

2000-09-20 Thread RChristiansen
I assumed that this is NOT what you wanted, but rather you wanted to copy through either {.^/} or {."^} WHICHEVER COMES NEXT. (Natural language text munching is a real pain, speaking from personal experience! ;-) Yes, this is what I was looking for. As someone who has never parsed anything

[REBOL] parse or Re:(5)

2000-09-20 Thread jeff
Howdy, Joel: Notice that now the result block has only TWO elements! Since the first test (the thru {.^/} part) can succeed by grabbing text all the way to the end of the SECOND paragraph, it does so, putting the first two paragraphs into the first output string. I assumed that this is

[REBOL] parse or Re:(3)

2000-09-20 Thread rryost
See my stuff interjected below: Russell [EMAIL PROTECTED] - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 20, 2000 1:54 PM Subject: [REBOL] parse or Re:(2) paragraphs: {First paragraph.^/Second "paragraph."^/Third paragraph

[REBOL] parse or Re:(4)

2000-09-20 Thread norsepower
Ahh, but this is not enough, because if the report has more than one newline character following a paragraph, you will end up with empty paragraphs. But what if I'm trying to parse a report and wish to make each paragraph a separate string within a block? Simple parsing with the /all

[REBOL] Parse Tutorial? Re:

2000-09-15 Thread rebol
At 08:51 AM 9/14/00 -0800, you wrote: Hi: I've noted some discussion regarding a parse tutorial in the lists: Do any parse tutorials now exist? thanks -tim REBOL The Official Guide: pp 300 ;- Elan [ : - ) ] author of REBOL: THE OFFICIAL GUIDE REBOL Press: The Official Source for

[REBOL] parse question

2000-09-14 Thread princepawn
In order to improve my skills with the REBOL parse word, I thought I would go through "Mastering Regular Expressions" by Jeffrey Freidl and do all the examples in REBOL. Here is my first attempt and it does not work. The script is supposed to take a list of files and indicate whethe

[REBOL] parse question Re:

2000-09-14 Thread Al . Bri
terrence-brannon wrote: rules: [ to "resetsize" (size-cmds: size-cmds - 1) | to "setsize" (size-cmds: size-cmds + 1) ] Try 'thru instead of 'to. Note that "setsize" is equal to last seven letters of "resetsize". Me: [ "Andrew Martin" ICQ: 26227169

[REBOL] parse question Re:

2000-09-14 Thread princepawn
using thru did not result in correct parsing = Original Message From [EMAIL PROTECTED] = terrence-brannon wrote: rules: [ to "resetsize" (size-cmds: size-cmds - 1) | to "setsize" (size-cmds: size-cmds + 1) ] Try 'thru instead of 'to. Note that "setsize" is equal to last seven

[REBOL] Parse Tutorial?

2000-09-14 Thread tim
Hi: I've noted some discussion regarding a parse tutorial in the lists: Do any parse tutorials now exist? thanks -tim

[REBOL] parse question Re:

2000-09-14 Thread jeff
Howdy, Terrence: Neat stuff. Planning on making web page out of the result? In order to improve my skills with the REBOL parse word, I thought I would go through "Mastering Regular Expressions" by Jeffrey Freidl and do all the examples in REBOL. Here is my fir

[REBOL] Parse Tutorial? Re:

2000-09-14 Thread allen
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 15, 2000 2:51 AM Subject: [REBOL] Parse Tutorial? Hi: I've noted some discussion regarding a parse tutorial in the lists: Do any parse tutorials now exist? thanks -tim Hi Tim, I

[REBOL] Parse Tutorial? Re:(2)

2000-09-14 Thread tim
Got it! Thanks Allen :) [EMAIL PROTECTED] wrote: - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 15, 2000 2:51 AM Subject: [REBOL] Parse Tutorial? Hi: I've noted some discussion regarding a parse tutorial in the lists: Do

[REBOL] Parse, spaces and ()s Re:(2)

2000-09-01 Thread davidv
Cheers, I'll give it a go. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 31, 2000 6:12 PM Subject: [REBOL] Parse, spaces and ()s Re: Actually, the ()'s are not causing the results you're getting. For rule-based parsing, spaces are ignored

[REBOL] Parse, spaces and ()s

2000-08-31 Thread davidv
Newby question... Can anyone tell me what is going on here? The following output is produced by the script below one ( two three ) four ( five ( six seven ) eight ) Why do "two" and "three" appear as one string (same with "six" and "seven") and not split up at the space between them like

[REBOL] Parse, spaces and ()s Re:

2000-08-31 Thread splair
Actually, the ()'s are not causing the results you're getting. For rule-based parsing, spaces are ignored unless you use the /ALL refinement. To get the results you want try: parse/all str [some rule-block] [EMAIL PROTECTED] wrote: Newby question... Can anyone tell me what is going on

[REBOL] parse with skip

2000-08-21 Thread moeller_thorsten
Hi List, I have a file containing the following kind of lines: 9;"1081230012";999;1000103;0;84.00;0;999;0.84;1;"6";0;991030;0;73.92 ;0.84;9;"L";991030;0;108;123;0;" " With this line i like to get rid of the leading "1" ( should be yymmdd = 00/01/03 )in the 4th field. For this i like to

[REBOL] parse with skip Re:

2000-08-21 Thread Petr . Krenzelok
[EMAIL PROTECTED] wrote: Hi List, I have a file containing the following kind of lines: 9;"1081230012";999;1000103;0;84.00;0;999;0.84;1;"6";0;991030;0;73.92 ;0.84;9;"L";991030;0;108;123;0;" " With this line i like to get rid of the leading "1" ( should be yymmdd = 00/01/03 )in

[REBOL] parse with skip Re:(2)

2000-08-21 Thread Petr . Krenzelok
[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Hi List, I have a file containing the following kind of lines: 9;"1081230012";999;1000103;0;84.00;0;999;0.84;1;"6";0;991030;0;73.92 ;0.84;9;"L";991030;0;108;123;0;" " With this line i like to get rid of the leading "1"

[REBOL] parse with skip Re:(3)

2000-08-21 Thread brian . hawley
Volker wrote: how about (if no ";" inside data!) ? a: {9;"1081230012";999;1000103;0;84.00;0;999;0.84;1;"6";0;991030;0;73.92;0.84;9;"L";991030;0; 108;123;0;" "} b: parse a ";" { == ["9" "1081230012" "999" "1000103" "0" "84.00" "0" "999" "0.84" "1" "6" "0" "991030" "0" "73.92"

[REBOL] Parse does not have not match type. Re:(6)

2000-08-01 Thread yaozhang
understand what magic you put there, and I learnt something as a result. I've made a few tests so far and cannot fault it. Thanks, Brett. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 31, 2000 4:06

[REBOL] Parse does not have not match type. Re:(3)

2000-07-31 Thread lmecir
le to understand what magic you put there, and I learnt something as a result. I've made a few tests so far and cannot fault it. Thanks, Brett. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 31, 2000 4:06 AM Subject: [REBOL] Parse does not ha

[REBOL] parse-xml cannot be reversed Re:

2000-07-31 Thread joel . neely
[EMAIL PROTECTED] wrote: I attempted to write a function that would take the structure that parse-xml generates and export it back into a valid xml file. But, I found that it cannot be reliably done. Beg pardon, but it can be done. Here's an example. parse-xml {ateststringb/c//a} ==

[REBOL] Parse does not have not match type. Re:(5)

2000-07-31 Thread lmecir
dislav. It took a little while to understand what magic you put there, and I learnt something as a result. I've made a few tests so far and cannot fault it. Thanks, Brett. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 31, 20

[REBOL] Parse does not have not match type. Re:

2000-07-30 Thread lmecir
Hi, I think, that Parse has got a bug as in: parse "a" [none skip] == true cc-ing to feedback. Here is a version of A-B-rule, that should work reliably. Test it please. A-B-rule: func [ "Generate an A-B parse rule" A [block!] {A-rule} B [block!] {B-rule} /local o ] [ o:

[REBOL] Parse does not have not match type.

2000-07-30 Thread lmecir
Hi, try this: (but look out!) As long, as Rebol functions are CQSB with DRP, there are problems with Rule-res word local to A-B-rule function. A-B-rule: func [ "Generate an A-B parse rule" A [block!] {A-rule} B [block!] {B-rule} /local succeed fail rule-res ] [ [[B to end

[REBOL] parse-xml cannot be reversed Re:(2)

2000-07-30 Thread bhandley
With a few adjustments, it should be able to handle all xml-parsed trees, afaik... but it's 5:48am right now, so I may be wrong. :-) I think I stand corrected. Which is good :) You can also parse the whole parse-xml structure with the new block parser in /View and /Core 2.3. It only takes

[REBOL] Parse does not have not match type. Re:(2)

2000-07-30 Thread bhandley
4:06 AM Subject: [REBOL] Parse does not have "not" match type. Re: Hi, I think, that Parse has got a bug as in: parse "a" [none skip] == true cc-ing to feedback. Here is a version of A-B-rule, that should work reliably. Test it please. A-B-rule: func [ "G

[REBOL] Parse does not have not match type.

2000-07-29 Thread bhandley
I was playing around with the idea of using rebol to convert EBNF to Rebol parse rules. A strange occupation maybe, but I thought it might be useful one day. Anyway, I found a rule in EBNF, as described in XML1.0 - http://www.w3.org/TR/REC-xml.html, for which I believe there is no equivalent

[REBOL] Parse differenece in Core 2.3

2000-07-11 Thread dynalt
I have a script which works under Core 2.2 but fails under 2.3: The problem appears to be in the way I use parse, but I can’t see what is wrong, particularly since it worked under 2.2 Thanks, Garold (Gary) L. Johnson DYNAMIC Alternatives http://www.dynalt.com/ [EMAIL PROTECTED] mailto:[EMAIL

[REBOL] Parse differenece in Core 2.3 Re:

2000-07-11 Thread jeff
I have a script which works under Core 2.2 but fails under 2.3: The problem appears to be in the way I use parse, but I can’t see what is wrong, particularly since it worked under 2.2 Thanks, Garold(Gary) L. Johnson DYNAMIC Alternatives Try: print mold

[REBOL] Parse differenece in Core 2.3 Re:(2)

2000-07-11 Thread dynalt
Jeff wrote: Try: print mold system/options/args 2.3 contains a goof with how the command line args are passed. What once was a string is now a block containing a string. [snip] The next version will correct the arg passing behavior back to the old style. Your

[REBOL] Parse Re:(7)

2000-04-18 Thread agem
greater? to binary! "a" to binary "AB" true greater? "a" "AB" false works allways? Volker Hello [EMAIL PROTECTED]! On 17-Apr-00, you wrote: s use s parse/case Actually, we were talking about the comparison operators, such as , , = etc. Regards, Gabriele. --

[REBOL] Parse Re:(5)

2000-04-17 Thread sqlab
Hi use parse/case (BTW, if the comparison between chars is case insensitive, it should be enough to convert them to integers first.) AR -- Sent through GMX FreeMail - http://www.gmx.net

[REBOL] Parse Re:(6)

2000-04-17 Thread Al . Bri
- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, 17 April 2000 7:23 PM Subject: [REBOL] Parse Re:(5) Hi use parse/case (BTW, if the comparison between chars is case insensitive, it should be enough to convert them to integers first.) AR -- Sent through GMX FreeMail

[REBOL] Parse Re:(3)

2000-04-15 Thread Al . Bri
Gabriele wrote: A C == #"Y" A C == #"Z" A ] [ Hmmm... this seems a bit crazy to me... ;-) What about: if all [C #"A" C #"Z"] [ ... ] Actually, I tried a approach very similar to that, but I seemed to get a result that indicated that the comparison was case _insensitive_.

[REBOL] Parse Re:

2000-04-14 Thread lmecir
- Puvodní zpráva - Od: [EMAIL PROTECTED] Komu: [EMAIL PROTECTED] Odesláno: 13. dubna 2000 18:11 Predmet: [REBOL] Parse How would I parse such that ThisIsTheLine would result in: This Is The Line. Larry Hi, here is my version: char: [skip] capit: charset

[REBOL] Parse Re:(2)

2000-04-14 Thread bhawley
Hi all! Larry asked: How would I parse such that ThisIsTheLine would result in: This Is The Line. Using parse, try this ... the-line: "ThisIsTheLine" big-alpha: charset [#"A" - #"Z"] tmp: none parse/all/case the-line [ skip ; Skip the first character any [to

[REBOL] parse to blocks or sets Re:

2000-04-13 Thread lmecir
Hi, Daniel, you wrote: It seems strange to me that digit: charset "0123456789" parse "123" [to digit] and block: ["1" | "2"] parse "123" [to block] fail (on my Mac). Any ideas how to write it better? This works for blocks: block: [to "1" | to "2"] parse "123"

[REBOL] Parse

2000-04-13 Thread morgenw
How would I parse such that ThisIsTheLine would result in: This Is The Line. Larry

[REBOL] Parse Re:

2000-04-13 Thread Al . Bri
Larry asked: How would I parse such that ThisIsTheLine would result in: This Is The Line. I know, it doesn't use 'parse, but this way was more obvious... [ REBOL [ ] Line: "ThisIsTheLine" Split: function [Line [string!]] [Result] [ Result: make string! 0 foreach C Line [ if

[REBOL] parse to blocks or sets

2000-04-12 Thread haertle
It seems strange to me that digit: charset "0123456789" parse "123" [to digit] and block: ["1" | "2"] parse "123" [to block] fail (on my Mac). Any ideas how to write it better? This works for blocks: block: [to "1" | to "2"] parse "123" [block] but is not so elegant for large blocks. Daniel

[REBOL] parse / space Re:(2)

2000-04-06 Thread agem
parse "LIB1 " ["LIB1"] == false parse "LIB1 " ["LIB1" to end] == true parse "LI B1 " ["LIB1" to end] == false result says, could parse full string, or there is a rest, IMO. Volker Am Mit, 05 Apr 2000 schrieben Sie:

[REBOL] parse / space Re:(3)

2000-04-06 Thread icimjs
Hi Volker you wrote: At 12:41 PM 4/6/00 +0200, you wrote: parse "LIB1 " ["LIB1"] == false parse "LIB1 " ["LIB1" to end] == true parse "LI B1 " ["LIB1" to end] == false result says, could parse full string, or there is a rest, IMO. that is correct

[REBOL] parse / space

2000-04-05 Thread bciceron
parse is very powerfull but still kills me with spacer: parse "asergd" lib-name == true parse "LIB1" lib-type == true so the 2 elements matches the 2 single rules. but pout together they don't : parse "asergd LIB1" [lib-name lib-type] == false probe parse "asergd LIB1" [lib-name

[REBOL] parse / space Re:

2000-04-05 Thread mjelinek
:[EMAIL PROTECTED]] Sent: Wednesday, April 05, 2000 10:42 AM To: [EMAIL PROTECTED] Subject: [REBOL] parse / space parse is very powerfull but still kills me with spacer: parse "asergd" lib-name == true parse "LIB1" lib-type == true so the 2 elements matches the 2 singl

[REBOL] parse / space Re:

2000-04-05 Thread icimjs
Hi bciceron, The short version is: I believe it's a bug. The long version: space at the begining of string: parse " LIB1" ["LIB1"] == true space smack in the middle of token: parse "LI B1" ["LIB1"] == false Now, that somehow makes sense. If I am parsing for the token LIB1 I do not want

[REBOL] Parse questions ?? Re:(2)

2000-02-20 Thread mdb
Thanks Gabriele, I was wondering where the to-integer was, but then i realised that the (value: load value) took care of it. Interesting that you looked at the data in terms of repeating groups and so processed them using some..., when i came up with a parse rule, i tried to use recursion and i

[REBOL] Parse questions ??

2000-02-18 Thread mdb
Hello All, I have a file consisting of lines in the following format: "23123+34234+234234-23423+3-" ie, n digits followed by a sign etc etc. The only way i've been able to extract the data into a series is to do two replaces, replacing "+" by "+ " and "-" by "- " and then parsing it using the

[REBOL] Parse questions ?? Re:

2000-02-18 Thread allenk
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 19, 2000 11:15 AM Subject: [REBOL] Parse questions ?? Hello All, I have a file consisting of lines in the following format: "23123+34234+234234-23423+3-" ie, n digits followed

[REBOL] parse upto a number

2000-02-04 Thread prowsef
OK - how can I parse a line up until it strikes a number iebill123 and return bill ?? Francois

[REBOL] Parse this: Sassenrath gets herbal facial!

2000-02-01 Thread carl
Herbal, hey, I must have missed that while I was at the mineral bath... Those poison oak leaves are a real treat on your skin. How did you ever find this article? -Carl At 2/1/00 04:47 PM +0100, you wrote: http://www.nytimes.com/aponline/f/AP-So-Much-Money.html

[REBOL] Parse this: Sassenrath gets herbal facial! Re:(3)

2000-02-01 Thread jeff
Reply-to: jeff [EMAIL PROTECTED] FCC: /home/jeff/outgoing References: [EMAIL PROTECTED] [EMAIL PROTECTED] Oh, and the money wagon passed by while I was relaxing in the mineral tub. Darn. -Carl Gee, we should invite that reporter down here around the next time we get ready to

[REBOL] Parse this: Sassenrath gets herbal facial! Re:

2000-02-01 Thread jdcard
]] Sent: Tuesday, February 01, 2000 9:11 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject:[REBOL] Parse this: Sassenrath gets herbal facial! How did you ever find this article? -Carl At 2/1/00 04:47 PM +0100, you wrote: http://www.nytimes.com/aponline/f/AP-So-Much

[REBOL] Parse...

2000-01-06 Thread giesse
Here's an idea for extending the parse dialect: words: make block! 10 == [] string-rule: ["str" skip "ng" [alpha | none]] == ["str" skip "ng" [alpha | none]] parse/all "An example string, a strong man, a strange day." extended [ [any [ [to-block string-rule copy word string-rule [

[REBOL] parse question Re:(3)

1999-11-30 Thread bo
Ingo, I noticed several people had posted parse versions, so I'm sure you'll see them by the time you see this mail. If not, let me know and I'll write one. I'm pretty sure Elan wrote one at least. Later! On 24-Nov-1999/13:51:44+1:00, [EMAIL PROTECTED] wrote: Hi Bo, I am a bit behind with

  1   2   >