File: fdf.Standard

package info (click to toggle)
libfdf 0.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 552 kB
  • sloc: f90: 4,028; perl: 805; python: 174; sh: 116; makefile: 99
file content (78 lines) | stat: -rw-r--r-- 2,605 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
FDF Standard. Version 0.6.6, September 2007

Input lines are parsed and a token list is created. A token is:

	* Any number of characters enclosed in a matching pair 
	  of quotes (",',`). Embedded strings are not considered tokens.
	  The quotes are removed by the parsing routine.

	* A string of characters from the set [A-Z,a-z,0-9] of
	  alphanumeric characters plus $%&@_.-*/^+~ (and any adjacent
          unmatched quotes, as in apostrophes)

	* The character '<' by itself.

Examples:
	
MeshCutoff < "File.fdf"           3 tokens: MeshCutoff, <, File.fdf
System_Name  Devil's staircase    3 tokens: System_Name, Devil's, staircase
%block AtomicCoordinates %dump < coords.dat  5 tokens

The characters '#', ';', and '!' signal the beginning of a comment. Any
remaining characters on the line are discarded.

Labels and directives (%block, %include, %endblock) are case-insensitive.
Labels are also punctuation-insensitive, by which it is understood that
the characters '.', '_', and '-' are removed before any comparison is made.


Label   [ Value ]

	This line assigns an optional Value to Label. Value could be
	a token or a sequence of tokens not including '<'. 
	'Numerical' routines such as fdf_integer will only use the first 
	token, but fdf_string will return the whole list. 

%block Label 
  ...
  ...
  ...
# Optional comments
%endblock [ Label ]

	This construct specifies a block of data that is to be read
	by the calling program after a call to fdf_block. The contents
	of the block are dumped to fdf_out. %block and %endblock must
	be the first tokens in their respective lines.

%block Label  < Filename  [ %dump ]

	Opens Filename in order to read the block. If %dump appears
	at the *end* of the line, the contents of Filename are dumped
  to fdf_out.

%include  Filename  # Comments

	Opens Filename and continues reading from it.

Label   < Filename   # Comments

	Opens Filename and continues reading from it, ONLY if searching
	for Label.

	There is a maximum number of files that can be opened at the
	same time for fdf processing.


* Debugging and logging.

By default, all the fdf requests are logged, printing the final value
extracted (if it is the default value, it is identified as such).

No debugging is done, unless the "debug-level" is set to a value greater
than zero. The most meaningful way to use this feature is to set the
debugging level before the fdf data structures are built. This can be
achieved by calling the routine fdf_setdebug with the appropriate level
and file name *before* the call to fdf_init.  This gives full control
over the behavior.