This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
let treelang accept tabs
- From: Jim Wilson <wilson at specifixinc dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: ja2morri at csclub dot uwaterloo dot ca
- Date: 04 Dec 2003 22:47:21 -0800
- Subject: let treelang accept tabs
I checked in this patch, which originally appeared on the gcc list.
2003-12-04 James A. Morrison <ja2morri@uwaterloo.ca>
* lex.l: Add \t as a whitespace character.
* treelang.texi (Lexical Syntax): Document a tab as whitespace.
Index: lex.l
===================================================================
RCS file: /cvs/gcc/gcc/gcc/treelang/lex.l,v
retrieving revision 1.7
diff -p -r1.7 lex.l
*** lex.l 6 May 2003 09:18:46 -0000 1.7
--- lex.l 5 Dec 2003 06:40:58 -0000
*************** static void dump_lex_value (int lexret);
*** 78,84 ****
((struct prod_token_parm_item *)yylval)->tp.tok.charno = next_tree_charno;
}
! [ \n]+ {
update_lineno_charno ();
NOT_RETURN (WHITESPACE);
}
--- 78,84 ----
((struct prod_token_parm_item *)yylval)->tp.tok.charno = next_tree_charno;
}
! [ \n\t]+ {
update_lineno_charno ();
NOT_RETURN (WHITESPACE);
}
Index: treelang.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/treelang/treelang.texi,v
retrieving revision 1.9
retrieving revision 1.10
diff -p -r1.9 -r1.10
*** treelang.texi 5 Dec 2003 06:34:50 -0000 1.9
--- treelang.texi 5 Dec 2003 06:45:48 -0000 1.10
*************** Treelang programs consist of whitespace,
*** 399,406 ****
@itemize @bullet
@item
! Whitespace consists of the space character and the end of line
! character. Tabs are not allowed. Line terminations are as defined by the
standard C library. Whitespace is ignored except within comments,
and where it separates parts of the program. In the example below, A and
B are two separate names separated by whitespace.
--- 399,406 ----
@itemize @bullet
@item
! Whitespace consists of the space character, a tab, and the end of line
! character. Line terminations are as defined by the
standard C library. Whitespace is ignored except within comments,
and where it separates parts of the program. In the example below, A and
B are two separate names separated by whitespace.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com