annotate trunk/src/Messages.d @ 58:50bb7fc9db44

- The types of integers are recognized now. - Fix: continue statement missing in integer scanner.
author aziz
date Fri, 29 Jun 2007 05:47:00 +0000
parents 63af7ddf52e1
children 3e594725899a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
54
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
1 /++
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
2 Author: Aziz Köksal
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
3 License: GPL2
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
4 +/
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
5 module Messages;
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
6
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
7 /// Index into table of error messages.
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
8 enum MID
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
9 {
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
10 InvalidUnicodeCharacter,
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
11 InvalidUTF8Sequence,
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
12 // ''
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
13 UnterminatedCharacterLiteral,
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
14 EmptyCharacterLiteral,
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
15 // #line
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
16 ExpectedIdentifierSTLine,
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
17 ExpectedNormalStringLiteral,
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
18 ExpectedNumberAfterSTLine,
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
19 NewlineInSpecialToken,
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
20 UnterminatedSpecialToken,
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
21 // ""
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
22 UnterminatedString,
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
23 // x""
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
24 NonHexCharInHexString,
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
25 OddNumberOfDigitsInHexString,
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
26 UnterminatedHexString,
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
27 // /* */ /+ +/
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
28 UnterminatedBlockComment,
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
29 UnterminatedNestedComment,
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
30 // `` r""
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
31 UnterminatedRawString,
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
32 UnterminatedBackQuoteString,
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
33 // \x \u \U
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
34 UndefinedEscapeSequence,
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
35 InsufficientHexDigits,
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
36 // \&[a-zA-Z][a-zA-Z0-9]+;
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
37 UnterminatedHTMLEntity,
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
38 InvalidBeginHTMLEntity,
56
63af7ddf52e1 - Started properly implementing number scanner. Added stub for real numbers.
aziz
parents: 54
diff changeset
39 // integer overflows
58
50bb7fc9db44 - The types of integers are recognized now.
aziz
parents: 56
diff changeset
40 OverflowDecimalSign,
56
63af7ddf52e1 - Started properly implementing number scanner. Added stub for real numbers.
aziz
parents: 54
diff changeset
41 OverflowDecimalNumber,
63af7ddf52e1 - Started properly implementing number scanner. Added stub for real numbers.
aziz
parents: 54
diff changeset
42 OverflowHexNumber,
63af7ddf52e1 - Started properly implementing number scanner. Added stub for real numbers.
aziz
parents: 54
diff changeset
43 OverflowBinaryNumber,
63af7ddf52e1 - Started properly implementing number scanner. Added stub for real numbers.
aziz
parents: 54
diff changeset
44 OverflowOctalNumber,
54
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
45 }
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
46
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
47 string[] messages = [
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
48 "invalid Unicode character.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
49 "invalid UTF-8 sequence.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
50 // ''
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
51 "unterminated character literal.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
52 "empty character literal.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
53 // #line
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
54 "expected 'line' after '#'.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
55 `the filespec must be defined in a double quote string literal (e.g. "filespec".)`,
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
56 "positive integer expected after #line",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
57 "newline not allowed inside special token.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
58 "expected a terminating newline after special token.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
59 // ""
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
60 "unterminated string literal.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
61 // x""
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
62 "non-hex character '{1}' found in hex string.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
63 "odd number of hex digits in hex string.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
64 "unterminated hex string.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
65 // /* */ /+ +/
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
66 "unterminated block comment (/* */).",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
67 "unterminated nested comment (/+ +/).",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
68 // `` r""
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
69 "unterminated raw string.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
70 "unterminated back quote string.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
71 // \x \u \U
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
72 "found undefined escape sequence.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
73 "insufficient number of hex digits in escape sequence.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
74 // \&[a-zA-Z][a-zA-Z0-9]+;
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
75 "unterminated html entity.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
76 "html entities must begin with a letter.",
56
63af7ddf52e1 - Started properly implementing number scanner. Added stub for real numbers.
aziz
parents: 54
diff changeset
77 // integer overflows
58
50bb7fc9db44 - The types of integers are recognized now.
aziz
parents: 56
diff changeset
78 "decimal number overflows sign bit.",
56
63af7ddf52e1 - Started properly implementing number scanner. Added stub for real numbers.
aziz
parents: 54
diff changeset
79 "overflow in decimal number.",
63af7ddf52e1 - Started properly implementing number scanner. Added stub for real numbers.
aziz
parents: 54
diff changeset
80 "overflow in hexadecimal number.",
63af7ddf52e1 - Started properly implementing number scanner. Added stub for real numbers.
aziz
parents: 54
diff changeset
81 "overflow in binary number.",
63af7ddf52e1 - Started properly implementing number scanner. Added stub for real numbers.
aziz
parents: 54
diff changeset
82 "overflow in octal number.",
54
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
83 ];