All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.babyfish.jimmer.sql.fetcher.Fetcher.g4 Maven / Gradle / Ivy

The newest version!
grammar Fetcher;

@header {
package org.babyfish.jimmer.sql.fetcher;
}

fetcher
    :
    (type = entityType)? body = fetchBody EOF
    ;

fetchBody
    :
    '{' (fields += field)* '}'
    ;

field
    :
    ('@' implicit = 'implicit')?
    prop = Identifier
    ( '(' arguments += argument (',' arguments += argument)* ')' )?
    (body = fetchBody)?
    ','?
    ;

argument
    :
    (name = Identifier)
    ':'
    value = ('true' | 'false' | Number | '')
    ;

entityType
    :
    parts += Identifier ('.' parts += Identifier)*
    ;

Identifier
    :
    [A-Za-z][A-Za-z0-9]*
    ;

Number
    :
    [0-9]+
    ;

WS
    :
    [ \r\t\n]+ -> skip
    ;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy