aiSee for Unix: User Manual<>index

GDL's grammar

This section presents the grammar of GDL (Graph Description Language) in EBNF (Extended Bacchus Naur Form). Terminals are enclosed in double quotes and printed in bold. Nonterminals are written in italic. Finite iterations are specified by (...)*.

Integers are sequences of digits. Floating point numbers consist of a sequence of digits followed by a dot, followed by a sequence of digits. C style comments (/* ... */) and C++ style comments (//...) are allowed.

graph           : "graph: {" (graph_entry)* "}"
graph_entry     : graph_attr
                | graph
                | node
                | edge
                | node_def
                | edge_def
                | foldnode_def
                | foldedge_def
                | backedge
                | nearedge
                | lnearedge
                | rnearedge
                | bentnearedge
                | lbentnearedge
                | rbentnearedge
                | region
graph_attr      : graph_attr_name ":" attr_value
graph_attr_name : any attribute listed in
                  section graph attributes
node_def        : "node."node_attr
edge_def        : "edge."edge_attr
foldnode_def    : "foldnode."node_attr
foldedge_def    : "foldedge."edge_attr
node            : "node: {" (node_attr)* "}"
edge            : "edge: {" (edge_attr)* "}"
backedge        : "backedge: {" (edge_attr)* "}"
nearedge        : "nearedge: {" (edge_attr)* "}"
lnearedge       : "leftnearedge: {" (edge_attr)* "}"
rnearedge       : "rightnearedge: {" (edge_attr)* "}"
bentnearedge    : "bentnearedge: {" (edge_attr)* "}"
lbentnearedge   : "leftbentnearedge: {" (edge_attr)* "}"
rbentnearedge   : "rightbentnearedge: {" (edge_attr)* "}"
region          : "region: {" (region_attr)* "}"
node_attr       : node_attr_name ":" attr_value
edge_attr       : edge_attr_name ":" attr_value
region_attr     : "source" ":" str_list
                | "target" ":" str_list
                | "state" ":" enum_status
                | "class" ":" int_list
                | "range" ":" int_value
node_attr_name  : any attribute listed in
                  section node attributes
edge_attr_name  : any attribute listed in
                  section edge attributes
attr_value      : int_value
                | float_value
                | str_value
                | enum_value
int_list        : (int_value)*
int_value       : any integer constant in C style
float_value     : any float constant in C style
str_list        : (str_value)*
str_value       : """ (char)* """
enum_value      : any possible key word value for
                  a graph, node or edge attribute
enum_status     : any possible key word value for
                  the graph attribute state
char            : any printable ASCII character

Note that graph:, node: and edge:, etc. are keywords. Therefore, no whitespace character is allowed before these colons.


HomeSitemapai
Last modified on 6 May 2002 by webmaster. © 2000-2002 AbsInt.
URL: http://www.aisee.com/manual/unix/51.htm


Home
About
Examples
Free trial

 Support
» FAQs
» Quick Guide
» User Manual
   » Windows
   » Mac
» GDL
» Options
» Changelog
» GDLedit

Store
Legal
Contact
Extras
Sitemap