2002-03-28  Guerrero, Juan Manuel  <st001906@hrz1.hrz.tu-darmstadt.de>

	* src/lex.c (parse_percent_token): Zero terminate all token_obstack
	and token_buffer strings.


diff -acprNC5 bison-1.35.orig/src/lex.c bison-1.35.djgpp/src/lex.c
*** bison-1.35.orig/src/lex.c	Tue Jan 22 10:27:16 2002
--- bison-1.35.djgpp/src/lex.c	Thu Mar 28 22:19:32 2002
*************** parse_percent_token (void)
*** 594,636 ****
--- 594,644 ----
    obstack_1grow (&token_obstack, c);
  
    switch (c)
      {
      case '%':
+       obstack_1grow (&token_obstack, '\0');
        token_buffer = obstack_finish (&token_obstack);
        return tok_two_percents;
  
      case '{':
+       obstack_1grow (&token_obstack, '\0');
        token_buffer = obstack_finish (&token_obstack);
        return tok_percent_left_curly;
  
        /* The following guys are here for backward compatibility with
  	 very ancient Yacc versions.  The paper of Johnson mentions
  	 them (as ancient :).  */
      case '<':
+       obstack_1grow (&token_obstack, '\0');
        token_buffer = obstack_finish (&token_obstack);
        return tok_left;
  
      case '>':
+       obstack_1grow (&token_obstack, '\0');
        token_buffer = obstack_finish (&token_obstack);
        return tok_right;
  
      case '2':
+       obstack_1grow (&token_obstack, '\0');
        token_buffer = obstack_finish (&token_obstack);
        return tok_nonassoc;
  
      case '0':
+       obstack_1grow (&token_obstack, '\0');
        token_buffer = obstack_finish (&token_obstack);
        return tok_token;
  
      case '=':
+       obstack_1grow (&token_obstack, '\0');
        token_buffer = obstack_finish (&token_obstack);
        return tok_prec;
      }
  
    if (!isalpha (c))
      {
+       obstack_1grow (&token_obstack, '\0');
        token_buffer = obstack_finish (&token_obstack);
        return tok_illegal;
      }
  
    while (c = getc (finput), isalpha (c) || c == '_' || c == '-')
