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
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width,initial-scale=1" name="viewport">
<title>POM Configuration Language</title>
<link rel="icon" href="/icon.png">
</head>
<body>
<h1>POM Configuration Language</h1>
<ul>
<li><a href="/spec.html">Specification (v. 0.1.0)</a></li>
<li><a href="/tests/index.html">Test suite</a></li>
</ul>
<p>
The POM configuration language (short for property object model, or perhaps, pommicket’s obvious-<i>er</i> markup)
is a “markup” language designed for writing software configurations. Unlike other markup languages,
which have overwrought syntax and strange corner cases, POM’s syntax is designed to be as simple as possible,
to minimize confusion and to make it easier to write a parser for it.
For example, the official Python library is under 600 lines of code, including documentation.
</p>
<img width="256" height="256" src="/icon.png" loading="lazy" alt="" title="The POM logo (from Dogs of all Nations, 1915)">
<p>
At its core, a POM configuration is an association between keys and values.
Keys are string identifiers chosen by the application to refer to settings in the configuration;
these can use <code>a-zA-Z0-9_./*-</code> and non-ASCII characters.
Values can be any Unicode strings not containing a null character.
</p>
<pre><code># A POM configuration for a text editor
indentation-type = tabs
show-line-numbers = yes
tab-size = 4
font-size = 18
file-extensions.python = .py
[file-extensions]
C = .c, .h
Cpp = .cpp, .hpp, .cc, .hh
[plug-in.edit-over-ssh]
path = "~/misc/edit-over-ssh.so"
enabled = yes
[plug-in.wrap-text]
path = "~/misc/wrap_text_v3.5.7.so"
enabled = no
</code></pre>
<p>
The POM syntax has no distinction between different types of data (numbers, strings, booleans).
Instead, this is handled in the code which reads the configuration, using different
functions/methods to parse values as various data types.
The mapping from string values to signed and unsigned integers, floating-point numbers,
booleans, and lists is defined in the specification.
</p>
<h2>Libraries</h2>
<p>
Currently the following official POM parsing libraries exist:
</p>
<ul>
<li>C/C++: <a href="https://github.com/pommicket/pom-c">libpom/libpom++</a></li>
<li>Python: <a href="https://pypi.org/project/pom-parser">pom_parser</a></li>
<li>Rust: <a href="https://crates.io/crates/pom-parser">pom-parser</a></li>
</ul>
<h2>Contributing</h2>
<p>
Contributions are welcome! Some particular areas where you might want to help out:
</p>
<ul>
<li>Clarifying any ambiguities you might find in the specification.</li>
<li>Writing more examples for POM parsing libraries.</li>
<li>Writing more <a href="/tests/index.html">tests</a> to handle cases that aren’t currently covered.</li>
<li>Fixing typos in documentation.</li>
<li>Fixing bugs in parsing libraries.</li>
<li>Writing parsing libraries (or bindings to existing ones) for more programming languages.</li>
</ul>
</body>
</html>
|