Modified BNF rules
This is the grammar for abigen files. The grammar is expressed in a modified BNF format.
A nonterminal symbol matches a sequence of other symbols, delimited by commas.
nonterminal = list , of , symbols ;
Some symbols are terminals, which are either in all caps or are in double quotes.
another-nonterminal = THESE , ARE , TERMINALS , AND , SO , IS , "this" ;
Alternation is expressed with a pipe.
choice = this | that | the-other ;
An option (zero or one) is expressed with parentheses.
optional = ( maybe , these ) , but , definitely , these ;
Repetition (zero or more) is expressed with parentheses and a star.
zero-or-more = ( list-part )* ;
file is the starting symbol.
file = ( declaration )* , EOF ; declaration = syscall-declaration ; syscall-declaration = syscall IDENTIFIER attribute-list "(" parameter-list ")" ( "returns" "(" type ( "," parameter-list ) ")" ) parameter-list = parameter | parameter "," parameter-list parameter = IDENTIFIER ":" type attribute-list ( inout ) attribute-list = ( attribute )* attribute = IDENTIFIER type = IDENTIFIER inout = "IN" | "OUT" | "INOUT"
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.