diff options
author | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-05 06:45:48 +0000 |
---|---|---|
committer | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-05 06:45:48 +0000 |
commit | ece183a2fa210842cfdd885b258222b8962fa98b (patch) | |
tree | 62e1158a06f91c84fc84e7e43e35aed90214f802 /gcc/treelang | |
parent | 1fff8085cc69b8505f584151fd76b3db81608f70 (diff) | |
download | gcc-ece183a2fa210842cfdd885b258222b8962fa98b.tar.gz |
Patch from James Morrison
* lex.l: Add \t as a whitespace character.
* treelang.texi (Lexical Syntax): Document a tab as whitespace.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74311 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/treelang')
-rw-r--r-- | gcc/treelang/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/treelang/lex.l | 2 | ||||
-rw-r--r-- | gcc/treelang/treelang.texi | 4 |
3 files changed, 6 insertions, 3 deletions
diff --git a/gcc/treelang/ChangeLog b/gcc/treelang/ChangeLog index 36865e31e1f..d017977a38b 100644 --- a/gcc/treelang/ChangeLog +++ b/gcc/treelang/ChangeLog @@ -1,5 +1,8 @@ 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. + * treelang.texi (What is GNU Treelang?): Fix a typo. (Lexical Syntax): Create an itemize list of keywords. Add commas to paragraph defining names. diff --git a/gcc/treelang/lex.l b/gcc/treelang/lex.l index 364bf0208d4..12b211e5b2f 100644 --- a/gcc/treelang/lex.l +++ b/gcc/treelang/lex.l @@ -78,7 +78,7 @@ static void dump_lex_value (int lexret); ((struct prod_token_parm_item *)yylval)->tp.tok.charno = next_tree_charno; } -[ \n]+ { +[ \n\t]+ { update_lineno_charno (); NOT_RETURN (WHITESPACE); } diff --git a/gcc/treelang/treelang.texi b/gcc/treelang/treelang.texi index 77e520374ef..501c4bfca95 100644 --- a/gcc/treelang/treelang.texi +++ b/gcc/treelang/treelang.texi @@ -399,8 +399,8 @@ Treelang programs consist of whitespace, comments, keywords and names. @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 +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. |