FUZZEKS [to Index]
The grammar of FDF-inputdata-files
The grammar describes in detail what FUZZEKS can accept as input data file.
How to read the grammar
If this appears this can appear in the input file
---------------- ---------------------------------
x ::= y x is of the form y
x y something of the form x and then following
something of the form y
"x" x or X literally
( ) indicate priorities
[ x ] something of the form x is optional here
{ x } any number (including 0) of parts of the form x
can appear
x | y alternative between the form x and y
fuzzy_data_file axiom (the form of the complete file)
idf any free chosen identifier (see also
"Some additional limitations" below)
number a real number (e.g. "1.2e-3" or "0.0012")
newline the next line starts here
The grammar itself
fuzzy_data_file ::= region cuts params { table } end
region ::= [ decisepdef ] "region" leftbottom rightbottom lefttop [area]
leftbottom ::= [ newline ] number number
rightbottom ::= [ newline ] number number
lefttop ::= [ newline ] number number newline
area ::= { number number [newline] } newline
cuts ::= [ decisepdef ] "cuts" [ newline ] { number [ newline ] }
params ::= [ decisepdef ] "parameters" [ newline ] { param }
param ::= idf [ ":" "variable" ] { "(" param_type ")" } newline
param_type ::= "+" [ number ] "/" "-" number | "log10"
table ::= [ tabledefs ] "table" { newline } attrib_line { fvalue_line }
attrib_line ::= attrib { delimiter attrib } newline { newline }
attrib ::= "x" | "y" | idf
fvalue_line ::= fvalue { delimiter fvalue } newline { newline }
fvalue ::= ( ( hcut | number ) [ {"/" hcut} | {"/" cut} ] ) | undef
hcut ::= number ":" number "-" number
cut ::= number "-" number
tabledefs ::= [ undefdef ] [ delimiterdef ] [ decisepdef ]
undefdef ::= "undefstring" "is" undef newline
delimiterdef::= "delimiterstring" "is" delimiter newline
decisepdef ::= "decisepcharacter" "is" decisep newline
end ::= "end"
number ::= ["+"|"-"] digitstr
Some additional limitations
- Not allowed as idf are: more than 40 characters, "x", "y", delimiter,
"undefdefstring", "delimiterstring", "decisepcharacter", "table", "end"
- Not allowed as undef: delimiter, decisep, newline,
"undefdefstring", "delimiterstring", "decisepcharacter", "table", "end"
- Not allowed as delimiter: decisep, undef, newline, "/", ":", number,
"undefdefstring", "delimiterstring", "decisepcharacter", "table", "end"
- Not allowed as decisep (decimal separator): delimiter, undef, epsilon,
alphanumeric characters, more than one character
Remarks
- If undef, delimiter or decisep are not defined in a table, then the
settings of the last table are taken.
Defaults: undef:="UNDEF", delimiter:=epsilon, decisep:="."
- The meaning of 'fvalue' is 'a fuzzy value' or 'a fuzzy number'.
The scanner
(This is the part of the program which supplies the tokens (the atomar parts)
of the grammar above.)
- The scanner delivers tokens of one of the types:
- nothing: End of the file
- newline: End of the line
- digitstr: Real number without sign
- string: Everything else
- A non-alphanumeric character is a complete token.
- Successive spaces are a delimiter between tokens.
- Exception: digitstr is of the form:
digitstr ::= digit{digit} [decisep{digit}] ['e'['+'|'-']digit{digit}]