view trunk/src/lang_en.d @ 390:4d36eea1bbc9

Refactored Lexer.scan(). Illegal characters are not ignored anymore. They are reported as errors. Added a new member 'ws' to Token. When a token is scanned the lexer sets ws to the leading whitespace or leaves it at null when no whitespace was found. Added Illegal to enum TOK and IllegalCharacter to enum MID. Added localized messages for MID.IllegalCharacter. Adapted code of cmd.Generate to make use of Token.ws.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Wed, 12 Sep 2007 21:03:41 +0200
parents c4bfceab7246
children 33b566df6af4
line wrap: on
line source

/++
  Author: Aziz Köksal
  License: GPL3
+/

string lang_code = "en";

string[] messages = [
  // Lexer messages:
  "illegal character found: '{1}'",
  "invalid Unicode character.",
  "invalid UTF-8 sequence.",
  // ''
  "unterminated character literal.",
  "empty character literal.",
  // #line
  "expected 'line' after '#'.",
  "integer expected after #line",
  `expected filespec string (e.g. "path\to\file".)`,
  "unterminated filespec string.",
  "expected a terminating newline after special token.",
  // ""
  "unterminated string literal.",
  // x""
  "non-hex character '{1}' found in hex string.",
  "odd number of hex digits in hex string.",
  "unterminated hex string.",
  // /* */ /+ +/
  "unterminated block comment (/* */).",
  "unterminated nested comment (/+ +/).",
  // `` r""
  "unterminated raw string.",
  "unterminated back quote string.",
  // \x \u \U
  "found undefined escape sequence '{1}'.",
  "insufficient number of hex digits in escape sequence.",
  // \&[a-zA-Z][a-zA-Z0-9]+;
  "undefined HTML entity '{1}'",
  "unterminated HTML entity.",
  "HTML entities must begin with a letter.",
  // integer overflows
  "decimal number overflows sign bit.",
  "overflow in decimal number.",
  "overflow in hexadecimal number.",
  "overflow in binary number.",
  "overflow in octal number.",
  "overflow in float number.",
  "digits 8 and 9 are not allowed in octal numbers.",
  "invalid hex number; at least one hex digit expected.",
  "invalid binary number; at least one binary digit expected.",
  "the exponent of a hexadecimal float number is required.",
  "hexadecimal float exponents must start with a digit.",
  "exponents must start with a digit.",

  // Parser messages
  "expected '{1}', but found '{2}'.",
  "'{1}' is redundant.",
  "template tuple parameters can only be last.",
  "the functions 'in' contract was already parsed.",
  "the functions 'out' contract was already parsed.",
  "no linkage type was specified.",
  "unrecognized linkage type '{1}'; valid types are C, C++, D, Windows, Pascal und System.",

  // Help messages:
  `dil v{1}
Copyright (c) 2007 by Aziz Köksal. Licensed under the GPL3.

Subcommands:
{2}
Type 'dil help <subcommand>' for more help on a particular subcommand.

Compiled with {3} v{4} on {5}.`,

  `Generate an XML or HTML document from a D source file.
Usage:
  dil gen file.d [Options]

Options:
  --syntax         : generate tags for the syntax tree
  --xml            : use XML format (default)
  --html           : use HTML format

Example:
  dil gen Parser.d --html --syntax > Parser.html`,

  `Parse a module and extract information from the resulting module dependency graph.
Usage:
  dil igraph file.d Format [Options]

  The directory of file.d is implicitly added to the list of import paths.

Format:
  --dot            : generate a dot document
  -gbp             : Group modules by package names
  -gbf             : Group modules by full package name
  -hle             : highlight cyclic edges in the graph
  -hlv             : highlight modules in cyclic relationship

  --paths          : print a list of paths to the modules imported by file.d
  -lN              : print N levels.

  --list           : print a list of the module names imported by file.d
  -lN              : print N levels.

Options:
  -Ipath           : add 'path' to the list of import paths where modules are
                     looked for
  -rREGEXP         : exclude modules whose names match the regular expression
                     REGEXP
  -i               : include unlocatable modules

Example:
  dil igraph src/main.d`,
];