alpag.net manual
Options reference
< Example: Calculator | Command line reference >

Options reference

This section contains list of all Alpag options. Description provided here may not be sufficient to fully understand meaning of individual options. For detailed description refer to chapters covering particular mechanisms.

Output
Options for generating output
Output.Dir
Base directory for writing output
Output.FileNamePrefix
Default prefix for file names. Output files with no explicit user-defined names will have generated filenames with this prefix prepended
Code
General options for generated code
Code.HeaderComment
Comment to place in header section of all generated code files (multiple occurences possible)
Code.Using
Adds new entry ot list of usings/includes of all files (multiple occurences possible)
Code.Namespace
Namespace for all output files. Default value is 'Common'
Code.Language
Sets output language. The same as %lang directive
CSharp
Code.UserComments
Controls adding comments provided by user
Off
On
Code.UserCommentsDecoration
Controls adding language-dependent decoration of user comments
Off
On
Code.AppComments
Controls adding comments provided by application
Off
Basic
Detailed
Code.Base
Base code options (code common for lexer and parser)
Code.Base.ExtraBase
Names of additional bases for class (usually interfaces)
Code.Base.FileName
Output file name without extension. May include absolute or relative path. When set, overrides all file name autogeneration options
Code.Base.Using
Adds new entry ot list of usings/includes of this file
Code.Base.OwnClass
Emit standalone class. Otherwise code will be added to another class.
Code.Base.ClassName
Name of class. If not provided, default value is used.
Code.Base.ClassAccess
Access modifiers for class. Available options are language-dependent.
None
Public
Protected
Internal
ProtectedInternal
Private
Code.Base.ClassModifs
Additional modifiers for class. Available options are language-dependent.
None
Partial
Sealed
Static
Abstract
Final
StrictFp
Code.Base.BaseClassName
Name of base class (superclass). Only for classes that do not have implicit base class.
Code.Base.Emit
When set to false, disables emitting of this code part. Disabling, does not render the code obsolete (it must be emitted elsewhere anyway). Option useful for emitting overlapping sets of files.
Code.Base.OwnFile
When set to true, a dedicated file is created for this code part. When false, code is added to default file. This option may be ignored in certain configurations.
Code.Base.FileSuffix
Output file name suffix. Appended to OutputFileNamePrefix to produce file name. Enables creating set of files with common filename prefix
Code.Base.Namespace
Namespace for code. Overrides default namespace. Used only, if dedicated file is created for this code.
Lexer
Lexer options
Lexer.RejectEnabled
Enables switching between alternate matches (the same as AlternateMatchesEnabled)
Lexer.MapType
Full
Linear
Compact
Lexer.MoreEnabled
Enables prepending current match to value of next match (MORE)
Lexer.LessEnabled
Enables returning scanned and matched characters back to input for rescan (LESS)
Lexer.CatchIdentifierPrefix
Prefix prepended to names of regular expression catched subexpressions
Lexer.AlternateMatchesEnabled
Enables switching between alternate matches (aka REJECT).
Lexer.NoMatchAction
Action to take when input was not matched by any rule
ReturnError - When input did not match any rule lexer returs with error code
Skip - When input did not match any rule lexer skips current input char
Lexer.LocationInfoEnabled
Enable location info (position of matched text in input stream)
Lexer.TokenValueEnabled
Makes matched token value available to the user. When matched token values are not required, can be set to false.
Lexer.ReturnIdSource
Source of identifiers returned from lexer
Parser
Custom
Lexer.Code
Code generation options
Lexer.Code.ReadInputImpl
Implementation of ReadInput() function providing input to lexer
UserCode - User-provided code is added as function body
Virtual - Empty virtual method is added, which must be overriden in a subclass
UserOwn - User must provide own implementation of entire function including header
Lexer.Code.ContinueOnEOFImpl
Implementation of ContinueOnEOF() function controling behaviour when EOF is reached
None - No implementation
UserCode - User-provided code is added as function body
Virtual - Empty virtual method is added, which must be overriden in a subclass
Lexer.Code.NextTokenFuncArgs
Configuration of parameters for NextLexem() function
Empty - No extra arguments
ParserDefault - Default arguments used by parer
Custom - Custom,user-defined set of arguments
Lexer.Code.NextTokenFuncArgsCustom
Custom parameters for NextToken() function.
Lexer.Code.MacrosEnabled
Enables convenience macros for controlling lexer operation from user code
Lexer.Code.BaseDefs
Base lexer definitions options (code common for all lexers)
Lexer.Code.BaseDefs.FileName
Output file name without extension. May include absolute or relative path. When set, overrides all file name autogeneration options
Lexer.Code.BaseDefs.Using
Adds new entry ot list of usings/includes of this file
Lexer.Code.BaseDefs.WithBase
Place code together with base class. Otherwise place together with subclass.
Lexer.Code.BaseDefs.Emit
When set to false, disables emitting of this code part. Disabling, does not render the code obsolete (it must be emitted elsewhere anyway). Option useful for emitting overlapping sets of files.
Lexer.Code.BaseDefs.OwnFile
When set to true, a dedicated file is created for this code part. When false, code is added to default file. This option may be ignored in certain configurations.
Lexer.Code.BaseDefs.FileSuffix
Output file name suffix. Appended to OutputFileNamePrefix to produce file name. Enables creating set of files with common filename prefix
Lexer.Code.BaseDefs.Namespace
Namespace for code. Overrides default namespace. Used only, if dedicated file is created for this code.
Lexer.Code.BaseClass
Base lexer class options (class common for all lexers)
Lexer.Code.BaseClass.ExtraBase
Names of additional bases for class (usually interfaces)
Lexer.Code.BaseClass.FileName
Output file name without extension. May include absolute or relative path. When set, overrides all file name autogeneration options
Lexer.Code.BaseClass.Using
Adds new entry ot list of usings/includes of this file
Lexer.Code.BaseClass.WithBase
Place code together with base class. Otherwise place together with subclass.
Lexer.Code.BaseClass.OwnClass
Emit standalone class. Otherwise code will be added to another class.
Lexer.Code.BaseClass.ClassName
Name of class. If not provided, default value is used.
Lexer.Code.BaseClass.ClassAccess
Access modifiers for class. Available options are language-dependent.
None
Public
Protected
Internal
ProtectedInternal
Private
Lexer.Code.BaseClass.ClassModifs
Additional modifiers for class. Available options are language-dependent.
None
Partial
Sealed
Static
Abstract
Final
StrictFp
Lexer.Code.BaseClass.BaseClassName
Name of base class (superclass). Only for classes that do not have implicit base class.
Lexer.Code.BaseClass.Emit
When set to false, disables emitting of this code part. Disabling, does not render the code obsolete (it must be emitted elsewhere anyway). Option useful for emitting overlapping sets of files.
Lexer.Code.BaseClass.OwnFile
When set to true, a dedicated file is created for this code part. When false, code is added to default file. This option may be ignored in certain configurations.
Lexer.Code.BaseClass.FileSuffix
Output file name suffix. Appended to OutputFileNamePrefix to produce file name. Enables creating set of files with common filename prefix
Lexer.Code.BaseClass.Namespace
Namespace for code. Overrides default namespace. Used only, if dedicated file is created for this code.
Lexer.Code.Lexer
Lexer class options. Ignored if combined lexer-parser is used
Lexer.Code.Lexer.ExtraBase
Names of additional bases for class (usually interfaces)
Lexer.Code.Lexer.FileName
Output file name without extension. May include absolute or relative path. When set, overrides all file name autogeneration options
Lexer.Code.Lexer.Using
Adds new entry ot list of usings/includes of this file
Lexer.Code.Lexer.ClassName
Name of class. If not provided, default value is used.
Lexer.Code.Lexer.ClassAccess
Access modifiers for class. Available options are language-dependent.
None
Public
Protected
Internal
ProtectedInternal
Private
Lexer.Code.Lexer.ClassModifs
Additional modifiers for class. Available options are language-dependent.
None
Partial
Sealed
Static
Abstract
Final
StrictFp
Lexer.Code.Lexer.BaseClassName
Name of base class (superclass). Only for classes that do not have implicit base class.
Lexer.Code.Lexer.Emit
When set to false, disables emitting of this code part. Disabling, does not render the code obsolete (it must be emitted elsewhere anyway). Option useful for emitting overlapping sets of files.
Lexer.Code.Lexer.OwnFile
When set to true, a dedicated file is created for this code part. When false, code is added to default file. This option may be ignored in certain configurations.
Lexer.Code.Lexer.FileSuffix
Output file name suffix. Appended to OutputFileNamePrefix to produce file name. Enables creating set of files with common filename prefix
Lexer.Code.Lexer.Namespace
Namespace for code. Overrides default namespace. Used only, if dedicated file is created for this code.
Lexer.Code.Rules
Options for emiting rule code
Lexer.Code.Rules.EmitWhenEmpty
Emit empty cases also for lexer rules with no user code (for debugging)
Lexer.Code.Rules.EmitShared
When off, user code shared by multiple rules will be cloned multiple times and placed in dedicated cases for each rule.
Lexer.Code.Rules.AutoBreak
Controls adding terminal switch-break instructions at the end of each rule
Always
Never
Lexer.Code.Rules.DisableWarnings
Disables warning generated by redundant switch-break instructions
Lexer.In
Input handling options
Lexer.In.Encoding
Input encoding format. When encoding switching is enabled, this is the default encoding.
ASCII - ASCII 7-bit encoding
ASCIICP - 8bit encoding with code page translation
ASCIIRAW - 8bit encoding without interpretation of 128..255 range
UTF8 - Unicode UTF-8 variable length encoding (full Unicode coverage)
UCS2 - Unicode UCS2 fixed two byte encoding (BMP-only coverage)
UTF16 - Unicde UTF-16 variable two to four byte encoding (full Unicode coverage)
Lexer.In.EncodingSet
List of input encodings supported by lexer (multiple values allowed). Leave empty for all encodings
ASCII - ASCII 7-bit encoding
ASCIICP - 8bit encoding with code page translation
ASCIIRAW - 8bit encoding without interpretation of 128..255 range
UTF8 - Unicode UTF-8 variable length encoding (full Unicode coverage)
UCS2 - Unicode UCS2 fixed two byte encoding (BMP-only coverage)
UTF16 - Unicde UTF-16 variable two to four byte encoding (full Unicode coverage)
Lexer.In.EncodingMaps
Enables input code maps for some known encodings. These maps can be used in ASCIICP mode.
_none
Windows
ISO8859
Lexer.In.ZeroCountAction
When reading input and zero bytes is returned, setting this option results in reading again (until explicit EOF). Default behaviour is to treat zero as EOF
EOF - Zero byte count is interpreted as end-of-file
RepeatRead - When zero bytes is returned, another read is performed until explicit EOF is reached
Lexer.In.Format
Input buffer format (bytes or characters)
None
Bytes - Buffer is byte array
Chars - Buffer is character array
BytesChars
Lexer.In.FormatDefault
Input buffer default format if multiple formats are enabled
Bytes - Buffer is byte array
Chars - Buffer is character array
Lexer.In.EncodingSwitchable
Enables switching input buffer encoding in runtime.
Lexer.In.EncodingAutodetect
Enables input encoding autodetection.
Lexer.In.EncodingAutodetectOptions
Enables non-standard input encoding autodetection mechanisms. By default only Byte Order Mark (BOM) is interpreted.
None
SkipWide - Disables detection of wide encodings (UCS2, UTF-16)
WideIsUCS - When wide encoding is detected, assume UCS2 (not UTF-16)
SkipWideNonStandard - Do not perform non-standard tests for wide encoding (used in absence of BOM)
Lexer.In.EatBOM
When set, initial Byte Order Mark (BOM) character is consumed (not passed to lexer)
Lexer.In.Endiannes
Default byte order (endiannes) for input bytes. Ignored for char buffers.
LE - Little Endian ordering (lowest byte comes first)
BE - Big Endian ordering (highest byte comes first)
Lexer.In.ErrorReaction
Error reaction to invalid input byte sequence
Throw - Throw exception
ReturnError - Return error code from lexer
IgnoreSkip - Ingore and skip invalid input chars. Resync on next valid char
ReplaceWithChar - Replace errornous input chars with replacement char
Lexer.In.ErrorReplacementChar
Replacement character for unrecognized input characters. Using characters outside of intended lexer character-map width is not advised (ASCII range is always safe).
Lexer.Out
Output handling options
Lexer.Out.Encoding
Output encoding format. When encoding switching is enabled, this is the default encoding.
ASCII - ASCII 7-bit encoding
ASCIICP - 8bit encoding with code page translation
ASCIIRAW - 8bit encoding without interpretation of 128..255 range
UTF8 - Unicode UTF-8 variable length encoding (full Unicode coverage)
UCS2 - Unicode UCS2 fixed two byte encoding (BMP-only coverage)
UTF16 - Unicde UTF-16 variable two to four byte encoding (full Unicode coverage)
Lexer.Out.Encodings
List of output encodings supported by lexer (comma separated). Leave empty for all encodings
ASCII - ASCII 7-bit encoding
ASCIICP - 8bit encoding with code page translation
ASCIIRAW - 8bit encoding without interpretation of 128..255 range
UTF8 - Unicode UTF-8 variable length encoding (full Unicode coverage)
UCS2 - Unicode UCS2 fixed two byte encoding (BMP-only coverage)
UTF16 - Unicde UTF-16 variable two to four byte encoding (full Unicode coverage)
Lexer.Out.Format
Output buffer format (bytes or characters)
None
Bytes - Buffer is byte array
Chars - Buffer is character array
BytesChars
Lexer.Out.FormatDefault
Output buffer default format if multiple formats are enabled
Bytes - Buffer is byte array
Chars - Buffer is character array
Lexer.Out.EncodingSwitchable
Enables switching output buffer encoding in runtime.
Lexer.Out.Endiannes
Byte order (endiannes) for output buffer. Ignored for char buffers.
LE - Little Endian ordering (lowest byte comes first)
BE - Big Endian ordering (highest byte comes first)
Lexer.Out.ReplacementCharN
Replacement character for output characters outside of encoding range. For narrow encodings.
Lexer.Out.ReplacementCharW
Replacement character for output characters outside of encoding range. For wide encodings.
Lexer.Out.OutFormatEqualIn
Declares that output format is exactly equal input format (lexer will not perform any transcoding). Cannot be combined with encoding-changing options. Note: This user's declaration is not validated by lexer. Use with care.
Lexer.Buffers
Buffer options
Lexer.Buffers.InBufSwitchingEnabled
Enables switching input buffers during run (allows multiple input buffers/files)
Lexer.Buffers.InBufStackEnabled
Enables input buffer stack. Provides support for input buffer push/pop functionality
Lexer.Buffers.RunPlacement
Sets explicit location for currently processed run. If in doubt, leave Auto
Auto - Automatic choice
Input - Input buffer
Lexer - Internal lexer buffer
Lexer.Buffers.TokenValuePlacement
Sets explicit location for output token value.
Auto
Input - Input buffer
Lexer - Internal lexer's character buffer
Output - Output buffer
Lexer.Buffers.In
Input buffer configuration parameters for fine-tuning lexer behaviour.
Lexer.Buffers.In.Enabled
Explicitly enable or disable buffer.
False
True
Auto
Lexer.Buffers.In.Type
Determines buffer storage variant.
Simple - Simple buffer allocation method with buffer growing as necessary
Fragments - Buffer allocation using multiple fragments
Lexer.Buffers.In.SizeStart
Initial buffer size
Lexer.Buffers.In.SizeRepack
Amount of empty space causing buffer repack
Lexer.Buffers.In.SizeMax
Maximum buffer size (overflow causes error)
Lexer.Buffers.Lex
Inner lexer character parameters for fine-tuning lexer behaviour.
Lexer.Buffers.Lex.Enabled
Explicitly enable or disable buffer.
False
True
Auto
Lexer.Buffers.Lex.Type
Determines buffer storage variant.
Simple - Simple buffer allocation method with buffer growing as necessary
Fragments - Buffer allocation using multiple fragments
Lexer.Buffers.Lex.SizeStart
Initial buffer size
Lexer.Buffers.Lex.SizeRepack
Amount of empty space causing buffer repack
Lexer.Buffers.Lex.SizeMax
Maximum buffer size (overflow causes error)
Lexer.Buffers.Out
Output buffer parameters for fine-tuning lexer behaviour.
Lexer.Buffers.Out.Enabled
Explicitly enable or disable buffer.
False
True
Auto
Lexer.Buffers.Out.Type
Determines buffer storage variant.
Simple - Simple buffer allocation method with buffer growing as necessary
Fragments - Buffer allocation using multiple fragments
Lexer.Buffers.Out.SizeStart
Initial buffer size
Lexer.Buffers.Out.SizeRepack
Amount of empty space causing buffer repack
Lexer.Buffers.Out.SizeMax
Maximum buffer size (overflow causes error)
Lexer.Eol
End-of-line handling options
Lexer.Eol.Codes
List of well-known EOL codes recognized as End-Of-Line (mutliple values allowed)
None
CR - Carret Return (0xD)
LF - Line Feed (0xA)
CRLF - Carret Return, Line Feed (0xD,0xA)
VT - Vertical Tab (0xB)
FF - Form Feed (0xC)
NEL - Unicode Next Line (0x85)
LSEP - Unicode Line Separator (0x2028)
PSEP - Unicode Paragraph Separator (0x2029)
Lexer.Eol.Mode
General EOL handling mode: EOLs detected during input scan, or embedded in lexer tables.
None - No EOL processing is done.
Symbol - EOLs detected during input buffer scan are converted to dedicated symbol.
Chars - EOLs are converted to individual characters and embedded in lexer tables. NOTE: Some features DO NOT WORK in this mode.
Lexer.Eol.MapMode
Type of EOL map. Applies to EOL Symbol mode only. Type of EOL map chosen for the lexer cannot be switched at runtime
Simple - EOL map is built as simple flat map
Complex - EOL map is built as trie. Good choice if EOLs include Unicode codepoints
Auto - Automatic choice of eol map mode based on default set of EOLs chosen
Lexer.Eol.EolOnEof
When set, rules matching end of line using $ will also match end of file
Lexer.Eol.OutConversionEnabled
Enables EOL sequence conversion when writing to output. Available only in Symbol EOL mode.
Lexer.Eol.OutConversionOnOff
Enables on/off switching EOL conversion.
Lexer.Eol.OutCode
Output EOL code used during EOL conversion.
None
CR - Carret Return (0xD)
LF - Line Feed (0xA)
CRLF - Carret Return, Line Feed (0xD,0xA)
VT - Vertical Tab (0xB)
FF - Form Feed (0xC)
NEL - Unicode Next Line (0x85)
LSEP - Unicode Line Separator (0x2028)
PSEP - Unicode Paragraph Separator (0x2029)
Lexer.Eol.OutCodeSwitchable
Enables changing EOL sequence used for EOL conversion.
Lexer.Regex
Options and default settings for regular expressions
Lexer.Regex.LineFeedMode
Meaning of '\n' escape code used in regular expressions (any EOL or literal LF).
EOL - Escape char '\n' matches any EOL sequence
LF - Escape '\n' matches only literal LF (0xA)
Lexer.Regex.AllEolsEscapeEnabled
Enables non-standard \N escape code used in regular expressions for any EOL
Lexer.Regex.NamedCharRanges
Set of named character ranges used in regular expressions (POSIX-like or Unicode). This setting is independent from encoding.
ASCII - POSIX-like character ranges (matching ASCII encodings)
Unicode - Unicode named character ranges
Lexer.Regex.CaseInsensitive
When set, by default regular expressions are case-insensitive
Lexer.Regex.RangeIncludesOOR
When set, out-of-range symbol is by default included in lexer character range
Lexer.Range
Input character range options
Lexer.Range.Mode
Range of lexer's character map. This can be narrower than input encoding used, providing that lexer rules do not reference characters outside of this range.
Explicit - Range explicitly specified by user
UsedRangeExact - Range exactly matching characters used in regular expressions
UsedRangeRoundUp - Range covering characters used in regular expressions rounded up to 8-bit, 16-bit or full unicode range
EncodingRange - Range covering all specified input encodings
ASCII7 - 7-bit range
ASCII8 - 8-bit range
Unicode2B - 16-bit range mathing Unicode Basic Multilingual Plane (BMP)
Unicode - Full Unicode range
Lexer.Range.RangeTo
Explicit end of lexer's character map range
Lexer.Range.OutOfRangeAction
Action taken by lexer when out-of range input character is encountered. Use non-fatal setting if lexer map is narrower then input encoding range
UnknownSymbol - Out-of-range characters are returned as unknown symbols.
Error - Out-of-range character produces error.
ReplaceWithChar - Out-of-range character is replaced with replacement char.
OutOfRangeSymbol - Out-of-range character is replaced with dedicated 'out-of-range' symbol.
Lexer.Range.OutOfRangeReplacementChar
Character used to replace out-of-range input characters when passing them to lexer
Lexer.Partitions
Options for automaton partitioning
Lexer.Partitions.Mode
Mechanism used for partitioning lexer automaton. Used for catchemnt of regex fragments.
None
Borders - Partitioning using subgraph boundaries
States - Partitioning using subgraph internal states
Transitions - Partitioning using subgraph transitions
Auto
Lexer.Partitions.HybridModeAllowed
Allow hybrid partitioning of lexer automaton graph
Lexer.Partitions.NoErrorOnCollision
When lexer automaton partitioning fails, do not exit with error. This produces a lexer that can parse input, but will not corretly match regex subpartitions
Lexer.Partitions.MaxPartitionSetSize
Maximum count of overlapping partitions in lexer automaton. With higher count more complicated cases can be covered, but lexing is slower.
Lexer.Partitions.MaxPartitionSetCount
Maxiumum number of partitions in lexer automaton. With this count increased more complicated cases can be covered
Lexer.Debug
Options for lexer debugging
Lexer.Debug.Methods
Adds methods for accessing information about lexer automaton
Lexer.Debug.Infos
Places in code additional data structures describing lexer (for debugging)
Lexer.Debug.Comments
Puts debug comments before user code for individual rules.
Lexer.Debug.RecentStepsReport
Saves recent lexer actions in an array
Lexer.Debug.RecentStepsCount
Count of recent lexer actions to be remember
Lexer.Debug.LastInputChar
When set, last input character is stored in variable (for debugging)
Lexer.Trace
Options for tracing lexer operation
Lexer.Trace.NextSymbol
When set, input symbols are reported to NextSymbol() debug method
Lexer.Trace.NextSymbolImpl
Implementation of NextSymbol() debug method
UserCode - User-provided code is added as function body
Virtual - Empty virtual method is added, which must be overriden in a subclass
UserOwn - User must provide own implementation of entire function including header
Lexer.Trace.InputMatched
When set, each acepted input (rule match) is reported to InputMatched() debug method
Lexer.Trace.InputMatchedImpl
Implementation of InputMatched() debug method
UserCode - User-provided code is added as function body
Virtual - Empty virtual method is added, which must be overriden in a subclass
UserCodeInline - No funciton is declared. User-provided code is placed instead of invlcation. Some restrictions apply.
UserOwn - User must provide own implementation of entire function including header
Lexer.Trace.InputNotMatched
When set, and lexer cannot find match at current position InputNoMatch() debug methodis called
Lexer.Trace.InputNotMatchedImpl
Implementation of InputNoMatch() debug method
UserCode - User-provided code is added as function body
Virtual - Empty virtual method is added, which must be overriden in a subclass
UserOwn - User must provide own implementation of entire function including header
Lexer.Modes
Mode options
Lexer.Modes.StackEnabled
Enables lexer conditional modes stack. Provides support for mode push/pop functionality
False
WhenPossible
True
Lexer.Modes.IdentifierPrefix
Prefix prepended to names of lexer conditional modes (used in constants for modes)
Parser
Parser options
Parser.GrammarType
Type of generated grammar.
LR - Canonical LR grammar
LALR - LALR grammar
LROpt - LR optimized grammar. Smaller than canonical LR but without LALR conflicts.
Parser.MapType
Parser map packing mode
Full
Linear
Compact
Parser.PullPush
Tells if parser gets next symbol by itself (default) or is passed next symbol as argument.
Pull
Push
Parser.StackSizeMax
Maximum size of parser stack (overflow causes error)
Parser.StackClearOnError
Tells if parser stack is cleared when error occurs. Setting this to false leaves stack for inspection.
Parser.Tokens
Options for input tokens
Parser.Tokens.IdentifierPrefix
Declares string prefix for token constants gerenated for token ids
Parser.Tokens.Mapping
Mapping input token ids to internal token ids
Auto - Tokens mapped to contiguous range when required
No - Tokens not packed (unless resulting map size would be very large)
Yes - Tokens mapped to contiguous range
Parser.Tokens.CharIsCode
When set, character constant in token declaration is source of code for input symbol
Parser.Reduction
Parser.Reduction.PreviewCheck
Checks if sequence of reductions ends with action accepting current lookahead symbol. Improves error detection.
No
Yes
IfPossible
Parser.Reduction.LookaheadFetch
Tells if lookahead symbol is fetched always or only when required. Use WhenRequired in combination with DefaultReduction
WhenRequired
Always
Parser.Reduction.Defaulting
Turns on default reduction mechanism. States with only one action, a reduction for given set of lookahead symbols, that action is assumed for all terminals
Off - No default reductions
On - Use default reductions if possible
Auto - Use default reductions when grammar type is not canonical, and number of applicable states is significant
Parser.Reduction.ExplicitDefaultingPurpose
Contains user declaration on purpose of explicit default reductons: optimization of functional
Optimization - Default reductions are used for optimization purposes only
Functional - Default reductions are functional
Parser.Reduction.LookaheadContextDefaulting
Can enable default reduction for productions with lookahead context. In such case lookahead contexts are used only to differentiate productions, not to narrow-down the grammar.
Never - Never use default reduction for productions with right-context lookaheads
WhenNonDiscerning - Assume that right-context lookaheads are just to differentiate productions. Allow default reduction for states where only one candidate reduction exists
Parser.Errors
Parser.Errors.Recovery
Enables error recovery via productions with 'error' symbol
No
Yes
Auto
Parser.Errors.ErrorSymbolLookaheadAction
Controls consumption of input symbol that caused the error
Leave - Symbol that caused the error is left as lookeahead symbol
Eat - Symbol that caused the error is discarded
Mixed - User can set for each error whether lookahead symbol will be discarded. By default it is not discarded.
Parser.Errors.ErrorSymbolValue
Value of error token
None
Location
Data
DataAndLocation
Parser.Value
Token value options
Parser.Value.FieldGet
Getter syntax for field with token value (for parsers with single value type).
Parser.Value.TypeRequirement
Tells if value type must be declared for all tokens in grammar, or just for those that are referenced
Used
All
Parser.Value.FieldName
Name of field with token value (for parsers with single value type).
Parser.Value.FieldAccess
Access syntax for field with token value (for parsers with single value type).
Parser.Value.FieldSet
Setter syntax for field with token value (for parsers with single value type).
Parser.Value.FieldImpl
Implementation of token value fields (automatic or manual)
Auto
Manual
Parser.Value.FieldType
Type of token value (for parsers with single value type).
Parser.Location
Row and column location options
Parser.Location.Mode
Type of location information stored on stack.
Off - No location info
Start - Start of matched text
Range - Start and end of macthed text
Parser.Location.AutoCalc
Enables automatic location calculation for productions based on location of elements.
Parser.Location.FieldName
Parser.Location.FieldAccess
Name of field with token location.
Parser.ValueData
Options for value data returned by lexer along with symbol
Parser.ValueData.ClearNew
Tells if token values must be cleared before setting new value to them. Applies to values that are newly allocated.
Parser.ValueData.ClearReused
Tells if token values be cleared before setting new value to them. Applies to values that can contain old value. Set to false if values can be simply overwritten.
Parser.ValueData.ClearDeleted
Tells if token values sholud be cleared after use when value is being deleted. Set to false if values can be simply abandoned.
Parser.ValueData.ClearConsumed
Tells if token values sholud be cleared after use when value was assigned to another variable. Set to false if values can be simply abandoned.
Parser.ValueData.Placement
Placement of value returned along with token. Either on parser stack or in dedicated storage
Stack - Value data placement on parser stack
Parser.Debug
Options for parser debugging
Parser.Debug.Methods
Adds methods for accessing information about parser automaton
Parser.Debug.Infos
Adds data describing parser (does not include state infos)
Parser.Debug.StateInfos
Adds data describing parser states
Parser.Debug.DebugStack
When set, parse stack can be accessed, and stack elements contain identifiers of shifted elements (for debugging)
Parser.Debug.RecentStepsReport
Saves recent parser actions in an array
Parser.Debug.RecentStepsValueData
Saves recent parser steps along with value summary (extra overhead)
Parser.Debug.ValueDataInfoMethod
Name of method returning summary info of value, default is ToString()
Parser.Debug.RecentStepsCount
Count of recent parser actions to remember
Parser.Debug.Comments
Puts debug comments before user code for individual productions.
Parser.Debug.LastErrorInfo
Adds variables for tracking last error state and location
Parser.Trace
Options for tracing parser operation
Parser.Trace.ParseError
When set, parse errors are reported to TraceParseError() debug method. This option does not change error recovery mechanisms of the parser.
Parser.Trace.ParseErrorImpl
Implementation of TraceParseError() debug method
UserCode - User-provided code is added as function body
Virtual - Empty virtual method is added, which must be overriden in a subclass
UserOwn - User must provide own implementation of entire function including header
Parser.Trace.ParseShift
When set, shift operations are reported to TraceParseShift() debug method
Parser.Trace.ParseShiftImpl
Implementation of TraceParseShift() debug method
UserCode - User-provided code is added as function body
Virtual - Empty virtual method is added, which must be overriden in a subclass
UserCodeInline - No funciton is declared. User-provided code is placed instead of invlcation. Some restrictions apply.
UserOwn - User must provide own implementation of entire function including header
Parser.Trace.ParseReduce
When set, reduce operations are reported to TraceParseReduce() debug method
Parser.Trace.ParseReduceImpl
Implementation of TraceParseReduce() debug method
UserCode - User-provided code is added as function body
Virtual - Empty virtual method is added, which must be overriden in a subclass
UserCodeInline - No funciton is declared. User-provided code is placed instead of invlcation. Some restrictions apply.
UserOwn - User must provide own implementation of entire function including header
Parser.Code
Parser.Code.ParseFuncArgsCustom
Custom parameters for Parse() function.
Parser.Code.NextTokenImpl
Implementation of NextToken() function providing input to parser
UserCode - User-provided code is added as function body
Virtual - Empty virtual method is added, which must be overriden in a subclass
UserCodeInline - No funciton is declared. User-provided code is placed instead of invlcation. Some restrictions apply.
UserOwn - User must provide own implementation of entire function including header
Parser.Code.NextTokenFuncName
Custom name for NextToken() function providing input to parser
Parser.Code.RuleCodeAutoBreak
Controls adding terminal switch-break instructions at the end of each rule
Always
Never
Parser.Code.RuleCodeDisableWarnings
Disables warning generated by redundant switch-break instructions
Parser.Code.BaseDefs
Base parser definition options (code common for all parsers).
Parser.Code.BaseDefs.FileName
Output file name without extension. May include absolute or relative path. When set, overrides all file name autogeneration options
Parser.Code.BaseDefs.Using
Adds new entry ot list of usings/includes of this file
Parser.Code.BaseDefs.WithBase
Place code together with base class. Otherwise place together with subclass.
Parser.Code.BaseDefs.Emit
When set to false, disables emitting of this code part. Disabling, does not render the code obsolete (it must be emitted elsewhere anyway). Option useful for emitting overlapping sets of files.
Parser.Code.BaseDefs.OwnFile
When set to true, a dedicated file is created for this code part. When false, code is added to default file. This option may be ignored in certain configurations.
Parser.Code.BaseDefs.FileSuffix
Output file name suffix. Appended to OutputFileNamePrefix to produce file name. Enables creating set of files with common filename prefix
Parser.Code.BaseDefs.Namespace
Namespace for code. Overrides default namespace. Used only, if dedicated file is created for this code.
Parser.Code.Exports
Parser exports options (constants defined for use outside of parser).
Parser.Code.Exports.ExtraBase
Names of additional bases for class (usually interfaces)
Parser.Code.Exports.FileName
Output file name without extension. May include absolute or relative path. When set, overrides all file name autogeneration options
Parser.Code.Exports.Using
Adds new entry ot list of usings/includes of this file
Parser.Code.Exports.OwnClass
Emit standalone class. Otherwise code will be added to another class.
Parser.Code.Exports.ClassName
Name of class. If not provided, default value is used.
Parser.Code.Exports.ClassAccess
Access modifiers for class. Available options are language-dependent.
None
Public
Protected
Internal
ProtectedInternal
Private
Parser.Code.Exports.ClassModifs
Additional modifiers for class. Available options are language-dependent.
None
Partial
Sealed
Static
Abstract
Final
StrictFp
Parser.Code.Exports.BaseClassName
Name of base class (superclass). Only for classes that do not have implicit base class.
Parser.Code.Exports.Emit
When set to false, disables emitting of this code part. Disabling, does not render the code obsolete (it must be emitted elsewhere anyway). Option useful for emitting overlapping sets of files.
Parser.Code.Exports.OwnFile
When set to true, a dedicated file is created for this code part. When false, code is added to default file. This option may be ignored in certain configurations.
Parser.Code.Exports.FileSuffix
Output file name suffix. Appended to OutputFileNamePrefix to produce file name. Enables creating set of files with common filename prefix
Parser.Code.Exports.Namespace
Namespace for code. Overrides default namespace. Used only, if dedicated file is created for this code.
Parser.Code.Parser
Parser class options. Ignored if combined lexer-parser is used
Parser.Code.Parser.ExtraBase
Names of additional bases for class (usually interfaces)
Parser.Code.Parser.FileName
Output file name without extension. May include absolute or relative path. When set, overrides all file name autogeneration options
Parser.Code.Parser.Using
Adds new entry ot list of usings/includes of this file
Parser.Code.Parser.ClassName
Name of class. If not provided, default value is used.
Parser.Code.Parser.ClassAccess
Access modifiers for class. Available options are language-dependent.
None
Public
Protected
Internal
ProtectedInternal
Private
Parser.Code.Parser.ClassModifs
Additional modifiers for class. Available options are language-dependent.
None
Partial
Sealed
Static
Abstract
Final
StrictFp
Parser.Code.Parser.BaseClassName
Name of base class (superclass). Only for classes that do not have implicit base class.
Parser.Code.Parser.Emit
When set to false, disables emitting of this code part. Disabling, does not render the code obsolete (it must be emitted elsewhere anyway). Option useful for emitting overlapping sets of files.
Parser.Code.Parser.OwnFile
When set to true, a dedicated file is created for this code part. When false, code is added to default file. This option may be ignored in certain configurations.
Parser.Code.Parser.FileSuffix
Output file name suffix. Appended to OutputFileNamePrefix to produce file name. Enables creating set of files with common filename prefix
Parser.Code.Parser.Namespace
Namespace for code. Overrides default namespace. Used only, if dedicated file is created for this code.
Parser.Conflicts
Conflict resolution options
Parser.Conflicts.SR_ResolveAsShift
Resolve shift-reduce conflict as shift
No
Yes
YesWarn
Parser.Conflicts.RR_ResolveByRuleOrder
Resolve reduce-reduce conflict by order of production.
No
Yes
YesWarn
Parser.Conflicts.SR_ResolveByPrecedence
Resolve shift-reduce conflict by priority of last terminal.
No
Yes
YesWarn
Parser.Conflicts.SR_ResolveByAssoc
Resolve shift-reduce conflict using associativity.
No
Yes
YesWarn
Parser.Conflicts.RR_ResolveIdenticalByOrderInRule
Resolve reduce-reduce conflict of identical productions by order.
No
Yes
YesWarn
Parser.Conflicts.RR_ResolveIndenticalPreferLookahead
Resolve reduce-reduce conflict of identical productions choosing production with lookahead context.
No
Yes
YesWarn
LexerParser
Options for combined lexer-parser
LexerParser.Combined
When set, combined lexer-parser class is generated
LexerParser.Code
Options for combined lexer-parser class. Overrides settings for standalone lexer and parser classes
LexerParser.Code.ExtraBase
Names of additional bases for class (usually interfaces)
LexerParser.Code.FileName
Output file name without extension. May include absolute or relative path. When set, overrides all file name autogeneration options
LexerParser.Code.Using
Adds new entry ot list of usings/includes of this file
LexerParser.Code.ClassName
Name of class. If not provided, default value is used.
LexerParser.Code.ClassAccess
Access modifiers for class. Available options are language-dependent.
None
Public
Protected
Internal
ProtectedInternal
Private
LexerParser.Code.ClassModifs
Additional modifiers for class. Available options are language-dependent.
None
Partial
Sealed
Static
Abstract
Final
StrictFp
LexerParser.Code.BaseClassName
Name of base class (superclass). Only for classes that do not have implicit base class.
LexerParser.Code.Emit
When set to false, disables emitting of this code part. Disabling, does not render the code obsolete (it must be emitted elsewhere anyway). Option useful for emitting overlapping sets of files.
LexerParser.Code.OwnFile
When set to true, a dedicated file is created for this code part. When false, code is added to default file. This option may be ignored in certain configurations.
LexerParser.Code.FileSuffix
Output file name suffix. Appended to OutputFileNamePrefix to produce file name. Enables creating set of files with common filename prefix
LexerParser.Code.Namespace
Namespace for code. Overrides default namespace. Used only, if dedicated file is created for this code.
< Example: Calculator | Command line reference >
Alpag Manual