Related articles |
---|
Implementing multi-line comments, other characters.. holychapin@hotmail.com (2002-06-28) |
Re: Implementing multi-line comments, other characters.. nmm1@cus.cam.ac.uk (Nick Maclaren) (2002-07-02) |
Re: Implementing multi-line comments, other characters.. Marko.Makela@HUT.FI (Marko =?ISO-8859-1?Q?M=E4kel=E4?=) (2002-07-02) |
From: | "Marko =?ISO-8859-1?Q?M=E4kel=E4?=" <Marko.Makela@HUT.FI> |
Newsgroups: | comp.compilers |
Date: | 2 Jul 2002 01:13:17 -0400 |
Organization: | Helsinki University of Technology, CS lab |
References: | 02-06-096 |
Keywords: | parse, i18n |
Posted-Date: | 02 Jul 2002 01:13:16 EDT |
>>>>> "Jared" == holychapin <holychapin@hotmail.com> writes:
Jared> It'll give an error (implemented in my errors object). What the
Jared> console box does is show a + over a - instead of ñ.
You have a character set problem there. Are you using the same text
editor for constructing both the lexer and the source file?
My wild guess is that you are using the character code 0xb1, which
represents "n with tilde" in some proprietary character sets, such as
IBM Code Page 437 and IBM Code Page 850. This is the character set
used in MS-DOS and in the Windows command prompt.
In ISO 8859-1 (also known as ISO Latin 1) and similar character sets
(including the default character set of Microsoft Windows), the code
0xb1 stands for "plus/minus".
You should use the same editor for creating both the lexer and the
source code. Hexdumps are often helpful in solving character set
problems.
Jared> Also, I want to allow multi-line comments to be used in a BASIC
Jared> file, but I'm not sure how to implement this. If you need to
Jared> see some code to understand, I can provide it.
See the Flex info files for an example of using start conditions.
(I'm assuming you are using Flex.)
Marko
Return to the
comp.compilers page.
Search the
comp.compilers archives again.