.TH definition Onyx
.SH NAME
defintion \- Definitions grammar for Onyx\-4gl
.SH SYNOPSYIS
.nf
class Definitions : public Parser {
	Definitions(LineStream *InitStream);
	virtual ~Definitions();
	
	int grammar();
	int definitions();
	int actives();
	
	int program();
	int menu();
	int users();
	int database();
	int table();
	int mask();
	int transaction();
	}
.fi
.SH DESCRIPTION
This grammar for Onyx 4gl defintions. Any Onyx program uses
several grammars. The definitions grammar is the one all around.
.SH IMPLEMENTATION
.PP
grammar : 
.br
.in +0.8i
.ad l
.nh
definitions  eof  
.br
;
.br
.hy
.PP
definitions : 
.br
.in +0.8i
.ad l
.nh
( program  | users  | database  | table  | menu  actives  | actives  ) 
.br
;
.br
.hy
Only a few things can be defined yet. These are the name of the
program, the users allowed for the next actives, the database
Y want to use, the internal tables the program has, and the
aktive perhaps prefixed by the menu keyword.
.PP
program : 
.br
.in +0.8i
.ad l
.nh
"program" id  ";" 
.br
;
.br
.hy
The program definition is only for dividing Yr program into
several menu. A Onyx program has to contain at least one
program definition.
.PP
users : 
.br
.in +0.8i
.ad l
.nh
"users" ( "all" | id  ! "," ) ";" 
.br
;
.br
.hy
The users definition is a list of users allowed to use the
next part of the program until a new users definition is
given or eof.
.PP
database : 
.br
.in +0.8i
.ad l
.nh
"database" id  [ "-" id  ] [ "%" id  ] [ "-" id  ] [ "@" matchexp  ] ";" 
.br
;
.br
.hy
Only one database definition is allowed yet. The database definition
is the name of the database Y want to connect. For more information
refer to SqlManager.
.PP
table : 
.br
.in +0.8i
.ad l
.nh
"table" id  ( id  [ "short" | "int" | "calc" | "string" | "char" | "date" | error  ] num  [ "\(rs"" match  "\(rs"" ] ! "," ) ";" 
.br
;
.br
.hy
Here Y can define the internal tables a Onyx program uses.
.PP
menu : 
.br
.in +0.8i
.ad l
.nh
"menu" [ "\(rs"" match  "\(rs"" ] 
.br
;
.br
.hy
The menu definition is only a flag before any actives definition.
saying that the next actives should be in the menu of the last
program definition.
.PP
actives : 
.br
.in +0.8i
.ad l
.nh
mask  | transaction  
.br
;
.br
.hy
We now only have to actives, masks and transactions. This is
the right place for further expansion like browsers and so on.
.PP
mask : 
.br
.in +0.8i
.ad l
.nh
"mask" id  ( "by" id  ( "\(rs"" match  "\(rs"" ! "," ) ";" "fields" ( id  [ "." id  ] [ ":" id  ] ! "," ) ";" [ "check" "by" id  ";" ] [ "key" ( num  "is" id  [ "\(rs"" match  "\(rs"" ] ! "," ) ";" ] ) 
.br
;
.br
.hy
This glumpsy grammar defines mask. It's better to look at the
examples of what is posible.
.PP
transaction : 
.br
.in +0.8i
.ad l
.nh
true  [ "transaction" | "transaktion" | true  ] id  "{" match  "}" 
.br
;
.br
.hy
This is the definition of transactions. A transaction can be
called by menu, from a mask or from an other transaction.
