![JAR search and dependency download from the Maven repository](/logo.png)
grammar.AlgorithmParser.g4 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of autoconfig Show documentation
Show all versions of autoconfig Show documentation
Autoconfig module for Mork, allows to automatically select best parameters configuration and test different algorithm components combinations without user input
The newest version!
// Example: MULTISTART{iter=100, alg=SANNEAL{initialTemp=400, constructive=GRASP{alpha=0.5}}}
parser grammar AlgorithmParser;
options
{
tokenVocab = AlgorithmLexer;
}
init: component;
component: IDENT LBRCE properties? RBRCE;
properties: property (COMMA property)*;
property: IDENT EQ propertyValue;
// Allow optional {} after literal values to simplify algorithm reconstruction
propertyValue: literal (LBRCE RBRCE)? | component;
literal: NullLiteral | BooleanLiteral | FloatingPointLiteral | IntegerLiteral | StringLiteral | CharacterLiteral | arrayLiteral;
// Only allow arrays as literals of the same type value
arrayLiteral:
LBRCK RBRCK |
LBRCK IntegerLiteral (COMMA IntegerLiteral)* RBRCK |
LBRCK FloatingPointLiteral (COMMA FloatingPointLiteral)* RBRCK |
LBRCK BooleanLiteral (COMMA BooleanLiteral)* RBRCK |
LBRCK CharacterLiteral (COMMA CharacterLiteral)* RBRCK |
LBRCK StringLiteral (COMMA StringLiteral)* RBRCK;
© 2015 - 2025 Weber Informatics LLC | Privacy Policy