Rebol Talk Forum  |  REBOL Discussions  |  REBOL Chat  |  Topic: Parse problems.
Pages: [1] Print
Author Topic: Parse problems.  (Read 362 times)
HumbleNoob
Newbie
*
Offline Offline

Posts: 1


View Profile
Parse problems.
« on: May 18, 2006, 11:46:41 PM »

I've been fed up with XML ever since I saw it. I mean it just seems so unneccesary verbose. So I thought up my own little markup language with practically the same support base. It goes like this: -tag attr value: content-, and am trying to setup a parse rule for this.

For a simple flat element structure, I found this rule worked:

Code:
  element: [thru "-" copy tag to ":" ":" copy text to "-" "-"]

It seems changing it to this should work, but it doesn't:

Code:
non-end: complement charset "-"
element: [
  "-" copy tag to ":" ":" [element | copy text [some non-end]] "-"
]

but it doesn't. Could anybody tell me why?
Logged
Gabriele
Full Member
***
Offline Offline

Posts: 181


View Profile WWW
Re: Parse problems.
« Reply #1 on: May 19, 2006, 05:35:49 AM »

Hmm, it seems to work here, but notice that you are not allowing for any other content before or after an element, and you are only allowing one element.
Logged
Pages: [1] Print 
Rebol Talk Forum  |  REBOL Discussions  |  REBOL Chat  |  Topic: Parse problems.
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 19, 2008, 07:45:13 PM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2187 Posts in 576 Topics by 1615 Members
Latest Member: Uncellhoolf

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc