pmp
Class ConfigDirectives

java.lang.Object
  extended by pmp.ConfigDirectives

public final class ConfigDirectives
extends java.lang.Object

Contains names of configuration dorectives.

Title: PMP: Macroprocessor

Description: Java macroprocessor

Copyright: Copyright (c) 2005

Company:

Version:
1.0
Author:
Luděk Hlaváček

Field Summary
static java.lang.String CODE_END
          Symbol marking start of block with macros.
static java.lang.String CODE_MARKS_OUTPUT
          Controls handling with code marks.
static java.lang.String CODE_START
          Symbol marking start of block with macros.
static java.lang.String DEBUGLEVEL
          Current level of debug output
static java.lang.String DEFINED_ENCODER
          Encoder used by all $(...)
static java.lang.String DEFINED_SEPARATOR
          Separator used by $(nnn-mmm) constructions in defined macros.
static java.lang.String INPUT_ENCODING
          Encoding of input files.
static java.lang.String LAST_ERROR
          This directive contains last error message
static java.lang.String LAST_NOTICE
          This directive contains last notice message
static java.lang.String LAST_WARNING
          This directive contains last warning message
static java.lang.String LOCALE
          Current locale as comma separated list for Locale constructor.
static java.lang.String MACRO_ARGUMENTS_REQUIRED
          Specifies whether arguments must be present to call macro.
static java.lang.String MACRO_CASE_SENSITIVE
          Controls whether macro calls are case-sensitive.
static java.lang.String MACRO_CLOSING_BRACKET
          default: "[ \t]*\)"
static java.lang.String MACRO_FALLBACK
          Fallback macro is called whenever parser comes across possible macro name, but appropriate macro is not found.
static java.lang.String MACRO_OPENING_BRACKET
          default: "\([ \t]*"
static java.lang.String MACRO_PARAM_SEPARATOR
          default: "[ \t]*,[ \t]"
static java.lang.String MACRO_PATTERN
          Regular expression that is used for looking for macro calls.
static java.lang.String OUTPUT
          Name of output file.
static java.lang.String OUTPUT_ENCODING
          Encoding of output file.
static java.lang.String PARSER_TOKEN
          Defines format of tokens.
static java.lang.String PMP_PREFIX
          Current prefix of configuration directives
static java.lang.String SOURCE_APPEND
          Code in this directive is automatically appended to program.
static java.lang.String SOURCE_PREPEND
          Code in this directive is automatically prepended before program.
static java.lang.String STACK_CLOSING_BRACKET
          Symbol used as opening backet in current macro call.
static java.lang.String STACK_ITEM__
          Items of array on top of stack Meaning of items depends on invocation.
static java.lang.String STACK_ITEMS_COUNT
          Number of items in array on top of te stack
static java.lang.String STACK_OPENING_BRACKET
          Symbol used as opening backet in current macro call.
static java.lang.String STRING__END
          End-of-string mark.
static java.lang.String STRING__MARKS_MODE
          String marks processing mode.
static java.lang.String STRING__MODE
          String processing mode.
static java.lang.String STRING__OUTPUT
          Output produced instead of string in discard mode.
static java.lang.String STRING__PARSER
          Parser which handles special symbols.
static java.lang.String STRING__STANDALONE
          Defines wheter this string can appear outside macro parameter list.
static java.lang.String STRING__START
          String opening symbol.
static java.lang.String STRING__SYMBOLS
          Format of special symbols inside string.
static java.lang.String STRING__TOKENS
          Format of string tokens
static java.lang.String VALUE_COPY
          Specifies string without special symbols.
static java.lang.String VALUE_COPY_END
          Starting symbol will be copied to output
static java.lang.String VALUE_COPY_START
          Starting symbol will be copied to output
static java.lang.String VALUE_DISCARD
          Specifies string which should be discarded.
static java.lang.String VALUE_NESTED
          Specifies nested strings.
static java.lang.String VALUE_PARSE
          Specifies that string should be scanned for special symbols and then outputted.
 
Constructor Summary
ConfigDirectives()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CODE_START

public static final java.lang.String CODE_START
Symbol marking start of block with macros. Default value: "".

See Also:
Constant Field Values

CODE_END

public static final java.lang.String CODE_END
Symbol marking start of block with macros. This token is handled differently than others - empty string does not match. Default value: "".

See Also:
Constant Field Values

CODE_MARKS_OUTPUT

public static final java.lang.String CODE_MARKS_OUTPUT
Controls handling with code marks. If false, marks are discarded (default) else sent to output. Default value: "".

See Also:
Constant Field Values

PARSER_TOKEN

public static final java.lang.String PARSER_TOKEN
Defines format of tokens. Parser treats tokens in the same way as single characters that were not identified as special symbols (macronames, string delimiters, etc).

See Also:
Constant Field Values

MACRO_PATTERN

public static final java.lang.String MACRO_PATTERN
Regular expression that is used for looking for macro calls.

If you want to use prefix or/and postfix to be part of macro call but not part of name of macro, you can use capturing groups. You can use more groups, but only group 1 will be used as macro name.

Note: If macro name does not match this expression (resp. capturing group 1), it cannot be called directly.

See Also:
Constant Field Values

MACRO_FALLBACK

public static final java.lang.String MACRO_FALLBACK
Fallback macro is called whenever parser comes across possible macro name, but appropriate macro is not found.

See Also:
Constant Field Values

MACRO_ARGUMENTS_REQUIRED

public static final java.lang.String MACRO_ARGUMENTS_REQUIRED
Specifies whether arguments must be present to call macro.

If set to true, macro name that is not followed by opening bracket (MACRO_OPENING_BRACKET) will not be recognized as macro call and handled as text.

See Also:
Constant Field Values

MACRO_CASE_SENSITIVE

public static final java.lang.String MACRO_CASE_SENSITIVE
Controls whether macro calls are case-sensitive.

It only affects process of searching for macro in macro list (which is always case-sensitive), and does not affect any other manipulations with macro list (such as retriaval of configuration variable).

If this variable is empty (or not set at all), then parser tries to find macro using case-insensitive search, if case-sensitive fails.

Default: "1"

See Also:
Constant Field Values

MACRO_OPENING_BRACKET

public static final java.lang.String MACRO_OPENING_BRACKET
default: "\([ \t]*"

See Also:
Constant Field Values

MACRO_CLOSING_BRACKET

public static final java.lang.String MACRO_CLOSING_BRACKET
default: "[ \t]*\)"

See Also:
Constant Field Values

MACRO_PARAM_SEPARATOR

public static final java.lang.String MACRO_PARAM_SEPARATOR
default: "[ \t]*,[ \t]"

See Also:
Constant Field Values

DEFINED_ENCODER

public static final java.lang.String DEFINED_ENCODER
Encoder used by all $(...) constructions in efined macros.

default: undefined

See Also:
Constant Field Values

DEFINED_SEPARATOR

public static final java.lang.String DEFINED_SEPARATOR
Separator used by $(nnn-mmm) constructions in defined macros.

default: undefined

See Also:
Constant Field Values

STACK_ITEMS_COUNT

public static final java.lang.String STACK_ITEMS_COUNT
Number of items in array on top of te stack

See Also:
Constant Field Values

STACK_ITEM__

public static final java.lang.String STACK_ITEM__
Items of array on top of stack Meaning of items depends on invocation. Numbering of items begins with 0 and ends with (STACK_ITEMS_COUNT-1).

See Also:
Constant Field Values

STACK_OPENING_BRACKET

public static final java.lang.String STACK_OPENING_BRACKET
Symbol used as opening backet in current macro call.

See Also:
Constant Field Values

STACK_CLOSING_BRACKET

public static final java.lang.String STACK_CLOSING_BRACKET
Symbol used as opening backet in current macro call.

See Also:
Constant Field Values

STRING__MODE

public static final java.lang.String STRING__MODE
String processing mode. Affects the way the string is processed. Allowed values:

See Also:
VALUE_COPY, VALUE_DISCARD, VALUE_PARSE, VALUE_NESTED, Constant Field Values

STRING__MARKS_MODE

public static final java.lang.String STRING__MARKS_MODE
String marks processing mode. Affects the way the string is processed. Possible values:

See Also:
Constant Field Values

STRING__STANDALONE

public static final java.lang.String STRING__STANDALONE
Defines wheter this string can appear outside macro parameter list. If set to true, this string can appear anywhere inside of code block.

See Also:
Constant Field Values

STRING__TOKENS

public static final java.lang.String STRING__TOKENS
Format of string tokens

See Also:
Constant Field Values

STRING__START

public static final java.lang.String STRING__START
String opening symbol. Must be defined. String types lookup is performed using this template.

See Also:
Constant Field Values

STRING__END

public static final java.lang.String STRING__END
End-of-string mark. If empty or not set, it is considered to have same value as corresponding STRING__START.

See Also:
Constant Field Values

STRING__SYMBOLS

public static final java.lang.String STRING__SYMBOLS
Format of special symbols inside string. These symbols wil be parsed using associated parser for this string type. If sting mode is not parse then this directive is ignored.

See Also:
STRING__MODE, Constant Field Values

STRING__PARSER

public static final java.lang.String STRING__PARSER
Parser which handles special symbols. This directive contains parser itself, not name of parser

See Also:
STRING__MODE, Constant Field Values

STRING__OUTPUT

public static final java.lang.String STRING__OUTPUT
Output produced instead of string in discard mode.

See Also:
STRING__MODE, Constant Field Values

OUTPUT

public static final java.lang.String OUTPUT
Name of output file. This directive is provided by InputOutput.

See Also:
Constant Field Values

INPUT_ENCODING

public static final java.lang.String INPUT_ENCODING
Encoding of input files. This directive is used by InputOutput to determine encoding of source files

See Also:
FileInputStream, InputStreamReader.InputStreamReader(java.io.InputStream, java.lang.String), Constant Field Values

OUTPUT_ENCODING

public static final java.lang.String OUTPUT_ENCODING
Encoding of output file. This directive is provided by InputOutput.

See Also:
Constant Field Values

SOURCE_APPEND

public static final java.lang.String SOURCE_APPEND
Code in this directive is automatically appended to program.

See Also:
Constant Field Values

SOURCE_PREPEND

public static final java.lang.String SOURCE_PREPEND
Code in this directive is automatically prepended before program.

See Also:
Constant Field Values

LAST_ERROR

public static final java.lang.String LAST_ERROR
This directive contains last error message

See Also:
Constant Field Values

LAST_WARNING

public static final java.lang.String LAST_WARNING
This directive contains last warning message

See Also:
Constant Field Values

LAST_NOTICE

public static final java.lang.String LAST_NOTICE
This directive contains last notice message

See Also:
Constant Field Values

LOCALE

public static final java.lang.String LOCALE
Current locale as comma separated list for Locale constructor.

Format of string is: language + ["," country ["," variant]].

See Also:
Constant Field Values

DEBUGLEVEL

public static final java.lang.String DEBUGLEVEL
Current level of debug output

See Also:
Constant Field Values

PMP_PREFIX

public static final java.lang.String PMP_PREFIX
Current prefix of configuration directives

See Also:
Constant Field Values

VALUE_COPY

public static final java.lang.String VALUE_COPY
Specifies string without special symbols.

See Also:
STRING__MODE, STRING__MARKS_MODE, Constant Field Values

VALUE_COPY_START

public static final java.lang.String VALUE_COPY_START
Starting symbol will be copied to output

See Also:
STRING__MARKS_MODE, Constant Field Values

VALUE_COPY_END

public static final java.lang.String VALUE_COPY_END
Starting symbol will be copied to output

See Also:
STRING__MARKS_MODE, Constant Field Values

VALUE_DISCARD

public static final java.lang.String VALUE_DISCARD
Specifies string which should be discarded.

See Also:
STRING__MODE, STRING__MARKS_MODE, Constant Field Values

VALUE_PARSE

public static final java.lang.String VALUE_PARSE
Specifies that string should be scanned for special symbols and then outputted.

See Also:
STRING__MODE, Constant Field Values

VALUE_NESTED

public static final java.lang.String VALUE_NESTED
Specifies nested strings.

See Also:
STRING__MODE, Constant Field Values
Constructor Detail

ConfigDirectives

public ConfigDirectives()