org.babyfish.jimmer.sql.fetcher.Fetcher.g4 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jimmer-sql Show documentation
Show all versions of jimmer-sql Show documentation
A revolutionary ORM framework for both java and kotlin
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
;