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

[REBOL] Stupid Parse Tricks

From: john:schuhr at: 6-Jun-2001 13:50

Greetings list, Since playing with the eRebol utility by Maarten Koopmans, I've become interested in writing a full-featured markup language similar to Allaire's (Macromedia) Cold Fusion. Theoretically (with the right dialect), it would be able to process CF templates, but would be much more extensible. Unfortunately, the nuances of the 'parse dialect are still a bit mysterious to me. I'm still hunting for lots of documentation and examples. But one of the fundamental things I am curious to know up-front, is can it be done with one rule or will I need to create lots of little rules and loop through the template, matching rules as I go? A template might look like the following: <html><body> Login Report<br> <!--- logins in with mysql://127.0.0.1/logindb for example ---> <!--- and stores the result set for future use ---> <rebquery datasource="127.0.0.1" dbname="logindb" name="qryLogins"> select * from tblLogin </rebquery> <table> <tr> <td>User Name</td> <td>Time Logged In</td> </tr> <rebout query="qryLogins"> <tr> <td>#LoginName#</td> <td>#LoginTime#</td> </tr> </rebout> </table> <br> The current time is: <rebscript> print now/time </rebscript> <br> The current date is: <rebout> #now/date# </rebout> </body></html> Just look'n for insight :) Thanks. --John