Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What are the basics of PARSE?

basics parse
0
10 Posted

What are the basics of PARSE?

0

Here are a few helpful notes on PARSE. 1. PARSE uses it’s own dialect, which in REBOL lingo means that it can have its own grammar and vocabulary. So, don’t make any assumptions about any words that you see in a PARSE block because they live in a separate context and work differently. The great power and leverage of PARSE comes from this very fact, and that’s why dialects are the future. 2. Basic elements are: [block] – a sub-rule to PARSE “string” – attempt to match the string to the input #”c” – attempt to match a single character to the input – match tag to the input (paren) – evaluate a REBOL expression 12 – repeat the pattern 12 times 1 12 – repeat pattern at least 1 but no more than 12. word – look-up word in REBOL, it can be a number, string, block, and PARSE will recognize it. HOWEVER, PARSE also has keywords that are special. word: – mark the current input series position in word :word – set the current input series position from word bitset – match any specified char in

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.