From 01c4c5d949192270fd75c1cc8dd93de0ff335eb1 Mon Sep 17 00:00:00 2001 From: Pixel Date: Fri, 2 Aug 2002 14:03:39 +0000 Subject: Bleh --- FAQ-psx.txt | 1 + Xenogears/compil-2.lex | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ Xenogears/compil.lex | 13 ++++++++++++ 3 files changed, 68 insertions(+) diff --git a/FAQ-psx.txt b/FAQ-psx.txt index bb9001c..8acb67e 100644 --- a/FAQ-psx.txt +++ b/FAQ-psx.txt @@ -22,6 +22,7 @@ A: http://www.psxdev.ip3.com/ http://www.flyonthenet.it/net/psx_faq.htm http://badtaste.free.fr/ http://membres.lycos.fr/fennec + http://www.execpc.com/%7Ehalkun/PSX and this one *can* be useful: diff --git a/Xenogears/compil-2.lex b/Xenogears/compil-2.lex index 931a04c..9ad13f8 100644 --- a/Xenogears/compil-2.lex +++ b/Xenogears/compil-2.lex @@ -19,6 +19,7 @@ int block_width = 0; int errstate = 0; void yputc(int c, int a); + void unputs(char *); %% @@ -191,6 +192,39 @@ "" unput('e'); unput('o'); "" unput('e'); unput('a'); +>"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); +"" unputs(""); + + "\n" { if (line_width > max_line_width) max_line_width = line_width; @@ -212,6 +246,18 @@ \n num_lines++; . /* Eat up comments */ +\210 unputs("à"); +\211 unputs("â"); +\216 unputs("é"); +\217 unputs("è"); +\220 unputs("ê"); +\224 unputs("î"); +\225 unputs("ï"); +\231 unputs("ô"); +\235 unputs("ù"); +\236 unputs("û"); +\215 unputs("ç"); + . { putc(*yytext, yyout); } @@ -253,3 +299,11 @@ void yputc(int c, int a) { line_width += a; putc(c, yyout); } + +void unputs(char * s) { + int l = strlen(s), i; + + for (i = l - 1; i >= 0; i--) { + unput(s[i]); + } +} diff --git a/Xenogears/compil.lex b/Xenogears/compil.lex index 7d221df..21e0572 100644 --- a/Xenogears/compil.lex +++ b/Xenogears/compil.lex @@ -332,6 +332,19 @@ \n num_lines++; . /* Eat up comments */ + +\210 unputs("à"); +\211 unputs("â"); +\216 unputs("é"); +\217 unputs("è"); +\220 unputs("ê"); +\224 unputs("î"); +\225 unputs("ï"); +\231 unputs("ô"); +\235 unputs("ù"); +\236 unputs("û"); +\215 unputs("ç"); + . { fprintf(stderr, "Invalid character at line %i: '%c'\n", num_lines, *yytext); errstate = 1; -- cgit v1.2.3