Skip to content

Commit

Permalink
adds plugins section
Browse files Browse the repository at this point in the history
  • Loading branch information
ivangsa committed Aug 26, 2023
1 parent d1a1f5a commit a31e91c
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/main/antlr4/io.github.zenwave360.zdl.antlr/Zdl.g4
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ ARRAY: '[]';
// Keywords
CONFIG: 'config';
APIS: 'apis';
PLUGINS: 'plugins';
DISABLED: 'disabled';
ASYNCAPI: 'asyncapi';
OPENAPI: 'openapi';
ENTITY: 'entity';
Expand Down Expand Up @@ -78,7 +80,7 @@ OPTION_NAME: '@' [a-zA-Z_][a-zA-Z0-9_]*;

fragment DIGIT : [0-9] ;

ID: [a-zA-Z_][a-zA-Z0-9_]*;
ID: [a-zA-Z_][a-zA-Z0-9_.]*;
INT: DIGIT+ ;
NUMBER: DIGIT+ ([.] DIGIT+)? ;

Expand Down Expand Up @@ -126,7 +128,7 @@ object: LBRACE pair (COMMA pair)* RBRACE;
array: LBRACK? value (COMMA value)* RBRACK?;
config: CONFIG config_body;
config_body: LBRACE config_option* RBRACE;
config_body: LBRACE config_option* plugins? RBRACE;
config_option: field_name complex_value;
apis: APIS apis_body;
Expand All @@ -139,6 +141,16 @@ api_body: LBRACE api_configs RBRACE;
api_configs: (api_config)*;
api_config: field_name complex_value;
plugins: PLUGINS plugins_body;
plugins_body: LBRACE plugin* RBRACE;
plugin: javadoc? plugin_disabled plugin_name plugin_body;
plugin_disabled: DISABLED?;
plugin_name: ID;
plugin_body: LBRACE plugin_configs RBRACE;
plugin_configs: (plugin_config)*;
plugin_config: plugin_cli_option | field_name complex_value;
plugin_cli_option: '--' ID (EQUALS simple)?;
// @options
annotations: option*;
option: option_name (LPAREN option_value RPAREN)?; // (LPAREN option_value RPAREN)? | '@' option_name (LPAREN option_value RPAREN)?;
Expand Down

0 comments on commit a31e91c

Please sign in to comment.