Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Linguistic influences

From: lmecir:mbox:vol:cz at: 13-May-2002 11:02

Hi all, the discussion on block parsing reminds me of one block-parsing specific problem. Let's suppose, that I want to find out, whether a parsed block contains a sequence of values like e.g. [1 a: :a] Attempt #1: parse [1 a: :a] [1 a: :a] ; == false Attempt #2: parse [1 a: :a] [1 1 1 1 1 a: 1 1 :a] ; == true We see, that the second attempt worked. This solution doesn't work, if I want to test, whether the block contains a specific lit-word like e.g. 'a. Attempt # 3: parse ['a] [1 1 'a] ; == false Summary: for the complicated cases it would be nice to have something like (hypothetic!): parse [1 2 3] [literally [1 2 3]] ; == true -L