]> granicus.if.org Git - re2c/commitdiff
- In single pass mode we cannot easily optimize out YYMARKER. We actually
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sun, 16 Apr 2006 19:44:54 +0000 (19:44 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sun, 16 Apr 2006 19:44:54 +0000 (19:44 +0000)
  would have to know whether an Accept block is being used that generates
  a YYMARKER reference. In two pass mode we know this after the first run.

CHANGELOG
htdocs/index.html
main.cc

index 7ba148578ede0f82fbb14876a14b86dcf02ae181..207975c46365e2ecd514d4541dd1f4cc1dd429cb 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,7 +1,7 @@
 Version 0.10.2 (2006-??-??)
 ---------------------------
+- Changed to generate YYMARKER only when needed or in single pass mode.
 - Added -t switch to force two pass generation.
-- Changed to not generate YYMARKER unless needed.
 - Fixed -i switch.
 - Added configuration 'yyfill:enable' to allow suppression of YYFILL() blocks.
 - Added tutorial like lessons to re2c.
index 71289dbe1346fea48257211ba22a8da576aa774a..96687a9ea80b4f26fd2737dfa1c539df8947e723 100755 (executable)
@@ -78,8 +78,8 @@ provide re2c packages.</li>
 <h1>Changelog</h1>
 <h2>2006-??-??: 0.10.2</h2>
 <ul>
+<li>Changed to generate YYMARKER only when needed or in single pass mode.</li>
 <li>Added -t switch to force two pass generation.</li>
-<li>Changed to not generate YYMARKER unless needed.</li>
 <li>Fixed -i switch.</li>
 <li>Added configuration 'yyfill:enable' to allow suppression of YYFILL() blocks.</li>
 <li>Added tutorial like lessons to re2c.</li>
diff --git a/main.cc b/main.cc
index 5a5549723a8af361ca0ebbc24e37411cbe623ea3..24d10ccf98fa087fe4f45d8348546fd5680deabc 100644 (file)
--- a/main.cc
+++ b/main.cc
@@ -34,7 +34,7 @@ bool bLastPass = false;
 
 bool bUsedYYAccept  = false;
 bool bUsedYYMaxFill = false;
-bool bUsedYYMarker  = false;
+bool bUsedYYMarker  = true;
 
 bool bUseStartLabel= false;
 bool bUseStateNext = false;
@@ -269,6 +269,8 @@ int main(int argc, char *argv[])
 
        if (tFlag)
        {
+               bUsedYYMarker = false;
+
                re2c::ifstream_lc null_source;
                
                if (!null_source.open(sourceFileName).is_open())