New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Developer.Guide in branches/nemo_v3_3_beta/NEMOGCM/EXTERNAL/XMLF90/src/sax – NEMO

source: branches/nemo_v3_3_beta/NEMOGCM/EXTERNAL/XMLF90/src/sax/Developer.Guide @ 2281

Last change on this file since 2281 was 2281, checked in by smasson, 13 years ago

set proper svn properties to all files...

  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1Developer Notes:
2
3The parser is built on several levels:
4
51. The closest to the user.
6
7   Modules:  m_xml_parser: The main module
8             m_error     : Basic error handling
9
102. An intermediate layer.
11
12   Modules: m_fsm  (A finite-state machine to parse the input)
13
143. A layer defining basic data structures and file interfaces:
15
16   Modules: m_reader:  File interface and character handling as per XML specs.
17       m_buffer:  Basic homemade "variable length string", with some
18                       limitations (size, of course), but avoiding the
19                       use of dynamic structures for now.
20       m_dictionary: Simple, not dynamic.
21            m_charset: A simple hashing method for sets of characters.
22       m_elstack: Simple stack to check well-formedness.
23       m_entities: Entity replacement utilities.
24
254. Something which does not really belong in the parser but which
26   is useful to massage the data extracted from the file:
27
28   m_converters: Routines to turn pcdata chunks into numerical arrays
29
30
31There are obviously a number of hardwired limitations, which should be
32removed in a later version:
33
34* Buffer size in buffer_t definition. This is not as serious as it
35  looks. Only long unbroken pcdata sections and overly long attribute
36  names or values will be affected. Long SGML declarations and comments
37  might be truncated, but they are not relevant anyway.
38
39* Maximum number of attributes in an element tag (set in m_dictionary)
40
41While the parser does not use any variable-length strings (to keep it
42compatible with existing Fortran90 compilers) or dynamical data
43structures for attribute dictionaries, etc, such improvements could be
44incorporated almost as drop-in replacements for existing sub-modules.
45
46
47The coding style is that of the F subset of Fortran90. I strongly
48believe that it makes for better coding and fewer errors.
49Go to http://www.fortran.com/imagine1/ and get a feel for it. You can
50download free implementations for Linux and Windows, or get an
51inexpensive CD+Book combination to help support the project. Of course,
52F *is* Fortran, so you can always compile it with a Fortran compiler.
53
54
55
56
57
58
59
60
61
Note: See TracBrowser for help on using the repository browser.