[Crosstoolchain-logs] [device-tree-compiler] 240/357: Preserve scanner state when /include/ing.

Hector Oron zumbi at moszumanska.debian.org
Thu Dec 8 17:06:18 UTC 2016


This is an automated email from the git hooks/post-receive script.

zumbi pushed a commit to branch upstream/1.3.x
in repository device-tree-compiler.

commit b1a6719aa600e2459ea954c6f92b2090c29c3d90
Author: Scott Wood <scottwood at freescale.com>
Date:   Mon Jan 7 14:27:51 2008 -0600

    Preserve scanner state when /include/ing.
    
    This allows /include/s to work when in non-default states,
    such as PROPNODECHAR.
    
    We may want to use state stacks to get rid of BEGIN_DEFAULT() altogether...
    
    Signed-off-by: Scott Wood <scottwood at freescale.com>
---
 dtc-lexer.l | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dtc-lexer.l b/dtc-lexer.l
index f2836a8..920b87f 100644
--- a/dtc-lexer.l
+++ b/dtc-lexer.l
@@ -18,7 +18,7 @@
  *                                                                   USA
  */
 
-%option noyywrap nounput yylineno
+%option noyywrap nounput yylineno stack
 
 %x INCLUDE
 %x BYTESTRING
@@ -55,7 +55,7 @@ static int dts_version; /* = 0 */
 %}
 
 %%
-<*>"/include/"		BEGIN(INCLUDE);
+<*>"/include/"		yy_push_state(INCLUDE);
 
 <INCLUDE>\"[^"\n]*\"	{
 			yytext[strlen(yytext) - 1] = 0;
@@ -63,7 +63,7 @@ static int dts_version; /* = 0 */
 				/* Some unrecoverable error.*/
 				exit(1);
 			}
-			BEGIN_DEFAULT();
+			yy_pop_state();
 		}
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git



More information about the Crosstoolchain-logs mailing list