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

[REBOL] make-doc-pro: Need help with strange parse behavior

From: robert:muench:robertmuench at: 15-Nov-2001 21:10

Hi, I'm stucked with a parse problem. You will need two files: http://www.robertmuench.de/make-doc-pro-work.r and http://www.robertmuecnh.de/test2.txt Just start make-doc-pro-work.r and load test2.txt You will see a tracing output of the parser and you get a generated HTML file. Here is the trace output and the problem is marked with #: - top - parastart - paragraph - paragraph_newline title Bla - top - top sect1 Test parastart none - top - top - top bold Bold text - top - top table-in none parastart none - top - top bold Experttest - top - parastart - paragraph # para Advanced # newcell none - paragraph - paragraph_newline para Used paraend none - top table-out none - top - top - parastart - paragraph Unknown TAG found: title The problematic code is line 249 in combination with 256. Line 249 calls the rule in line 266, which should result in para: "" Now parsing continues with line 250 and tries to match some markup-characters. Parsing should hit line 256 and be able to parse |. As para is empty emit will not do anything. Next, as we are intable mode emit newcell none will be executed. Than parsing will continue with line 249, than line 266, which can now parse Advanced into para. Parsing continues etc. As you can see the problem is that parse switches some rules here. First the text Advanced is emitted and than the new cell, which is triggerd by |. You can create an other strange behaviour if you remove |End from the input file. In this case a paragraph_newline shows up BEFORE the Advanced text is emitted. I hope this is not that complicated ;-)) that you can follow where the problem is. Any idea what's up? Robert