annotate trunk/src/Messages.d @ 59:3e594725899a

- Issuing error when no digits were found in hex and binary numbers.
author aziz
date Fri, 29 Jun 2007 06:01:03 +0000
parents 50bb7fc9db44
children 96af5653acef
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,
59
3e594725899a - Issuing error when no digits were found in hex and binary numbers.
aziz
parents: 58
diff changeset
45 NoDigitsInHexNumber,
3e594725899a - Issuing error when no digits were found in hex and binary numbers.
aziz
parents: 58
diff changeset
46 NoDigitsInBinNumber,
54
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
47 }
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
48
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
49 string[] messages = [
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
50 "invalid Unicode character.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
51 "invalid UTF-8 sequence.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
52 // ''
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
53 "unterminated character literal.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
54 "empty character literal.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
55 // #line
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
56 "expected 'line' after '#'.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
57 `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
58 "positive integer expected after #line",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
59 "newline not allowed inside special token.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
60 "expected a terminating newline after special token.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
61 // ""
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
62 "unterminated string literal.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
63 // x""
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
64 "non-hex character '{1}' found in hex string.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
65 "odd number of hex digits in hex string.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
66 "unterminated hex string.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
67 // /* */ /+ +/
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
68 "unterminated block comment (/* */).",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
69 "unterminated nested comment (/+ +/).",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
70 // `` r""
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
71 "unterminated raw string.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
72 "unterminated back quote string.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
73 // \x \u \U
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
74 "found undefined escape sequence.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
75 "insufficient number of hex digits in escape sequence.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
76 // \&[a-zA-Z][a-zA-Z0-9]+;
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
77 "unterminated html entity.",
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
78 "html entities must begin with a letter.",
56
63af7ddf52e1 - Started properly implementing number scanner. Added stub for real numbers.
aziz
parents: 54
diff changeset
79 // integer overflows
58
50bb7fc9db44 - The types of integers are recognized now.
aziz
parents: 56
diff changeset
80 "decimal number overflows sign bit.",
56
63af7ddf52e1 - Started properly implementing number scanner. Added stub for real numbers.
aziz
parents: 54
diff changeset
81 "overflow in decimal number.",
63af7ddf52e1 - Started properly implementing number scanner. Added stub for real numbers.
aziz
parents: 54
diff changeset
82 "overflow in hexadecimal number.",
63af7ddf52e1 - Started properly implementing number scanner. Added stub for real numbers.
aziz
parents: 54
diff changeset
83 "overflow in binary number.",
63af7ddf52e1 - Started properly implementing number scanner. Added stub for real numbers.
aziz
parents: 54
diff changeset
84 "overflow in octal number.",
59
3e594725899a - Issuing error when no digits were found in hex and binary numbers.
aziz
parents: 58
diff changeset
85 "invalid hex number; at least one hex digit expected.",
3e594725899a - Issuing error when no digits were found in hex and binary numbers.
aziz
parents: 58
diff changeset
86 "invalid binary number; at least one binary digit expected.",
54
e55bd2270f94 - Relocated messages table to a separate module.
aziz
parents:
diff changeset
87 ];