The L-SIF Syntax


Links


Contents


Regular Expression Based Syntax Language Definition

This table provides a guideline as how to interpret the following two tables.
 
Syntax Description
| Or
* Zero or more
+ One or more
[] Optional subexpression
Comment Info Appear in italics
Tokens Appear in ALL CAPITALS
Key Words Appear in bold


L-SIF Lexical Conventions and Tokens

L-SIF is an ASCII file format which is similar lexically to C code. L-SIF does not have a preprocessor, or any macro text facilities. It is a static scoped language, like Pascal.
 
Token Description
{" ", "\t", "\n"} White space is used as separators in L-SIF and then ignored
(* ... *) Multiline comments can be nested
# ... \n Single line comments can be used with multiline comments
( ) Delimit expression as in LISP
color A color property
contour A sequential set of closed 1D entities
desired_accuracy The accuracy with which the designer wants the part manufactured
difference A boolean difference operation
DECIMAL Positive or negative decimal number
e Exponential or Scientific notation for a value
inches Sets units to inches
ID C style identifier
INT Positive or negative constant integer
intersection A boolean intersection operation
layer A planar cross section of the part
LSIF Header stating that this is a L-SIF type file
mm Sets units to millimeters
nested1d A set of contours which are strictly nested inside a single outer contour
rgb Specification of color as an rgb triple
thickness Sets the thickness for layers within a scope
union A boolean union operation
units Sets the units for the file
v A vertex


L-SIF Grammar
 
Nonterminal -> Production
part_layers -> ( LSIF ver:INT rel:INT units accuracy thickness offset layer_list )
units -> ( units units_setting
units_setting -> mm | inches
accuracy -> [ ( desired_accuracy value )
thickness -> ( thickness value )
offset  -> ( offset value )
layer_list -> layer+
layer -> ( layer [ thickness ] vertex_list 1d_set* | contours_offset*)
1d_list -> boolean | nested_1d
boolean -> intersection | union | difference
intersection -> ( intersection 1d_list+ )
union -> ( union 1d_list+ )
difference -> ( difference 1d_list+ )
nested_1d -> nested_1d_atom | contour
nested_1d_atom -> ( nested1d nested_1d_property vertex_list contour nested_1d )
contour -> ( contour contour_property vertex_list contour_segment_list )
contours_offset -> contours offsets
contours -> ( contours nested_1d+ )
offsets -> ( offset nested_1d+ )
nested_1d_property -> ( color color_setting
|
(user extension) 
contour_property -> ( color color_setting
|
(user extension) 
contour_segment_list -> id
vertex_list -> vertex*
vertex -> ( v id x:value y: value )
color_setting -> ( rgb R:value G:value B:value )
id -> INT
value -> INT
|
DECIMAL
|
( e mantissa:INT exponent:INT )


Alphabetic Index of Grammar Nonterminals

1d_set, accuracy, boolean, color_setting, contour, contour_property, contour_segment_list, difference, id, intersection, layer, layer_list, nested_1d, nested_1d_property, part_layers, thickness, union, units, units_setting, value, vertex, vertex_list



 
 





This page is maintained by Jianlin Wang
E-mail: jianlin@cs.berkeley.edu
Last modified: 12/21/99

This page was designed and tested under Netscape using common HTML constructs. No browsers are blocked from viewing this page. Please send mail to the maintainer of this page if you find any broken links or errors in the page construction.