|Implementing multi-line comments, other characters.. email@example.com (2002-06-28)|
|Re: Implementing multi-line comments, other characters.. firstname.lastname@example.org (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>|
|Date:||2 Jul 2002 01:13:17 -0400|
|Organization:||Helsinki University of Technology, CS lab|
|Posted-Date:||02 Jul 2002 01:13:16 EDT|
>>>>> "Jared" == holychapin <email@example.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
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.)
Return to the
Search the comp.compilers archives again.