[Tinyos-commits] CVS: tinyos-1.x/tos/lib/VM/languages/motlle/standalone ins.c, 1.2, 1.3 lexer.l, 1.5, 1.6 mparser.c, 1.4, 1.5 parser.y, 1.4, 1.5

David Gay idgay at users.sourceforge.net
Tue Oct 25 15:00:43 PDT 2005


Update of /cvsroot/tinyos/tinyos-1.x/tos/lib/VM/languages/motlle/standalone
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7050

Modified Files:
	ins.c lexer.l mparser.c parser.y 
Log Message:
fix opt-away of unused fn args
misc parse/lex scheme fixes


Index: ins.c
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/lib/VM/languages/motlle/standalone/ins.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ins.c	30 Nov 2004 18:52:44 -0000	1.2
--- ins.c	25 Oct 2005 22:00:40 -0000	1.3
***************
*** 546,550 ****
    u8 i;
  
!   for (i = 0; i < nb_locals; i++)
      vars[i].read = FALSE;
  
--- 546,552 ----
    u8 i;
  
!   for (i = 0; i < fn->nargs; i++)
!     vars[i].read = TRUE;
!   for (; i < nb_locals; i++)
      vars[i].read = FALSE;
  

Index: lexer.l
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/lib/VM/languages/motlle/standalone/lexer.l,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** lexer.l	25 Oct 2005 00:39:11 -0000	1.5
--- lexer.l	25 Oct 2005 22:00:41 -0000	1.6
***************
*** 119,131 ****
  <INITIAL,schemelex>"("	{ return '('; }
  <INITIAL,schemelex>")"	{ return ')'; }
- <INITIAL,schemelex>"["	{ return '['; }
- <INITIAL,schemelex>"]"	{ return ']'; }
- <INITIAL,schemelex>"{"	{ return '{'; }
- <INITIAL,schemelex>"}"	{ return '}'; }
- <INITIAL,schemelex>"."	{ return '.'; }
  <INITIAL,schemelex>"'"	{ return QUOTE; }
! <INITIAL,schemelex>"="	{ return ASSIGN; }
! 
  
  "&&"	{ return SC_AND; }
  "||"	{ return SC_OR; }
--- 119,131 ----
  <INITIAL,schemelex>"("	{ return '('; }
  <INITIAL,schemelex>")"	{ return ')'; }
  <INITIAL,schemelex>"'"	{ return QUOTE; }
! <INITIAL,schemelex>"."	{ return '.'; }
! <INITIAL,schemelex>","  { return ','; }
  
+ "["	{ return '['; }
+ "]"	{ return ']'; }
+ "{"	{ return '{'; }
+ "}"	{ return '}'; }
+ "="	{ return ASSIGN; }
  "&&"	{ return SC_AND; }
  "||"	{ return SC_OR; }
***************
*** 143,147 ****
  "~"	{ return '~'; }
  "^"	{ return '^'; }
- ","     { return ','; }
  "+="	{ yylval.operator = b_add; return OP_ASSIGN; }
  "-="	{ yylval.operator = b_subtract; return OP_ASSIGN; }
--- 143,146 ----
***************
*** 233,238 ****
  	      }
  
- .	{ log_error(lexloc, "Bad character %s(%02x)", yytext, (unsigned char)yytext[0]); }
- 
  <schemelex>({SCHEME_SYMBOL}|[+]|[-]|[|]) {
  		yylval.symbol = allocate(parser_memory,strlen(yytext) + 1);
--- 232,235 ----
***************
*** 241,244 ****
--- 238,244 ----
  		return SYMBOL;
  	      }
+ <schemelex>#\( { return '['; }
+ 
+ <INITIAL,schemelex>.	{ log_error(lexloc, "Bad character %s(%02x)", yytext, (unsigned char)yytext[0]); }
  
  %%

Index: mparser.c
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/lib/VM/languages/motlle/standalone/mparser.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** mparser.c	7 Oct 2005 17:15:11 -0000	1.4
--- mparser.c	25 Oct 2005 22:00:41 -0000	1.5
***************
*** 467,471 ****
  #define YYFINAL  3
  /* YYLAST -- Last index in YYTABLE.  */
! #define YYLAST   986
  
  /* YYNTOKENS -- Number of terminals. */
--- 467,471 ----
  #define YYFINAL  3
  /* YYLAST -- Last index in YYTABLE.  */
! #define YYLAST   1056
  
[...1461 lines suppressed...]
  
--- 2448,2452 ----
  # undef YYRECOVERING
  /* Line 671 of glr.c.  */
! #line 2450 "parser.tab.c"
  }
  
***************
*** 3704,3708 ****
  
  
! #line 762 "../standalone/parser.y"
  
  
--- 3731,3735 ----
  
  
! #line 763 "../standalone/parser.y"
  
  

Index: parser.y
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/lib/VM/languages/motlle/standalone/parser.y,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** parser.y	7 Oct 2005 17:15:11 -0000	1.4
--- parser.y	25 Oct 2005 22:00:41 -0000	1.5
***************
*** 625,628 ****
--- 625,629 ----
    '{' '}' { $$ = new_constant(parser_memory, cst_table, NULL); } |
    '[' optional_constant_list ']' { $$ = new_constant(parser_memory, cst_array, $2); } |
+   '[' optional_constant_list ')' { $$ = new_constant(parser_memory, cst_array, $2); } |
    '(' constant_list optional_constant_tail ')' { 
      $$ = new_constant(parser_memory, cst_list, new_cstlist(parser_memory, $3, $2));



More information about the Tinyos-commits mailing list