asciiunits 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ecf1a4968b0d57637b53c815216d33977354045bb8a749a9b73beda78ab33ce
4
- data.tar.gz: 2d8cb1eb138915c19c0fbf455d5739c5b5d061e6101016a4b2ec42aa8543c4de
3
+ metadata.gz: 11486d94ee312a27434930f8cc0e3efeb9bb5ca0c61114eb731cd651f3302d09
4
+ data.tar.gz: 83ccf03f9f1d437d3c51577b068d3ffe2f2059e336240f3519832fbe6d109c5a
5
5
  SHA512:
6
- metadata.gz: 8618cc59cded0e6e4a2cf3eadb1d224310cbb6dd32211fb0f3d453edcef74bc8a52c4e84c5291ffc0be00f6d1d2a4d584c8ba534380ef1f7c657e56f800ab584
7
- data.tar.gz: d2fefe3f018149795a32080fd600e609c4165c19e5fe131644afd2190ec894a54522fcde28e01b2b6bc2d2c0dcb23033460c3a480ccc3ef019da65a893b21817
6
+ metadata.gz: a57146b3e988f4130c76c1d86c8a634f246054864252364f3ea288fe1acaa1dcc724e6e4c5305e4b07debdf88d3cb9dc7f3c6d79be423056329a783c4bb3ac31
7
+ data.tar.gz: 7a48aa705fd5461718baa2786253191dd3e8a87685c4814bf8720d4ac9e9e5ca81b294159cc94578efe911c322e879e18bdd6c7e299e873c9e613ccf3097d80d
data/README.adoc CHANGED
@@ -4,7 +4,7 @@ PARG grammar, checksummed artifact and conformance corpus for the
4
4
  `unitsml(...)` expression content of https://github.com/unitsml/unitsml-ruby[UnitsML]
5
5
  (the AsciiUnits unit-expression syntax).
6
6
 
7
- This repository ships **no runtime code**. It ships the contract:
7
+ This repository ships the contract and a typed model of its parse tree:
8
8
 
9
9
  * `grammars/unitsml.parg` — the grammar source
10
10
  * `artifacts/unitsml.json` — the compiled artifact (`parsanol-tree/v2`, checksummed)
@@ -12,6 +12,8 @@ This repository ships **no runtime code**. It ships the contract:
12
12
  time; loaded from disk at parse time, see below)
13
13
  * `corpora/unitsml/` — conformance corpus, oracle-frozen against the
14
14
  unitsml-ruby Parslet parser
15
+ * `model/asciiunits.lml.json` — the LML declarations of the typed model
16
+ (`lib/asciiunits/model`), with their checksums
15
17
 
16
18
  Runtime repositories (Ruby, Rust, TypeScript) load the artifact via their
17
19
  Parsanol runtime and map parse trees to their own object models. In Ruby:
@@ -82,6 +84,9 @@ Parslet `.as()` names of the original (values are slices: `value` + `offset`
82
84
 
83
85
  |`open_paren` / `close_paren`
84
86
  |Fence characters captured by the named int-exp rules
87
+
88
+ |`hyphen`
89
+ |The trailing `-` of a prefix-only expression (`p-`)
85
90
  |===
86
91
 
87
92
  Post-parse semantics (sqrt → 0.5 powers, `/` and `//` inverting exponents)
@@ -105,6 +110,38 @@ artifact = Asciiunits.load_artifact
105
110
  artifact.parse("expression", "mm*s^-2")
106
111
  ----
107
112
 
113
+ == Typed model
114
+
115
+ `Asciiunits.parse_model` parses an expression and returns an
116
+ `Asciiunits::Model::Document`, declared with LutaML Model. Its
117
+ `expression` holds the tree above as typed nodes: every text capture is a
118
+ `Slice` (`value`, `offset`, `length`, `line`, `column`), and every subtree
119
+ capture is a node class with one attribute per key it can hold.
120
+
121
+ [source,ruby]
122
+ ----
123
+ require "asciiunits"
124
+
125
+ doc = Asciiunits.parse_model("m^(1/2)*s")
126
+ doc.expression.unit.value # => "m"
127
+ doc.expression.power_numerator.int_exp.integer.value # => "1/2"
128
+ doc.expression.sequence.unit.value # => "s"
129
+ ----
130
+
131
+ The node classes in `lib/asciiunits/model/nodes.rb` are generated from the
132
+ static capture shapes of the artifact (`scripts/generate_model.rb`), so a
133
+ capture the corpus never exercises is still declared. The recursive
134
+ captures `int_exp`, `sequence` and `sqrt` share the class `Expression` with
135
+ the tree itself. A tree key the model does not declare raises
136
+ `Asciiunits::Model::UndeclaredCapture` instead of being dropped.
137
+
138
+ `model/asciiunits.lml.json` holds the LML export of every model class
139
+ (`Lutaml::Model::Lml.export`), and `model/asciiunits.lml.checksums.txt` their
140
+ checksums. `rake model:check` fails if either the classes or the export is
141
+ stale, and replays the corpus: the model built from each accepted input
142
+ serializes to the recorded tree, each recorded tree round-trips through the
143
+ model, and each rejected input still raises.
144
+
108
145
  == Rebuilding
109
146
 
110
147
  The `unitsml` gem (build-time only) supplies the terminal selection and the
@@ -117,6 +154,7 @@ rake tables:gen # regenerate terminal tables from the unitsml gem
117
154
  rake oracle:regen # re-baseline accept/reject against the parslet parser
118
155
  rake artifact:compile # compile with determinism check + checksums manifest
119
156
  rake contracts:regen # replay artifact over the corpus, enforce parity
157
+ rake model:regen # regenerate the model classes and their LML export
120
158
  rake ci # everything green before committing
121
159
  ----
122
160
 
@@ -1,9 +1,9 @@
1
1
  # Written by scripts/compile.rb. Envelope checksum is Parsanol's own;
2
2
  # the sha256 lines are of the files' bytes.
3
- artifact_checksum sha256:aa22618c80dc02f3fe1edf2c798dbe34aceae5f4d84524ff98f76a2b91af151d
4
- compiler_version 1.3.113
3
+ artifact_checksum sha256:3a5d423ea975d46e9ab4b98a652e9276849f540226466dbacdd5001b2f6a5016
4
+ compiler_version 1.5.8
5
5
  source_hash sha256:7702a1bd52072d5d860e8176b50b5bebb218c1fda864592bb7313419e94506e3
6
- artifacts/unitsml.json sha256:139d91337a0944d60f36bc144a205625349f4b3b8b7ff1a0fba3c61e70c57804
6
+ artifacts/unitsml.json sha256:98e53c5fa31233725158a49af75361b0aacc4bf3292a8c09675995f85a0b7e4c
7
7
  grammars/unitsml.parg sha256:7702a1bd52072d5d860e8176b50b5bebb218c1fda864592bb7313419e94506e3
8
8
  tables/dimensions.yaml sha256:62715c12c96d0dcd0c640850e3e922e5708d5871a959b251dc714a7cd8c86836
9
9
  tables/prefixed_units.yaml sha256:d1ee30a14db6087b3efedef71e486753fddfbf56f49ab2207fa8206923fc3bab
@@ -1 +1 @@
1
- {"bindings":null,"version":"0.1.0","grammar":"UnitsmlAscii","shape":"parsanol-tree/v2","binding_version":1,"entries":{"expression":{"root":"expression","grammar":{"atoms":[{"Entity":{"atom":599}},{"Entity":{"atom":596}},{"Entity":{"atom":593}},{"Entity":{"atom":591}},{"Str":{"pattern":"sqrt"}},{"Entity":{"atom":6}},{"Str":{"pattern":"("}},{"Named":{"name":"lparen","atom":5}},{"Entity":{"atom":587}},{"Named":{"name":"implicit_extended","atom":1}},{"Entity":{"atom":19}},{"Entity":{"atom":18}},{"Re":{"pattern":"[\\x09]"}},{"Re":{"pattern":"[\\x0a]"}},{"Re":{"pattern":"[\\x0b]"}},{"Re":{"pattern":"[\\x0c]"}},{"Re":{"pattern":"[\\x0d]"}},{"Re":{"pattern":"[ ]"}},{"Alternative":{"atoms":[12,13,14,15,16,17]}},{"Repetition":{"atom":11,"min":1,"max":null,"tag":"Repetition"}},{"Repetition":{"atom":10,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":583}},{"Named":{"name":"sequence","atom":21}},{"Repetition":{"atom":22,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[9,20,23]}},{"Entity":{"atom":580}},{"Named":{"name":"first_set","atom":2}},{"Entity":{"atom":19}},{"Named":{"name":"extender","atom":27}},{"Entity":{"atom":556}},{"Entity":{"atom":553}},{"Entity":{"atom":39}},{"Entity":{"atom":35}},{"Str":{"pattern":"//"}},{"Str":{"pattern":"/"}},{"Alternative":{"atoms":[33,34]}},{"Entity":{"atom":37}},{"Str":{"pattern":"*"}},{"Alternative":{"atoms":[32,36]}},{"Named":{"name":"extender","atom":38}},{"Entity":{"atom":19}},{"Repetition":{"atom":40,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":551}},{"Named":{"name":"implicit_extended","atom":25}},{"Entity":{"atom":19}},{"Repetition":{"atom":44,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":39}},{"Entity":{"atom":19}},{"Repetition":{"atom":47,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":548}},{"Named":{"name":"sequence","atom":49}},{"Sequence":{"atoms":[43,45,46,48,50]}},{"Entity":{"atom":546}},{"Entity":{"atom":6}},{"Named":{"name":"lparen","atom":53}},{"Entity":{"atom":19}},{"Repetition":{"atom":55,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":544}},{"Entity":{"atom":536}},{"Entity":{"atom":6}},{"Named":{"name":"open_paren","atom":59}},{"Entity":{"atom":19}},{"Repetition":{"atom":61,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":530}},{"Entity":{"atom":71}},{"Named":{"name":"int_exp","atom":57}},{"Entity":{"atom":19}},{"Repetition":{"atom":66,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":69}},{"Str":{"pattern":")"}},{"Named":{"name":"rparen","atom":68}},{"Sequence":{"atoms":[54,56,65,67,70]}},{"Entity":{"atom":529}},{"Entity":{"atom":19}},{"Repetition":{"atom":73,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":39}},{"Entity":{"atom":19}},{"Repetition":{"atom":76,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":526}},{"Named":{"name":"sequence","atom":78}},{"Sequence":{"atoms":[52,74,75,77,79]}},{"Entity":{"atom":496}},{"Repetition":{"atom":30,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[3,82]}},{"Str":{"pattern":"1"}},{"Named":{"name":"unit","atom":84}},{"Entity":{"atom":88}},{"Named":{"name":"sequence","atom":42}},{"Sequence":{"atoms":[31,41,87]}},{"Repetition":{"atom":86,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[85,89]}},{"Entity":{"atom":410}},{"Entity":{"atom":367}},{"Str":{"pattern":"ton-force (2000 lb)"}},{"Str":{"pattern":"ton_refrigeration"}},{"Str":{"pattern":"dprime_Hg_32degF"}},{"Str":{"pattern":"dprime_Hg_60degF"}},{"Str":{"pattern":"fl oz (US label)"}},{"Str":{"pattern":"a_sidereal_year"}},{"Str":{"pattern":"a_tropical_year"}},{"Str":{"pattern":"aW (Cardelli)"}},{"Str":{"pattern":"ftH_2O_39degF"}},{"Str":{"pattern":"inH_2O_39degF"}},{"Str":{"pattern":"inH_2O_60degF"}},{"Str":{"pattern":"liq pint (US)"}},{"Str":{"pattern":"oz (US label)"}},{"Str":{"pattern":"pica_computer"}},{"Str":{"pattern":"rad_radiation"}},{"Str":{"pattern":"cmH_2O_4degC"}},{"Str":{"pattern":"ft_US_survey"}},{"Str":{"pattern":"h-bar_atomic"}},{"Str":{"pattern":"in_US_survey"}},{"Str":{"pattern":"lambda-bar_C"}},{"Str":{"pattern":"mi_US_survey"}},{"Str":{"pattern":"min_sidereal"}},{"Str":{"pattern":"pica_printer"}},{"Str":{"pattern":"yd_US_survey"}},{"Str":{"pattern":"dry pt (US)"}},{"Str":{"pattern":"dry qt (US)"}},{"Str":{"pattern":"gi_imperial"}},{"Str":{"pattern":"hp_electric"}},{"Str":{"pattern":"inHg_32degF"}},{"Str":{"pattern":"inHg_60degF"}},{"Str":{"pattern":"liq qt (US)"}},{"Str":{"pattern":"pt_computer"}},{"Str":{"pattern":"statcoulomb"}},{"Str":{"pattern":"\"Hg_32degF"}},{"Str":{"pattern":"\"Hg_60degF"}},{"Str":{"pattern":"Btu_39degF"}},{"Str":{"pattern":"Btu_59degF"}},{"Str":{"pattern":"Btu_60degF"}},{"Str":{"pattern":"cmHg_0degC"}},{"Str":{"pattern":"d_sidereal"}},{"Str":{"pattern":"dwt (troy)"}},{"Str":{"pattern":"fl oz (UK)"}},{"Str":{"pattern":"fl oz (US)"}},{"Str":{"pattern":"h-bar_eV_s"}},{"Str":{"pattern":"h_sidereal"}},{"Str":{"pattern":"m_e_atomic"}},{"Str":{"pattern":"pt_printer"}},{"Str":{"pattern":"rh_percent"}},{"Str":{"pattern":"s_sidereal"}},{"Str":{"pattern":"tbsp_label"}},{"Str":{"pattern":"cup_label"}},{"Str":{"pattern":"dprime_Hg"}},{"Str":{"pattern":"dprime_in"}},{"Str":{"pattern":"dr (avdp)"}},{"Str":{"pattern":"hp_boiler"}},{"Str":{"pattern":"hp_metric"}},{"Str":{"pattern":"prime_min"}},{"Str":{"pattern":"scr (ap.)"}},{"Str":{"pattern":"ton_short"}},{"Str":{"pattern":"tsp_label"}},{"Str":{"pattern":"Btu_mean"}},{"Str":{"pattern":"E_erlang"}},{"Str":{"pattern":"bbl (US)"}},{"Str":{"pattern":"cwt (UK)"}},{"Str":{"pattern":"cwt (US)"}},{"Str":{"pattern":"dprime_s"}},{"Str":{"pattern":"gal (UK)"}},{"Str":{"pattern":"gal (US)"}},{"Str":{"pattern":"hp_water"}},{"Str":{"pattern":"mil_nato"}},{"Str":{"pattern":"prime_Hg"}},{"Str":{"pattern":"prime_ft"}},{"Str":{"pattern":"statwatt"}},{"Str":{"pattern":"thm (EC)"}},{"Str":{"pattern":"thm (US)"}},{"Str":{"pattern":"ton_long"}},{"Str":{"pattern":"Lambert"}},{"Str":{"pattern":"bu (US)"}},{"Str":{"pattern":"lb_troy"}},{"Str":{"pattern":"oz_troy"}},{"Str":{"pattern":"pt (UK)"}},{"Str":{"pattern":"qt (UK)"}},{"Str":{"pattern":"statmho"}},{"Str":{"pattern":"statohm"}},{"Str":{"pattern":"ton_TNT"}},{"Str":{"pattern":"Btu_th"}},{"Str":{"pattern":"a_year"}},{"Str":{"pattern":"byte_B"}},{"Str":{"pattern":"cal_IT"}},{"Str":{"pattern":"cal_th"}},{"Str":{"pattern":"cmH_2O"}},{"Str":{"pattern":"dprime"}},{"Str":{"pattern":"ftH_2O"}},{"Str":{"pattern":"inH_2O"}},{"Str":{"pattern":"kayser"}},{"Str":{"pattern":"micron"}},{"Str":{"pattern":"mmH_2O"}},{"Str":{"pattern":"statWb"}},{"Str":{"pattern":"'_min"}},{"Str":{"pattern":"Aring"}},{"Str":{"pattern":"Darcy"}},{"Str":{"pattern":"abohm"}},{"Str":{"pattern":"barye"}},{"Str":{"pattern":"bel_B"}},{"Str":{"pattern":"dB_mW"}},{"Str":{"pattern":"darcy"}},{"Str":{"pattern":"fermi"}},{"Str":{"pattern":"fl dr"}},{"Str":{"pattern":"gamma"}},{"Str":{"pattern":"h-bar"}},{"Str":{"pattern":"hp_UK"}},{"Str":{"pattern":"lbmol"}},{"Str":{"pattern":"minim"}},{"Str":{"pattern":"prime"}},{"Str":{"pattern":"shake"}},{"Str":{"pattern":"statA"}},{"Str":{"pattern":"statF"}},{"Str":{"pattern":"statH"}},{"Str":{"pattern":"statT"}},{"Str":{"pattern":"statV"}},{"Str":{"pattern":"\"_in"}},{"Str":{"pattern":"'_ft"}},{"Str":{"pattern":"Hart"}},{"Str":{"pattern":"Torr"}},{"Str":{"pattern":"barn"}},{"Str":{"pattern":"cmHg"}},{"Str":{"pattern":"cmil"}},{"Str":{"pattern":"degC"}},{"Str":{"pattern":"degF"}},{"Str":{"pattern":"degK"}},{"Str":{"pattern":"degR"}},{"Str":{"pattern":"fath"}},{"Str":{"pattern":"ft.L"}},{"Str":{"pattern":"ft.c"}},{"Str":{"pattern":"ftHg"}},{"Str":{"pattern":"inHg"}},{"Str":{"pattern":"l.h."}},{"Str":{"pattern":"l.m."}},{"Str":{"pattern":"l.s."}},{"Str":{"pattern":"l.w."}},{"Str":{"pattern":"l.y."}},{"Str":{"pattern":"mmHg"}},{"Str":{"pattern":"slug"}},{"Str":{"pattern":"tbsp"}},{"Str":{"pattern":"thou"}},{"Str":{"pattern":"\"Hg"}},{"Str":{"pattern":"\"_s"}},{"Str":{"pattern":"'Hg"}},{"Str":{"pattern":"Btu"}},{"Str":{"pattern":"E_h"}},{"Str":{"pattern":"Gal"}},{"Str":{"pattern":"Ohm"}},{"Str":{"pattern":"a_0"}},{"Str":{"pattern":"abA"}},{"Str":{"pattern":"abC"}},{"Str":{"pattern":"abF"}},{"Str":{"pattern":"abH"}},{"Str":{"pattern":"abS"}},{"Str":{"pattern":"abV"}},{"Str":{"pattern":"atm"}},{"Str":{"pattern":"bar"}},{"Str":{"pattern":"bit"}},{"Str":{"pattern":"c_0"}},{"Str":{"pattern":"cal"}},{"Str":{"pattern":"cup"}},{"Str":{"pattern":"dBm"}},{"Str":{"pattern":"dec"}},{"Str":{"pattern":"deg"}},{"Str":{"pattern":"den"}},{"Str":{"pattern":"dyn"}},{"Str":{"pattern":"erg"}},{"Str":{"pattern":"fur"}},{"Str":{"pattern":"gon"}},{"Str":{"pattern":"gpm"}},{"Str":{"pattern":"kat"}},{"Str":{"pattern":"kip"}},{"Str":{"pattern":"lbf"}},{"Str":{"pattern":"lnk"}},{"Str":{"pattern":"m_e"}},{"Str":{"pattern":"mil"}},{"Str":{"pattern":"min"}},{"Str":{"pattern":"mol"}},{"Str":{"pattern":"mpg"}},{"Str":{"pattern":"oct"}},{"Str":{"pattern":"pdl"}},{"Str":{"pattern":"ppm"}},{"Str":{"pattern":"psi"}},{"Str":{"pattern":"rad"}},{"Str":{"pattern":"rem"}},{"Str":{"pattern":"rhe"}},{"Str":{"pattern":"tex"}},{"Str":{"pattern":"tsp"}},{"Str":{"pattern":"var"}},{"Str":{"pattern":"Bd"}},{"Str":{"pattern":"Bi"}},{"Str":{"pattern":"Bq"}},{"Str":{"pattern":"Ci"}},{"Str":{"pattern":"Da"}},{"Str":{"pattern":"Gi"}},{"Str":{"pattern":"Gs"}},{"Str":{"pattern":"Gy"}},{"Str":{"pattern":"Hz"}},{"Str":{"pattern":"Mx"}},{"Str":{"pattern":"Np"}},{"Str":{"pattern":"Oe"}},{"Str":{"pattern":"Pa"}},{"Str":{"pattern":"Sh"}},{"Str":{"pattern":"St"}},{"Str":{"pattern":"Sv"}},{"Str":{"pattern":"Wb"}},{"Str":{"pattern":"ac"}},{"Str":{"pattern":"as"}},{"Str":{"pattern":"at"}},{"Str":{"pattern":"cd"}},{"Str":{"pattern":"ch"}},{"Str":{"pattern":"ct"}},{"Str":{"pattern":"dr"}},{"Str":{"pattern":"eV"}},{"Str":{"pattern":"ft"}},{"Str":{"pattern":"gf"}},{"Str":{"pattern":"gi"}},{"Str":{"pattern":"gr"}},{"Str":{"pattern":"ha"}},{"Str":{"pattern":"hp"}},{"Str":{"pattern":"in"}},{"Str":{"pattern":"kn"}},{"Str":{"pattern":"kp"}},{"Str":{"pattern":"lb"}},{"Str":{"pattern":"lm"}},{"Str":{"pattern":"lx"}},{"Str":{"pattern":"mi"}},{"Str":{"pattern":"oz"}},{"Str":{"pattern":"pH"}},{"Str":{"pattern":"pc"}},{"Str":{"pattern":"ph"}},{"Str":{"pattern":"pk"}},{"Str":{"pattern":"rd"}},{"Str":{"pattern":"rh"}},{"Str":{"pattern":"sb"}},{"Str":{"pattern":"sr"}},{"Str":{"pattern":"st"}},{"Str":{"pattern":"ua"}},{"Str":{"pattern":"yd"}},{"Str":{"pattern":"\""}},{"Str":{"pattern":"'"}},{"Str":{"pattern":"A"}},{"Str":{"pattern":"C"}},{"Str":{"pattern":"D"}},{"Str":{"pattern":"F"}},{"Str":{"pattern":"G"}},{"Str":{"pattern":"H"}},{"Str":{"pattern":"J"}},{"Str":{"pattern":"K"}},{"Str":{"pattern":"L"}},{"Str":{"pattern":"M"}},{"Str":{"pattern":"N"}},{"Str":{"pattern":"P"}},{"Str":{"pattern":"R"}},{"Str":{"pattern":"S"}},{"Str":{"pattern":"T"}},{"Str":{"pattern":"V"}},{"Str":{"pattern":"W"}},{"Str":{"pattern":"a"}},{"Str":{"pattern":"c"}},{"Str":{"pattern":"d"}},{"Str":{"pattern":"e"}},{"Str":{"pattern":"g"}},{"Str":{"pattern":"h"}},{"Str":{"pattern":"l"}},{"Str":{"pattern":"m"}},{"Str":{"pattern":"s"}},{"Str":{"pattern":"t"}},{"Str":{"pattern":"u"}},{"Alternative":{"atoms":[93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365]}},{"Named":{"name":"unit","atom":366}},{"Entity":{"atom":408}},{"Str":{"pattern":"^"}},{"Entity":{"atom":406}},{"Entity":{"atom":387}},{"Str":{"pattern":"-"}},{"Repetition":{"atom":372,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":375}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":374,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[373,376]}},{"Entity":{"atom":35}},{"Str":{"pattern":"-"}},{"Repetition":{"atom":379,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":375}},{"Repetition":{"atom":381,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[380,382]}},{"Sequence":{"atoms":[378,383]}},{"Repetition":{"atom":384,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[377,385]}},{"Named":{"name":"integer","atom":386}},{"Entity":{"atom":6}},{"Named":{"name":"lparen","atom":388}},{"Entity":{"atom":403}},{"Entity":{"atom":6}},{"Named":{"name":"open_paren","atom":391}},{"Entity":{"atom":398}},{"Named":{"name":"int_exp","atom":390}},{"Entity":{"atom":69}},{"Named":{"name":"rparen","atom":395}},{"Sequence":{"atoms":[389,394,396]}},{"Alternative":{"atoms":[371,397]}},{"Entity":{"atom":69}},{"Named":{"name":"close_paren","atom":399}},{"Sequence":{"atoms":[392,393,400]}},{"Entity":{"atom":398}},{"Alternative":{"atoms":[401,402]}},{"Named":{"name":"int_exp","atom":390}},{"Sequence":{"atoms":[389,404,396]}},{"Alternative":{"atoms":[371,405]}},{"Named":{"name":"power_numerator","atom":370}},{"Sequence":{"atoms":[369,407]}},{"Repetition":{"atom":368,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[92,409]}},{"Entity":{"atom":88}},{"Sequence":{"atoms":[91,411]}},{"Entity":{"atom":410}},{"Entity":{"atom":423}},{"Re":{"pattern":"[\\x00-\\u{10ffff}]"}},{"Lookahead":{"atom":415,"positive":false}},{"Entity":{"atom":39}},{"Entity":{"atom":6}},{"Entity":{"atom":69}},{"Entity":{"atom":19}},{"Alternative":{"atoms":[417,418,419,420]}},{"Lookahead":{"atom":421,"positive":true}},{"Alternative":{"atoms":[416,422]}},{"Named":{"name":"end_guard","atom":414}},{"Sequence":{"atoms":[413,424]}},{"Entity":{"atom":437}},{"Str":{"pattern":"Ei"}},{"Str":{"pattern":"Gi"}},{"Str":{"pattern":"Ki"}},{"Str":{"pattern":"Mi"}},{"Str":{"pattern":"Pi"}},{"Str":{"pattern":"Ti"}},{"Str":{"pattern":"Yi"}},{"Str":{"pattern":"Zi"}},{"Str":{"pattern":"da"}},{"Alternative":{"atoms":[427,428,429,430,431,432,433,434,435]}},{"Named":{"name":"prefix","atom":436}},{"Entity":{"atom":410}},{"Entity":{"atom":88}},{"Sequence":{"atoms":[426,438,439]}},{"Entity":{"atom":437}},{"Entity":{"atom":410}},{"Sequence":{"atoms":[441,442]}},{"Entity":{"atom":470}},{"Str":{"pattern":"1"}},{"Str":{"pattern":"E"}},{"Str":{"pattern":"G"}},{"Str":{"pattern":"M"}},{"Str":{"pattern":"P"}},{"Str":{"pattern":"Q"}},{"Str":{"pattern":"R"}},{"Str":{"pattern":"T"}},{"Str":{"pattern":"Y"}},{"Str":{"pattern":"Z"}},{"Str":{"pattern":"a"}},{"Str":{"pattern":"c"}},{"Str":{"pattern":"d"}},{"Str":{"pattern":"f"}},{"Str":{"pattern":"h"}},{"Str":{"pattern":"k"}},{"Str":{"pattern":"m"}},{"Str":{"pattern":"n"}},{"Str":{"pattern":"p"}},{"Str":{"pattern":"q"}},{"Str":{"pattern":"r"}},{"Str":{"pattern":"u"}},{"Str":{"pattern":"y"}},{"Str":{"pattern":"z"}},{"Alternative":{"atoms":[445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468]}},{"Named":{"name":"prefix","atom":469}},{"Entity":{"atom":410}},{"Entity":{"atom":88}},{"Sequence":{"atoms":[444,471,472]}},{"Entity":{"atom":470}},{"Entity":{"atom":410}},{"Sequence":{"atoms":[474,475]}},{"Entity":{"atom":490}},{"Str":{"pattern":"kcal_IT"}},{"Str":{"pattern":"kcal_th"}},{"Str":{"pattern":"mbar"}},{"Str":{"pattern":"cSt"}},{"Str":{"pattern":"kgf"}},{"Str":{"pattern":"uin"}},{"Str":{"pattern":"cP"}},{"Str":{"pattern":"dB"}},{"Str":{"pattern":"kg"}},{"Str":{"pattern":"mL"}},{"Str":{"pattern":"ml"}},{"Alternative":{"atoms":[478,479,480,481,482,483,484,485,486,487,488]}},{"Named":{"name":"unit","atom":489}},{"Entity":{"atom":408}},{"Repetition":{"atom":491,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":423}},{"Named":{"name":"end_guard","atom":493}},{"Sequence":{"atoms":[477,492,494]}},{"Alternative":{"atoms":[83,90,412,425,440,443,473,476,495]}},{"Entity":{"atom":19}},{"Repetition":{"atom":497,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":39}},{"Entity":{"atom":19}},{"Repetition":{"atom":500,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":523}},{"Named":{"name":"sequence","atom":502}},{"Sequence":{"atoms":[81,498,499,501,503]}},{"Entity":{"atom":71}},{"Entity":{"atom":519}},{"Named":{"name":"sequence","atom":506}},{"Repetition":{"atom":507,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[505,508]}},{"Entity":{"atom":496}},{"Entity":{"atom":515}},{"Named":{"name":"sequence","atom":511}},{"Repetition":{"atom":512,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[510,513]}},{"Alternative":{"atoms":[24,51,80,504,509,514]}},{"Named":{"name":"sequence","atom":511}},{"Repetition":{"atom":516,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[510,517]}},{"Alternative":{"atoms":[24,51,80,504,509,518]}},{"Named":{"name":"sequence","atom":506}},{"Repetition":{"atom":520,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[505,521]}},{"Alternative":{"atoms":[24,51,80,504,522,518]}},{"Named":{"name":"sequence","atom":502}},{"Sequence":{"atoms":[81,498,499,501,524]}},{"Alternative":{"atoms":[24,51,80,525,522,518]}},{"Named":{"name":"sequence","atom":78}},{"Sequence":{"atoms":[52,74,75,77,527]}},{"Alternative":{"atoms":[24,51,528,525,522,518]}},{"Alternative":{"atoms":[64,72]}},{"Named":{"name":"int_exp","atom":63}},{"Entity":{"atom":19}},{"Repetition":{"atom":532,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":69}},{"Named":{"name":"close_paren","atom":534}},{"Sequence":{"atoms":[60,62,531,533,535]}},{"Named":{"name":"int_exp","atom":58}},{"Entity":{"atom":529}},{"Entity":{"atom":88}},{"Alternative":{"atoms":[538,539]}},{"Repetition":{"atom":540,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[537,541]}},{"Entity":{"atom":529}},{"Alternative":{"atoms":[542,543]}},{"Named":{"name":"int_exp","atom":57}},{"Sequence":{"atoms":[54,56,545,67,70]}},{"Sequence":{"atoms":[52,74,75,77,527]}},{"Alternative":{"atoms":[24,51,547,525,522,518]}},{"Named":{"name":"sequence","atom":49}},{"Sequence":{"atoms":[43,45,46,48,549]}},{"Alternative":{"atoms":[24,550,547,525,522,518]}},{"Named":{"name":"sequence","atom":42}},{"Sequence":{"atoms":[31,41,552]}},{"Repetition":{"atom":30,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[3,554]}},{"Alternative":{"atoms":[555,90,412,425,440,443,473,476,495]}},{"Named":{"name":"second_set","atom":29}},{"Sequence":{"atoms":[26,28,557]}},{"Entity":{"atom":546}},{"Named":{"name":"first_int_exp_set","atom":559}},{"Entity":{"atom":19}},{"Repetition":{"atom":561,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":546}},{"Named":{"name":"second_int_exp_set","atom":563}},{"Sequence":{"atoms":[560,562,564]}},{"Entity":{"atom":556}},{"Named":{"name":"first_set","atom":566}},{"Entity":{"atom":19}},{"Repetition":{"atom":568,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":546}},{"Named":{"name":"second_int_exp_set","atom":570}},{"Sequence":{"atoms":[567,569,571]}},{"Entity":{"atom":546}},{"Named":{"name":"first_int_exp_set","atom":573}},{"Entity":{"atom":19}},{"Repetition":{"atom":575,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":556}},{"Named":{"name":"second_set","atom":577}},{"Sequence":{"atoms":[574,576,578]}},{"Alternative":{"atoms":[558,565,572,579]}},{"Named":{"name":"implicit_extended","atom":25}},{"Sequence":{"atoms":[581,45,46,48,549]}},{"Alternative":{"atoms":[24,582,547,525,522,518]}},{"Named":{"name":"sequence","atom":21}},{"Repetition":{"atom":584,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[9,20,585]}},{"Alternative":{"atoms":[586,582,547,525,522,518]}},{"Named":{"name":"sqrt","atom":8}},{"Entity":{"atom":69}},{"Named":{"name":"rparen","atom":589}},{"Sequence":{"atoms":[4,7,588,590]}},{"Sequence":{"atoms":[3,554]}},{"Alternative":{"atoms":[592,90,412,425,440,443,473,476,495]}},{"Named":{"name":"first_set","atom":2}},{"Sequence":{"atoms":[594,28,557]}},{"Alternative":{"atoms":[595,565,572,579]}},{"Named":{"name":"implicit_extended","atom":1}},{"Sequence":{"atoms":[597,20,585]}},{"Alternative":{"atoms":[598,582,547,525,522,518]}},{"Entity":{"atom":739}},{"Entity":{"atom":736}},{"Entity":{"atom":734}},{"Str":{"pattern":"sqrt"}},{"Entity":{"atom":6}},{"Named":{"name":"lparen","atom":604}},{"Entity":{"atom":730}},{"Named":{"name":"first_set","atom":601}},{"Entity":{"atom":19}},{"Named":{"name":"extender","atom":608}},{"Entity":{"atom":727}},{"Entity":{"atom":625}},{"Entity":{"atom":622}},{"Str":{"pattern":"dim_Theta"}},{"Str":{"pattern":"dim_phi"}},{"Str":{"pattern":"dim_I"}},{"Str":{"pattern":"dim_J"}},{"Str":{"pattern":"dim_L"}},{"Str":{"pattern":"dim_M"}},{"Str":{"pattern":"dim_N"}},{"Str":{"pattern":"dim_T"}},{"Alternative":{"atoms":[613,614,615,616,617,618,619,620]}},{"Named":{"name":"dimension","atom":621}},{"Entity":{"atom":408}},{"Repetition":{"atom":623,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[612,624]}},{"Alternative":{"atoms":[602,611]}},{"Entity":{"atom":725}},{"Entity":{"atom":19}},{"Repetition":{"atom":628,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":39}},{"Entity":{"atom":19}},{"Repetition":{"atom":631,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":723}},{"Named":{"name":"second_set","atom":610}},{"Entity":{"atom":720}},{"Repetition":{"atom":635,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[607,609,634,636]}},{"Entity":{"atom":640}},{"Repetition":{"atom":627,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[626,639]}},{"Named":{"name":"first_set","atom":638}},{"Entity":{"atom":19}},{"Repetition":{"atom":642,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":717}},{"Entity":{"atom":6}},{"Named":{"name":"lparen","atom":645}},{"Entity":{"atom":715}},{"Entity":{"atom":6}},{"Named":{"name":"open_paren","atom":648}},{"Entity":{"atom":701}},{"Repetition":{"atom":635,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[607,609,634,651]}},{"Repetition":{"atom":642,"min":0,"max":1,"tag":"Maybe"}},{"Named":{"name":"second_int_exp_set","atom":644}},{"Entity":{"atom":692}},{"Repetition":{"atom":655,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[641,643,654,656]}},{"Entity":{"atom":666}},{"Named":{"name":"int_exp","atom":647}},{"Entity":{"atom":69}},{"Named":{"name":"rparen","atom":660}},{"Entity":{"atom":664}},{"Named":{"name":"sequence","atom":633}},{"Sequence":{"atoms":[629,630,632,663]}},{"Repetition":{"atom":662,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[646,659,661,665]}},{"Named":{"name":"first_int_exp_set","atom":658}},{"Entity":{"atom":19}},{"Repetition":{"atom":668,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":640}},{"Named":{"name":"second_set","atom":670}},{"Entity":{"atom":689}},{"Repetition":{"atom":672,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[667,669,671,673]}},{"Entity":{"atom":666}},{"Named":{"name":"first_int_exp_set","atom":675}},{"Entity":{"atom":19}},{"Repetition":{"atom":677,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":666}},{"Named":{"name":"second_int_exp_set","atom":679}},{"Entity":{"atom":686}},{"Repetition":{"atom":681,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[676,678,680,682]}},{"Entity":{"atom":666}},{"Entity":{"atom":640}},{"Alternative":{"atoms":[637,657,674,683,684,685]}},{"Repetition":{"atom":681,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[676,678,680,687]}},{"Alternative":{"atoms":[637,657,674,688,684,685]}},{"Repetition":{"atom":672,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[667,669,671,690]}},{"Alternative":{"atoms":[637,657,691,688,684,685]}},{"Repetition":{"atom":655,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[641,653,654,693]}},{"Repetition":{"atom":668,"min":0,"max":1,"tag":"Maybe"}},{"Repetition":{"atom":672,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[667,695,671,696]}},{"Repetition":{"atom":677,"min":0,"max":1,"tag":"Maybe"}},{"Repetition":{"atom":681,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[676,698,680,699]}},{"Alternative":{"atoms":[652,694,697,700,684,685]}},{"Named":{"name":"int_exp","atom":650}},{"Entity":{"atom":69}},{"Named":{"name":"close_paren","atom":703}},{"Sequence":{"atoms":[649,702,704]}},{"Named":{"name":"int_exp","atom":705}},{"Entity":{"atom":19}},{"Repetition":{"atom":707,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":701}},{"Entity":{"atom":664}},{"Alternative":{"atoms":[709,710]}},{"Named":{"name":"sequence","atom":711}},{"Sequence":{"atoms":[706,708,712]}},{"Entity":{"atom":701}},{"Alternative":{"atoms":[713,714]}},{"Named":{"name":"int_exp","atom":647}},{"Sequence":{"atoms":[646,716,661,665]}},{"Named":{"name":"second_int_exp_set","atom":644}},{"Sequence":{"atoms":[641,643,718,656]}},{"Alternative":{"atoms":[637,719,691,688,684,685]}},{"Repetition":{"atom":635,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[607,609,634,721]}},{"Alternative":{"atoms":[722,694,697,700,684,685]}},{"Named":{"name":"sequence","atom":633}},{"Sequence":{"atoms":[629,630,632,724]}},{"Repetition":{"atom":627,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[626,726]}},{"Named":{"name":"second_set","atom":610}},{"Sequence":{"atoms":[607,609,728,721]}},{"Alternative":{"atoms":[729,694,697,700,684,685]}},{"Named":{"name":"sqrt","atom":606}},{"Entity":{"atom":69}},{"Named":{"name":"rparen","atom":732}},{"Sequence":{"atoms":[603,605,731,733]}},{"Alternative":{"atoms":[602,611]}},{"Sequence":{"atoms":[735,726]}},{"Named":{"name":"first_set","atom":601}},{"Sequence":{"atoms":[737,609,728,721]}},{"Alternative":{"atoms":[738,694,697,700,684,685]}},{"Entity":{"atom":470}},{"Entity":{"atom":742}},{"Str":{"pattern":"-"}},{"Named":{"name":"hyphen","atom":741}},{"Sequence":{"atoms":[740,743]}},{"Entity":{"atom":437}},{"Entity":{"atom":742}},{"Named":{"name":"hyphen","atom":746}},{"Sequence":{"atoms":[745,747]}},{"Alternative":{"atoms":[0,600,744,748]}}],"root":749},"bindings":[]}},"preprocess":{},"tables":{"units":{"file":"units.yaml","rows":[{"name":"ton-force (2000 lb)"},{"name":"ton_refrigeration"},{"name":"dprime_Hg_32degF"},{"name":"dprime_Hg_60degF"},{"name":"fl oz (US label)"},{"name":"a_sidereal_year"},{"name":"a_tropical_year"},{"name":"aW (Cardelli)"},{"name":"ftH_2O_39degF"},{"name":"inH_2O_39degF"},{"name":"inH_2O_60degF"},{"name":"liq pint (US)"},{"name":"oz (US label)"},{"name":"pica_computer"},{"name":"rad_radiation"},{"name":"cmH_2O_4degC"},{"name":"ft_US_survey"},{"name":"h-bar_atomic"},{"name":"in_US_survey"},{"name":"lambda-bar_C"},{"name":"mi_US_survey"},{"name":"min_sidereal"},{"name":"pica_printer"},{"name":"yd_US_survey"},{"name":"dry pt (US)"},{"name":"dry qt (US)"},{"name":"gi_imperial"},{"name":"hp_electric"},{"name":"inHg_32degF"},{"name":"inHg_60degF"},{"name":"liq qt (US)"},{"name":"pt_computer"},{"name":"statcoulomb"},{"name":"\"Hg_32degF"},{"name":"\"Hg_60degF"},{"name":"Btu_39degF"},{"name":"Btu_59degF"},{"name":"Btu_60degF"},{"name":"cmHg_0degC"},{"name":"d_sidereal"},{"name":"dwt (troy)"},{"name":"fl oz (UK)"},{"name":"fl oz (US)"},{"name":"h-bar_eV_s"},{"name":"h_sidereal"},{"name":"m_e_atomic"},{"name":"pt_printer"},{"name":"rh_percent"},{"name":"s_sidereal"},{"name":"tbsp_label"},{"name":"cup_label"},{"name":"dprime_Hg"},{"name":"dprime_in"},{"name":"dr (avdp)"},{"name":"hp_boiler"},{"name":"hp_metric"},{"name":"prime_min"},{"name":"scr (ap.)"},{"name":"ton_short"},{"name":"tsp_label"},{"name":"Btu_mean"},{"name":"E_erlang"},{"name":"bbl (US)"},{"name":"cwt (UK)"},{"name":"cwt (US)"},{"name":"dprime_s"},{"name":"gal (UK)"},{"name":"gal (US)"},{"name":"hp_water"},{"name":"mil_nato"},{"name":"prime_Hg"},{"name":"prime_ft"},{"name":"statwatt"},{"name":"thm (EC)"},{"name":"thm (US)"},{"name":"ton_long"},{"name":"Lambert"},{"name":"bu (US)"},{"name":"lb_troy"},{"name":"oz_troy"},{"name":"pt (UK)"},{"name":"qt (UK)"},{"name":"statmho"},{"name":"statohm"},{"name":"ton_TNT"},{"name":"Btu_th"},{"name":"a_year"},{"name":"byte_B"},{"name":"cal_IT"},{"name":"cal_th"},{"name":"cmH_2O"},{"name":"dprime"},{"name":"ftH_2O"},{"name":"inH_2O"},{"name":"kayser"},{"name":"micron"},{"name":"mmH_2O"},{"name":"statWb"},{"name":"'_min"},{"name":"Aring"},{"name":"Darcy"},{"name":"abohm"},{"name":"barye"},{"name":"bel_B"},{"name":"dB_mW"},{"name":"darcy"},{"name":"fermi"},{"name":"fl dr"},{"name":"gamma"},{"name":"h-bar"},{"name":"hp_UK"},{"name":"lbmol"},{"name":"minim"},{"name":"prime"},{"name":"shake"},{"name":"statA"},{"name":"statF"},{"name":"statH"},{"name":"statT"},{"name":"statV"},{"name":"\"_in"},{"name":"'_ft"},{"name":"Hart"},{"name":"Torr"},{"name":"barn"},{"name":"cmHg"},{"name":"cmil"},{"name":"degC"},{"name":"degF"},{"name":"degK"},{"name":"degR"},{"name":"fath"},{"name":"ft.L"},{"name":"ft.c"},{"name":"ftHg"},{"name":"inHg"},{"name":"l.h."},{"name":"l.m."},{"name":"l.s."},{"name":"l.w."},{"name":"l.y."},{"name":"mmHg"},{"name":"slug"},{"name":"tbsp"},{"name":"thou"},{"name":"\"Hg"},{"name":"\"_s"},{"name":"'Hg"},{"name":"Btu"},{"name":"E_h"},{"name":"Gal"},{"name":"Ohm"},{"name":"a_0"},{"name":"abA"},{"name":"abC"},{"name":"abF"},{"name":"abH"},{"name":"abS"},{"name":"abV"},{"name":"atm"},{"name":"bar"},{"name":"bit"},{"name":"c_0"},{"name":"cal"},{"name":"cup"},{"name":"dBm"},{"name":"dec"},{"name":"deg"},{"name":"den"},{"name":"dyn"},{"name":"erg"},{"name":"fur"},{"name":"gon"},{"name":"gpm"},{"name":"kat"},{"name":"kip"},{"name":"lbf"},{"name":"lnk"},{"name":"m_e"},{"name":"mil"},{"name":"min"},{"name":"mol"},{"name":"mpg"},{"name":"oct"},{"name":"pdl"},{"name":"ppm"},{"name":"psi"},{"name":"rad"},{"name":"rem"},{"name":"rhe"},{"name":"tex"},{"name":"tsp"},{"name":"var"},{"name":"Bd"},{"name":"Bi"},{"name":"Bq"},{"name":"Ci"},{"name":"Da"},{"name":"Gi"},{"name":"Gs"},{"name":"Gy"},{"name":"Hz"},{"name":"Mx"},{"name":"Np"},{"name":"Oe"},{"name":"Pa"},{"name":"Sh"},{"name":"St"},{"name":"Sv"},{"name":"Wb"},{"name":"ac"},{"name":"as"},{"name":"at"},{"name":"cd"},{"name":"ch"},{"name":"ct"},{"name":"dr"},{"name":"eV"},{"name":"ft"},{"name":"gf"},{"name":"gi"},{"name":"gr"},{"name":"ha"},{"name":"hp"},{"name":"in"},{"name":"kn"},{"name":"kp"},{"name":"lb"},{"name":"lm"},{"name":"lx"},{"name":"mi"},{"name":"oz"},{"name":"pH"},{"name":"pc"},{"name":"ph"},{"name":"pk"},{"name":"rd"},{"name":"rh"},{"name":"sb"},{"name":"sr"},{"name":"st"},{"name":"ua"},{"name":"yd"},{"name":"\""},{"name":"'"},{"name":"A"},{"name":"C"},{"name":"D"},{"name":"F"},{"name":"G"},{"name":"H"},{"name":"J"},{"name":"K"},{"name":"L"},{"name":"M"},{"name":"N"},{"name":"P"},{"name":"R"},{"name":"S"},{"name":"T"},{"name":"V"},{"name":"W"},{"name":"a"},{"name":"c"},{"name":"d"},{"name":"e"},{"name":"g"},{"name":"h"},{"name":"l"},{"name":"m"},{"name":"s"},{"name":"t"},{"name":"u"}]},"dimensions":{"file":"dimensions.yaml","rows":[{"name":"dim_Theta"},{"name":"dim_phi"},{"name":"dim_I"},{"name":"dim_J"},{"name":"dim_L"},{"name":"dim_M"},{"name":"dim_N"},{"name":"dim_T"}]},"prefixes_double":{"file":"prefixes_double.yaml","rows":[{"name":"Ei"},{"name":"Gi"},{"name":"Ki"},{"name":"Mi"},{"name":"Pi"},{"name":"Ti"},{"name":"Yi"},{"name":"Zi"},{"name":"da"}]},"prefixes_single":{"file":"prefixes_single.yaml","rows":[{"name":"1"},{"name":"E"},{"name":"G"},{"name":"M"},{"name":"P"},{"name":"Q"},{"name":"R"},{"name":"T"},{"name":"Y"},{"name":"Z"},{"name":"a"},{"name":"c"},{"name":"d"},{"name":"f"},{"name":"h"},{"name":"k"},{"name":"m"},{"name":"n"},{"name":"p"},{"name":"q"},{"name":"r"},{"name":"u"},{"name":"y"},{"name":"z"}]},"prefixed_units":{"file":"prefixed_units.yaml","rows":[{"name":"kcal_IT"},{"name":"kcal_th"},{"name":"mbar"},{"name":"cSt"},{"name":"kgf"},{"name":"uin"},{"name":"cP"},{"name":"dB"},{"name":"kg"},{"name":"mL"},{"name":"ml"}]}},"lint":{"order_warnings":["rule forward_slashes: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule end_guard: branches 1 and 2 are order-dependent (first set not statically known)","rule slashed_number_named_int_exp: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 1 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 1 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 2 and 7 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 2 and 8 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 3 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 3 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 3 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 3 and 7 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 3 and 8 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 3 and 9 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 4 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 4 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 4 and 7 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 4 and 8 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 4 and 9 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 5 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 5 and 7 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 5 and 8 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 5 and 9 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 6 and 7 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 6 and 8 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 6 and 9 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 7 and 8 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 7 and 9 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 8 and 9 are order-dependent (shared first bytes; ordered choice is decisive)","rule wrapper_prefixes_units_value: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule named_int_exp_prefixes_units: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule implicit_extended: branches 1 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule implicit_extended: branches 2 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 1 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 1 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 1 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 1 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 2 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 2 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 2 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 2 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 3 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 4 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule dimension_rules_named_exp: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule dimension_rules_int_exp: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule dimension_rules_int_exp: branches 1 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule dimension_rules_int_exp: branches 2 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule dimension_rules_int_exp: branches 3 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule dimension_rules_int_exp: branches 3 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule dimension_rules_int_exp: branches 4 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule expression: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule expression: branches 1 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule expression: branches 1 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule expression: branches 2 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule expression: branches 2 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule expression: branches 3 and 4 are order-dependent (shared first bytes; ordered choice is decisive)"]},"default_entry":"expression","render":{},"derive":{},"tests":[{"entry":"expression","kind":"accept","input":"mm*s^-2","expect":{}},{"entry":"expression","kind":"accept","input":"sqrt(Hz)","expect":{}},{"entry":"expression","kind":"accept","input":"K/(kg*m)","expect":{}},{"entry":"expression","kind":"accept","input":"p-","expect":{}},{"entry":"expression","kind":"accept","input":"(m)(s)","expect":{}},{"entry":"expression","kind":"accept","input":"dB","expect":{}},{"entry":"expression","kind":"accept","input":"dB^2","expect":{}},{"entry":"expression","kind":"accept","input":"mbar*s^-2","expect":{}},{"entry":"expression","kind":"accept","input":"kgf","expect":{}},{"entry":"expression","kind":"accept","input":"sqrt(sqrt(m))","expect":{}},{"entry":"expression","kind":"reject","input":"que?","expect":{}},{"entry":"expression","kind":"reject","input":"m2","expect":{}},{"entry":"expression","kind":"reject","input":"dim_Ldim_M","expect":{}},{"entry":"expression","kind":"reject","input":"mm*","expect":{}},{"entry":"expression","kind":"reject","input":"m*s/","expect":{}},{"entry":"expression","kind":"reject","input":"sqrt(m)^2","expect":{}}],"docs":{},"source":"# UnitsML AsciiUnits expression grammar.\n#\n# 1:1 transcription of unitsml-ruby lib/unitsml/parse.rb +\n# lib/unitsml/intermediate_exp_rules.rb (Parslet), rule for rule, in the\n# same alternative order — PEG ordered choice makes order decisive, and the\n# quirks (trailing-extender acceptance, guard fall-through to prefixed\n# units, no power after fenced/sqrt forms) are load-bearing.\n#\n# Terminal tables are generated from UnitsDB via scripts/gen_tables.rb and\n# embedded in the artifact at compile time.\n#\n# Capture names (unit, prefix, dimension, integer, power_numerator, extender,\n# sqrt, int_exp, sequence, first_set, second_set, open_paren, close_paren)\n# mirror the Parslet .as() names so consumers can map them 1:1.\n\ngrammar UnitsmlAscii version \"0.1.0\" edition 2 {\n\n ws = %x09 / %x0A / %x0B / %x0C / %x0D / %x20\n spaces = 1*ws\n lparen = \"(\"\n rparen = \")\"\n hyphen = \"-\"\n star = \"*\"\n digit = %x30-39\n forward_slashes = \"//\" / \"/\"\n extender = (forward_slashes / star) as extender\n # The signed run is one authored capture: edition 2 drops anonymous\n # literals from the tree, so the \"-\" sign would vanish and the digits\n # would name per-iteration — the capture keeps the exact v1 slice\n # (value \"-2\", \"1/2\", offset..length) the tree readers scalarize.\n slashed_number = (([\"-\"] 1*digit) [forward_slashes ([\"-\"] 1*digit)]) as integer\n end_guard = !ANY / &(extender / lparen / rparen / spaces)\n\n unit = alt from_table \"units\" column \"name\" as unit\n prefixed_units = alt from_table \"prefixed_units\" column \"name\" as unit\n single_letter_prefixes = alt from_table \"prefixes_single\" column \"name\" as prefix\n double_letter_prefixes = alt from_table \"prefixes_double\" column \"name\" as prefix\n dimensions = alt from_table \"dimensions\" column \"name\" as dimension\n\n power = \"^\" slashed_number_int_exp as power_numerator\n slashed_number_int_exp = slashed_number / (lparen slashed_number_named_int_exp as int_exp rparen)\n slashed_number_named_int_exp = (lparen as open_paren slashed_number_int_exp rparen as close_paren) / slashed_number_int_exp\n unit_and_power = unit [power]\n sqrt_sequence = \"sqrt\" lparen prefixes_units_int_exp as sqrt rparen\n sqrt_dimensions = \"sqrt\" lparen dimension_rules_int_exp as sqrt rparen\n extended_prefixed_units = extender [spaces] prefixes_units_int_exp as sequence\n powered_dimensions = dimensions [power]\n\n prefixes_units = (sqrt_sequence [extended_prefixed_units]) / (\"1\" as unit [extended_prefixed_units]) / (unit_and_power extended_prefixed_units) / (unit_and_power end_guard) / (double_letter_prefixes unit_and_power extended_prefixed_units) / (double_letter_prefixes unit_and_power) / (single_letter_prefixes unit_and_power extended_prefixed_units) / (single_letter_prefixes unit_and_power) / (prefixed_units [power] end_guard)\n\n wrapper_prefixes_units_value = int_exp_prefixes_units / prefixes_units_int_exp\n int_exp_prefixes_units = lparen [spaces] named_int_exp_prefixes_units as int_exp [spaces] rparen\n prefixes_units_named_int_exp = (lparen as open_paren [spaces] wrapper_prefixes_units_value as int_exp [spaces] rparen as close_paren)\n named_int_exp_prefixes_units = (prefixes_units_named_int_exp as int_exp [(prefixes_units_int_exp / extended_prefixed_units)]) / prefixes_units_int_exp\n\n implicit_extended = (prefixes_units as first_set spaces as extender prefixes_units as second_set) / (int_exp_prefixes_units as first_int_exp_set [spaces] int_exp_prefixes_units as second_int_exp_set) / (prefixes_units as first_set [spaces] int_exp_prefixes_units as second_int_exp_set) / (int_exp_prefixes_units as first_int_exp_set [spaces] prefixes_units as second_set)\n\n prefixes_units_int_exp = (implicit_extended as implicit_extended [spaces] [prefixes_units_int_exp as sequence]) / (implicit_extended as implicit_extended [spaces] extender [spaces] prefixes_units_int_exp as sequence) / (int_exp_prefixes_units [spaces] extender [spaces] prefixes_units_int_exp as sequence) / (prefixes_units [spaces] extender [spaces] prefixes_units_int_exp as sequence) / (int_exp_prefixes_units [prefixes_units_int_exp as sequence]) / (prefixes_units [prefixes_units_int_exp as sequence])\n\n dimension_rules = (sqrt_dimensions / powered_dimensions) [extended_dimension_rules]\n extended_dimension_rules = [spaces] extender [spaces] dimension_rules_int_exp as sequence\n int_exp_dimension_rules = lparen dimension_rules_named_exp as int_exp rparen [extended_dimension_rules]\n dimension_rules_named_exp = ((lparen as open_paren dimension_rules_int_exp as int_exp rparen as close_paren) as int_exp [spaces] (dimension_rules_int_exp / extended_dimension_rules) as sequence) / dimension_rules_int_exp\n\n dimension_rules_int_exp = (dimension_rules as first_set spaces as extender dimension_rules as second_set [dimension_rules_int_exp]) / (dimension_rules as first_set [spaces] int_exp_dimension_rules as second_int_exp_set [dimension_rules_int_exp]) / (int_exp_dimension_rules as first_int_exp_set [spaces] dimension_rules as second_set [dimension_rules_int_exp]) / (int_exp_dimension_rules as first_int_exp_set [spaces] int_exp_dimension_rules as second_int_exp_set [dimension_rules_int_exp]) / int_exp_dimension_rules / dimension_rules\n\n expression = prefixes_units_int_exp / dimension_rules_int_exp / (single_letter_prefixes hyphen) / (double_letter_prefixes hyphen)\n\n entry expression: expression\n\n test expression {\n accept \"mm*s^-2\"\n accept \"sqrt(Hz)\"\n accept \"K/(kg*m)\"\n accept \"p-\"\n accept \"(m)(s)\"\n accept \"dB\"\n accept \"dB^2\"\n accept \"mbar*s^-2\"\n accept \"kgf\"\n accept \"sqrt(sqrt(m))\"\n reject \"que?\"\n reject \"m2\"\n reject \"dim_Ldim_M\"\n reject \"mm*\"\n reject \"m*s/\"\n reject \"sqrt(m)^2\"\n }\n}\n","source_hash":"7702a1bd52072d5d860e8176b50b5bebb218c1fda864592bb7313419e94506e3","unicode_tables":"onigmo (Ruby 3.4.8)","compiler_version":"1.3.113","edition":2,"checksum":"sha256:aa22618c80dc02f3fe1edf2c798dbe34aceae5f4d84524ff98f76a2b91af151d"}
1
+ {"bindings":null,"version":"0.1.0","grammar":"UnitsmlAscii","shape":"parsanol-tree/v2","binding_version":1,"entries":{"expression":{"root":"expression","grammar":{"atoms":[{"Entity":{"atom":591}},{"Entity":{"atom":588}},{"Entity":{"atom":585}},{"Entity":{"atom":583}},{"Str":{"pattern":"sqrt"}},{"Entity":{"atom":6}},{"Str":{"pattern":"("}},{"Entity":{"atom":580}},{"Named":{"name":"implicit_extended","atom":1}},{"Entity":{"atom":18}},{"Entity":{"atom":17}},{"Re":{"pattern":"[\\x09]"}},{"Re":{"pattern":"[\\x0a]"}},{"Re":{"pattern":"[\\x0b]"}},{"Re":{"pattern":"[\\x0c]"}},{"Re":{"pattern":"[\\x0d]"}},{"Re":{"pattern":"[ ]"}},{"Alternative":{"atoms":[11,12,13,14,15,16]}},{"Repetition":{"atom":10,"min":1,"max":null,"tag":"Repetition"}},{"Repetition":{"atom":9,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":576}},{"Named":{"name":"sequence","atom":20}},{"Repetition":{"atom":21,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[8,19,22]}},{"Entity":{"atom":573}},{"Named":{"name":"first_set","atom":2}},{"Entity":{"atom":18}},{"Named":{"name":"extender","atom":26}},{"Entity":{"atom":549}},{"Entity":{"atom":546}},{"Entity":{"atom":38}},{"Entity":{"atom":34}},{"Str":{"pattern":"//"}},{"Str":{"pattern":"/"}},{"Alternative":{"atoms":[32,33]}},{"Entity":{"atom":36}},{"Str":{"pattern":"*"}},{"Alternative":{"atoms":[31,35]}},{"Named":{"name":"extender","atom":37}},{"Entity":{"atom":18}},{"Repetition":{"atom":39,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":544}},{"Named":{"name":"implicit_extended","atom":24}},{"Entity":{"atom":18}},{"Repetition":{"atom":43,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":38}},{"Entity":{"atom":18}},{"Repetition":{"atom":46,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":541}},{"Named":{"name":"sequence","atom":48}},{"Sequence":{"atoms":[42,44,45,47,49]}},{"Entity":{"atom":539}},{"Entity":{"atom":6}},{"Entity":{"atom":18}},{"Repetition":{"atom":53,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":537}},{"Entity":{"atom":529}},{"Entity":{"atom":6}},{"Named":{"name":"open_paren","atom":57}},{"Entity":{"atom":18}},{"Repetition":{"atom":59,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":523}},{"Entity":{"atom":68}},{"Named":{"name":"int_exp","atom":55}},{"Entity":{"atom":18}},{"Repetition":{"atom":64,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":67}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[52,54,63,65,66]}},{"Entity":{"atom":522}},{"Entity":{"atom":18}},{"Repetition":{"atom":70,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":38}},{"Entity":{"atom":18}},{"Repetition":{"atom":73,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":519}},{"Named":{"name":"sequence","atom":75}},{"Sequence":{"atoms":[51,71,72,74,76]}},{"Entity":{"atom":489}},{"Repetition":{"atom":29,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[3,79]}},{"Str":{"pattern":"1"}},{"Named":{"name":"unit","atom":81}},{"Entity":{"atom":85}},{"Named":{"name":"sequence","atom":41}},{"Sequence":{"atoms":[30,40,84]}},{"Repetition":{"atom":83,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[82,86]}},{"Entity":{"atom":405}},{"Entity":{"atom":364}},{"Str":{"pattern":"ton-force (2000 lb)"}},{"Str":{"pattern":"ton_refrigeration"}},{"Str":{"pattern":"dprime_Hg_32degF"}},{"Str":{"pattern":"dprime_Hg_60degF"}},{"Str":{"pattern":"fl oz (US label)"}},{"Str":{"pattern":"a_sidereal_year"}},{"Str":{"pattern":"a_tropical_year"}},{"Str":{"pattern":"aW (Cardelli)"}},{"Str":{"pattern":"ftH_2O_39degF"}},{"Str":{"pattern":"inH_2O_39degF"}},{"Str":{"pattern":"inH_2O_60degF"}},{"Str":{"pattern":"liq pint (US)"}},{"Str":{"pattern":"oz (US label)"}},{"Str":{"pattern":"pica_computer"}},{"Str":{"pattern":"rad_radiation"}},{"Str":{"pattern":"cmH_2O_4degC"}},{"Str":{"pattern":"ft_US_survey"}},{"Str":{"pattern":"h-bar_atomic"}},{"Str":{"pattern":"in_US_survey"}},{"Str":{"pattern":"lambda-bar_C"}},{"Str":{"pattern":"mi_US_survey"}},{"Str":{"pattern":"min_sidereal"}},{"Str":{"pattern":"pica_printer"}},{"Str":{"pattern":"yd_US_survey"}},{"Str":{"pattern":"dry pt (US)"}},{"Str":{"pattern":"dry qt (US)"}},{"Str":{"pattern":"gi_imperial"}},{"Str":{"pattern":"hp_electric"}},{"Str":{"pattern":"inHg_32degF"}},{"Str":{"pattern":"inHg_60degF"}},{"Str":{"pattern":"liq qt (US)"}},{"Str":{"pattern":"pt_computer"}},{"Str":{"pattern":"statcoulomb"}},{"Str":{"pattern":"\"Hg_32degF"}},{"Str":{"pattern":"\"Hg_60degF"}},{"Str":{"pattern":"Btu_39degF"}},{"Str":{"pattern":"Btu_59degF"}},{"Str":{"pattern":"Btu_60degF"}},{"Str":{"pattern":"cmHg_0degC"}},{"Str":{"pattern":"d_sidereal"}},{"Str":{"pattern":"dwt (troy)"}},{"Str":{"pattern":"fl oz (UK)"}},{"Str":{"pattern":"fl oz (US)"}},{"Str":{"pattern":"h-bar_eV_s"}},{"Str":{"pattern":"h_sidereal"}},{"Str":{"pattern":"m_e_atomic"}},{"Str":{"pattern":"pt_printer"}},{"Str":{"pattern":"rh_percent"}},{"Str":{"pattern":"s_sidereal"}},{"Str":{"pattern":"tbsp_label"}},{"Str":{"pattern":"cup_label"}},{"Str":{"pattern":"dprime_Hg"}},{"Str":{"pattern":"dprime_in"}},{"Str":{"pattern":"dr (avdp)"}},{"Str":{"pattern":"hp_boiler"}},{"Str":{"pattern":"hp_metric"}},{"Str":{"pattern":"prime_min"}},{"Str":{"pattern":"scr (ap.)"}},{"Str":{"pattern":"ton_short"}},{"Str":{"pattern":"tsp_label"}},{"Str":{"pattern":"Btu_mean"}},{"Str":{"pattern":"E_erlang"}},{"Str":{"pattern":"bbl (US)"}},{"Str":{"pattern":"cwt (UK)"}},{"Str":{"pattern":"cwt (US)"}},{"Str":{"pattern":"dprime_s"}},{"Str":{"pattern":"gal (UK)"}},{"Str":{"pattern":"gal (US)"}},{"Str":{"pattern":"hp_water"}},{"Str":{"pattern":"mil_nato"}},{"Str":{"pattern":"prime_Hg"}},{"Str":{"pattern":"prime_ft"}},{"Str":{"pattern":"statwatt"}},{"Str":{"pattern":"thm (EC)"}},{"Str":{"pattern":"thm (US)"}},{"Str":{"pattern":"ton_long"}},{"Str":{"pattern":"Lambert"}},{"Str":{"pattern":"bu (US)"}},{"Str":{"pattern":"lb_troy"}},{"Str":{"pattern":"oz_troy"}},{"Str":{"pattern":"pt (UK)"}},{"Str":{"pattern":"qt (UK)"}},{"Str":{"pattern":"statmho"}},{"Str":{"pattern":"statohm"}},{"Str":{"pattern":"ton_TNT"}},{"Str":{"pattern":"Btu_th"}},{"Str":{"pattern":"a_year"}},{"Str":{"pattern":"byte_B"}},{"Str":{"pattern":"cal_IT"}},{"Str":{"pattern":"cal_th"}},{"Str":{"pattern":"cmH_2O"}},{"Str":{"pattern":"dprime"}},{"Str":{"pattern":"ftH_2O"}},{"Str":{"pattern":"inH_2O"}},{"Str":{"pattern":"kayser"}},{"Str":{"pattern":"micron"}},{"Str":{"pattern":"mmH_2O"}},{"Str":{"pattern":"statWb"}},{"Str":{"pattern":"'_min"}},{"Str":{"pattern":"Aring"}},{"Str":{"pattern":"Darcy"}},{"Str":{"pattern":"abohm"}},{"Str":{"pattern":"barye"}},{"Str":{"pattern":"bel_B"}},{"Str":{"pattern":"dB_mW"}},{"Str":{"pattern":"darcy"}},{"Str":{"pattern":"fermi"}},{"Str":{"pattern":"fl dr"}},{"Str":{"pattern":"gamma"}},{"Str":{"pattern":"h-bar"}},{"Str":{"pattern":"hp_UK"}},{"Str":{"pattern":"lbmol"}},{"Str":{"pattern":"minim"}},{"Str":{"pattern":"prime"}},{"Str":{"pattern":"shake"}},{"Str":{"pattern":"statA"}},{"Str":{"pattern":"statF"}},{"Str":{"pattern":"statH"}},{"Str":{"pattern":"statT"}},{"Str":{"pattern":"statV"}},{"Str":{"pattern":"\"_in"}},{"Str":{"pattern":"'_ft"}},{"Str":{"pattern":"Hart"}},{"Str":{"pattern":"Torr"}},{"Str":{"pattern":"barn"}},{"Str":{"pattern":"cmHg"}},{"Str":{"pattern":"cmil"}},{"Str":{"pattern":"degC"}},{"Str":{"pattern":"degF"}},{"Str":{"pattern":"degK"}},{"Str":{"pattern":"degR"}},{"Str":{"pattern":"fath"}},{"Str":{"pattern":"ft.L"}},{"Str":{"pattern":"ft.c"}},{"Str":{"pattern":"ftHg"}},{"Str":{"pattern":"inHg"}},{"Str":{"pattern":"l.h."}},{"Str":{"pattern":"l.m."}},{"Str":{"pattern":"l.s."}},{"Str":{"pattern":"l.w."}},{"Str":{"pattern":"l.y."}},{"Str":{"pattern":"mmHg"}},{"Str":{"pattern":"slug"}},{"Str":{"pattern":"tbsp"}},{"Str":{"pattern":"thou"}},{"Str":{"pattern":"\"Hg"}},{"Str":{"pattern":"\"_s"}},{"Str":{"pattern":"'Hg"}},{"Str":{"pattern":"Btu"}},{"Str":{"pattern":"E_h"}},{"Str":{"pattern":"Gal"}},{"Str":{"pattern":"Ohm"}},{"Str":{"pattern":"a_0"}},{"Str":{"pattern":"abA"}},{"Str":{"pattern":"abC"}},{"Str":{"pattern":"abF"}},{"Str":{"pattern":"abH"}},{"Str":{"pattern":"abS"}},{"Str":{"pattern":"abV"}},{"Str":{"pattern":"atm"}},{"Str":{"pattern":"bar"}},{"Str":{"pattern":"bit"}},{"Str":{"pattern":"c_0"}},{"Str":{"pattern":"cal"}},{"Str":{"pattern":"cup"}},{"Str":{"pattern":"dBm"}},{"Str":{"pattern":"dec"}},{"Str":{"pattern":"deg"}},{"Str":{"pattern":"den"}},{"Str":{"pattern":"dyn"}},{"Str":{"pattern":"erg"}},{"Str":{"pattern":"fur"}},{"Str":{"pattern":"gon"}},{"Str":{"pattern":"gpm"}},{"Str":{"pattern":"kat"}},{"Str":{"pattern":"kip"}},{"Str":{"pattern":"lbf"}},{"Str":{"pattern":"lnk"}},{"Str":{"pattern":"m_e"}},{"Str":{"pattern":"mil"}},{"Str":{"pattern":"min"}},{"Str":{"pattern":"mol"}},{"Str":{"pattern":"mpg"}},{"Str":{"pattern":"oct"}},{"Str":{"pattern":"pdl"}},{"Str":{"pattern":"ppm"}},{"Str":{"pattern":"psi"}},{"Str":{"pattern":"rad"}},{"Str":{"pattern":"rem"}},{"Str":{"pattern":"rhe"}},{"Str":{"pattern":"tex"}},{"Str":{"pattern":"tsp"}},{"Str":{"pattern":"var"}},{"Str":{"pattern":"Bd"}},{"Str":{"pattern":"Bi"}},{"Str":{"pattern":"Bq"}},{"Str":{"pattern":"Ci"}},{"Str":{"pattern":"Da"}},{"Str":{"pattern":"Gi"}},{"Str":{"pattern":"Gs"}},{"Str":{"pattern":"Gy"}},{"Str":{"pattern":"Hz"}},{"Str":{"pattern":"Mx"}},{"Str":{"pattern":"Np"}},{"Str":{"pattern":"Oe"}},{"Str":{"pattern":"Pa"}},{"Str":{"pattern":"Sh"}},{"Str":{"pattern":"St"}},{"Str":{"pattern":"Sv"}},{"Str":{"pattern":"Wb"}},{"Str":{"pattern":"ac"}},{"Str":{"pattern":"as"}},{"Str":{"pattern":"at"}},{"Str":{"pattern":"cd"}},{"Str":{"pattern":"ch"}},{"Str":{"pattern":"ct"}},{"Str":{"pattern":"dr"}},{"Str":{"pattern":"eV"}},{"Str":{"pattern":"ft"}},{"Str":{"pattern":"gf"}},{"Str":{"pattern":"gi"}},{"Str":{"pattern":"gr"}},{"Str":{"pattern":"ha"}},{"Str":{"pattern":"hp"}},{"Str":{"pattern":"in"}},{"Str":{"pattern":"kn"}},{"Str":{"pattern":"kp"}},{"Str":{"pattern":"lb"}},{"Str":{"pattern":"lm"}},{"Str":{"pattern":"lx"}},{"Str":{"pattern":"mi"}},{"Str":{"pattern":"oz"}},{"Str":{"pattern":"pH"}},{"Str":{"pattern":"pc"}},{"Str":{"pattern":"ph"}},{"Str":{"pattern":"pk"}},{"Str":{"pattern":"rd"}},{"Str":{"pattern":"rh"}},{"Str":{"pattern":"sb"}},{"Str":{"pattern":"sr"}},{"Str":{"pattern":"st"}},{"Str":{"pattern":"ua"}},{"Str":{"pattern":"yd"}},{"Str":{"pattern":"\""}},{"Str":{"pattern":"'"}},{"Str":{"pattern":"A"}},{"Str":{"pattern":"C"}},{"Str":{"pattern":"D"}},{"Str":{"pattern":"F"}},{"Str":{"pattern":"G"}},{"Str":{"pattern":"H"}},{"Str":{"pattern":"J"}},{"Str":{"pattern":"K"}},{"Str":{"pattern":"L"}},{"Str":{"pattern":"M"}},{"Str":{"pattern":"N"}},{"Str":{"pattern":"P"}},{"Str":{"pattern":"R"}},{"Str":{"pattern":"S"}},{"Str":{"pattern":"T"}},{"Str":{"pattern":"V"}},{"Str":{"pattern":"W"}},{"Str":{"pattern":"a"}},{"Str":{"pattern":"c"}},{"Str":{"pattern":"d"}},{"Str":{"pattern":"e"}},{"Str":{"pattern":"g"}},{"Str":{"pattern":"h"}},{"Str":{"pattern":"l"}},{"Str":{"pattern":"m"}},{"Str":{"pattern":"s"}},{"Str":{"pattern":"t"}},{"Str":{"pattern":"u"}},{"Alternative":{"atoms":[90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362]}},{"Named":{"name":"unit","atom":363}},{"Entity":{"atom":403}},{"Str":{"pattern":"^"}},{"Entity":{"atom":401}},{"Entity":{"atom":384}},{"Str":{"pattern":"-"}},{"Repetition":{"atom":369,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":372}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":371,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[370,373]}},{"Entity":{"atom":34}},{"Str":{"pattern":"-"}},{"Repetition":{"atom":376,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":372}},{"Repetition":{"atom":378,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[377,379]}},{"Sequence":{"atoms":[375,380]}},{"Repetition":{"atom":381,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[374,382]}},{"Named":{"name":"integer","atom":383}},{"Entity":{"atom":6}},{"Entity":{"atom":398}},{"Entity":{"atom":6}},{"Named":{"name":"open_paren","atom":387}},{"Entity":{"atom":393}},{"Named":{"name":"int_exp","atom":386}},{"Entity":{"atom":67}},{"Sequence":{"atoms":[385,390,391]}},{"Alternative":{"atoms":[368,392]}},{"Entity":{"atom":67}},{"Named":{"name":"close_paren","atom":394}},{"Sequence":{"atoms":[388,389,395]}},{"Entity":{"atom":393}},{"Alternative":{"atoms":[396,397]}},{"Named":{"name":"int_exp","atom":386}},{"Sequence":{"atoms":[385,399,391]}},{"Alternative":{"atoms":[368,400]}},{"Named":{"name":"power_numerator","atom":367}},{"Sequence":{"atoms":[366,402]}},{"Repetition":{"atom":365,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[89,404]}},{"Entity":{"atom":85}},{"Sequence":{"atoms":[88,406]}},{"Entity":{"atom":405}},{"Entity":{"atom":418}},{"Re":{"pattern":"[\\x00-\\u{10ffff}]"}},{"Lookahead":{"atom":410,"positive":false}},{"Entity":{"atom":38}},{"Entity":{"atom":6}},{"Entity":{"atom":67}},{"Entity":{"atom":18}},{"Alternative":{"atoms":[412,413,414,415]}},{"Lookahead":{"atom":416,"positive":true}},{"Alternative":{"atoms":[411,417]}},{"Sequence":{"atoms":[408,409]}},{"Entity":{"atom":431}},{"Str":{"pattern":"Ei"}},{"Str":{"pattern":"Gi"}},{"Str":{"pattern":"Ki"}},{"Str":{"pattern":"Mi"}},{"Str":{"pattern":"Pi"}},{"Str":{"pattern":"Ti"}},{"Str":{"pattern":"Yi"}},{"Str":{"pattern":"Zi"}},{"Str":{"pattern":"da"}},{"Alternative":{"atoms":[421,422,423,424,425,426,427,428,429]}},{"Named":{"name":"prefix","atom":430}},{"Entity":{"atom":405}},{"Entity":{"atom":85}},{"Sequence":{"atoms":[420,432,433]}},{"Entity":{"atom":431}},{"Entity":{"atom":405}},{"Sequence":{"atoms":[435,436]}},{"Entity":{"atom":464}},{"Str":{"pattern":"1"}},{"Str":{"pattern":"E"}},{"Str":{"pattern":"G"}},{"Str":{"pattern":"M"}},{"Str":{"pattern":"P"}},{"Str":{"pattern":"Q"}},{"Str":{"pattern":"R"}},{"Str":{"pattern":"T"}},{"Str":{"pattern":"Y"}},{"Str":{"pattern":"Z"}},{"Str":{"pattern":"a"}},{"Str":{"pattern":"c"}},{"Str":{"pattern":"d"}},{"Str":{"pattern":"f"}},{"Str":{"pattern":"h"}},{"Str":{"pattern":"k"}},{"Str":{"pattern":"m"}},{"Str":{"pattern":"n"}},{"Str":{"pattern":"p"}},{"Str":{"pattern":"q"}},{"Str":{"pattern":"r"}},{"Str":{"pattern":"u"}},{"Str":{"pattern":"y"}},{"Str":{"pattern":"z"}},{"Alternative":{"atoms":[439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462]}},{"Named":{"name":"prefix","atom":463}},{"Entity":{"atom":405}},{"Entity":{"atom":85}},{"Sequence":{"atoms":[438,465,466]}},{"Entity":{"atom":464}},{"Entity":{"atom":405}},{"Sequence":{"atoms":[468,469]}},{"Entity":{"atom":484}},{"Str":{"pattern":"kcal_IT"}},{"Str":{"pattern":"kcal_th"}},{"Str":{"pattern":"mbar"}},{"Str":{"pattern":"cSt"}},{"Str":{"pattern":"kgf"}},{"Str":{"pattern":"uin"}},{"Str":{"pattern":"cP"}},{"Str":{"pattern":"dB"}},{"Str":{"pattern":"kg"}},{"Str":{"pattern":"mL"}},{"Str":{"pattern":"ml"}},{"Alternative":{"atoms":[472,473,474,475,476,477,478,479,480,481,482]}},{"Named":{"name":"unit","atom":483}},{"Entity":{"atom":403}},{"Repetition":{"atom":485,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":418}},{"Sequence":{"atoms":[471,486,487]}},{"Alternative":{"atoms":[80,87,407,419,434,437,467,470,488]}},{"Entity":{"atom":18}},{"Repetition":{"atom":490,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":38}},{"Entity":{"atom":18}},{"Repetition":{"atom":493,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":516}},{"Named":{"name":"sequence","atom":495}},{"Sequence":{"atoms":[78,491,492,494,496]}},{"Entity":{"atom":68}},{"Entity":{"atom":512}},{"Named":{"name":"sequence","atom":499}},{"Repetition":{"atom":500,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[498,501]}},{"Entity":{"atom":489}},{"Entity":{"atom":508}},{"Named":{"name":"sequence","atom":504}},{"Repetition":{"atom":505,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[503,506]}},{"Alternative":{"atoms":[23,50,77,497,502,507]}},{"Named":{"name":"sequence","atom":504}},{"Repetition":{"atom":509,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[503,510]}},{"Alternative":{"atoms":[23,50,77,497,502,511]}},{"Named":{"name":"sequence","atom":499}},{"Repetition":{"atom":513,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[498,514]}},{"Alternative":{"atoms":[23,50,77,497,515,511]}},{"Named":{"name":"sequence","atom":495}},{"Sequence":{"atoms":[78,491,492,494,517]}},{"Alternative":{"atoms":[23,50,77,518,515,511]}},{"Named":{"name":"sequence","atom":75}},{"Sequence":{"atoms":[51,71,72,74,520]}},{"Alternative":{"atoms":[23,50,521,518,515,511]}},{"Alternative":{"atoms":[62,69]}},{"Named":{"name":"int_exp","atom":61}},{"Entity":{"atom":18}},{"Repetition":{"atom":525,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":67}},{"Named":{"name":"close_paren","atom":527}},{"Sequence":{"atoms":[58,60,524,526,528]}},{"Named":{"name":"int_exp","atom":56}},{"Entity":{"atom":522}},{"Entity":{"atom":85}},{"Alternative":{"atoms":[531,532]}},{"Repetition":{"atom":533,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[530,534]}},{"Entity":{"atom":522}},{"Alternative":{"atoms":[535,536]}},{"Named":{"name":"int_exp","atom":55}},{"Sequence":{"atoms":[52,54,538,65,66]}},{"Sequence":{"atoms":[51,71,72,74,520]}},{"Alternative":{"atoms":[23,50,540,518,515,511]}},{"Named":{"name":"sequence","atom":48}},{"Sequence":{"atoms":[42,44,45,47,542]}},{"Alternative":{"atoms":[23,543,540,518,515,511]}},{"Named":{"name":"sequence","atom":41}},{"Sequence":{"atoms":[30,40,545]}},{"Repetition":{"atom":29,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[3,547]}},{"Alternative":{"atoms":[548,87,407,419,434,437,467,470,488]}},{"Named":{"name":"second_set","atom":28}},{"Sequence":{"atoms":[25,27,550]}},{"Entity":{"atom":539}},{"Named":{"name":"first_int_exp_set","atom":552}},{"Entity":{"atom":18}},{"Repetition":{"atom":554,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":539}},{"Named":{"name":"second_int_exp_set","atom":556}},{"Sequence":{"atoms":[553,555,557]}},{"Entity":{"atom":549}},{"Named":{"name":"first_set","atom":559}},{"Entity":{"atom":18}},{"Repetition":{"atom":561,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":539}},{"Named":{"name":"second_int_exp_set","atom":563}},{"Sequence":{"atoms":[560,562,564]}},{"Entity":{"atom":539}},{"Named":{"name":"first_int_exp_set","atom":566}},{"Entity":{"atom":18}},{"Repetition":{"atom":568,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":549}},{"Named":{"name":"second_set","atom":570}},{"Sequence":{"atoms":[567,569,571]}},{"Alternative":{"atoms":[551,558,565,572]}},{"Named":{"name":"implicit_extended","atom":24}},{"Sequence":{"atoms":[574,44,45,47,542]}},{"Alternative":{"atoms":[23,575,540,518,515,511]}},{"Named":{"name":"sequence","atom":20}},{"Repetition":{"atom":577,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[8,19,578]}},{"Alternative":{"atoms":[579,575,540,518,515,511]}},{"Named":{"name":"sqrt","atom":7}},{"Entity":{"atom":67}},{"Sequence":{"atoms":[4,5,581,582]}},{"Sequence":{"atoms":[3,547]}},{"Alternative":{"atoms":[584,87,407,419,434,437,467,470,488]}},{"Named":{"name":"first_set","atom":2}},{"Sequence":{"atoms":[586,27,550]}},{"Alternative":{"atoms":[587,558,565,572]}},{"Named":{"name":"implicit_extended","atom":1}},{"Sequence":{"atoms":[589,19,578]}},{"Alternative":{"atoms":[590,575,540,518,515,511]}},{"Entity":{"atom":718}},{"Entity":{"atom":715}},{"Entity":{"atom":713}},{"Str":{"pattern":"sqrt"}},{"Entity":{"atom":6}},{"Entity":{"atom":710}},{"Named":{"name":"first_set","atom":593}},{"Entity":{"atom":18}},{"Named":{"name":"extender","atom":599}},{"Entity":{"atom":707}},{"Entity":{"atom":616}},{"Entity":{"atom":613}},{"Str":{"pattern":"dim_Theta"}},{"Str":{"pattern":"dim_phi"}},{"Str":{"pattern":"dim_I"}},{"Str":{"pattern":"dim_J"}},{"Str":{"pattern":"dim_L"}},{"Str":{"pattern":"dim_M"}},{"Str":{"pattern":"dim_N"}},{"Str":{"pattern":"dim_T"}},{"Alternative":{"atoms":[604,605,606,607,608,609,610,611]}},{"Named":{"name":"dimension","atom":612}},{"Entity":{"atom":403}},{"Repetition":{"atom":614,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[603,615]}},{"Alternative":{"atoms":[594,602]}},{"Entity":{"atom":705}},{"Entity":{"atom":18}},{"Repetition":{"atom":619,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":38}},{"Entity":{"atom":18}},{"Repetition":{"atom":622,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":703}},{"Named":{"name":"second_set","atom":601}},{"Entity":{"atom":700}},{"Repetition":{"atom":626,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[598,600,625,627]}},{"Entity":{"atom":631}},{"Repetition":{"atom":618,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[617,630]}},{"Named":{"name":"first_set","atom":629}},{"Entity":{"atom":18}},{"Repetition":{"atom":633,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":697}},{"Entity":{"atom":6}},{"Entity":{"atom":695}},{"Entity":{"atom":6}},{"Named":{"name":"open_paren","atom":638}},{"Entity":{"atom":681}},{"Named":{"name":"second_int_exp_set","atom":635}},{"Entity":{"atom":678}},{"Repetition":{"atom":642,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[632,634,641,643]}},{"Entity":{"atom":652}},{"Named":{"name":"int_exp","atom":637}},{"Entity":{"atom":67}},{"Entity":{"atom":650}},{"Named":{"name":"sequence","atom":624}},{"Sequence":{"atoms":[620,621,623,649]}},{"Repetition":{"atom":648,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[636,646,647,651]}},{"Named":{"name":"first_int_exp_set","atom":645}},{"Entity":{"atom":18}},{"Repetition":{"atom":654,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":631}},{"Named":{"name":"second_set","atom":656}},{"Entity":{"atom":675}},{"Repetition":{"atom":658,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[653,655,657,659]}},{"Entity":{"atom":652}},{"Named":{"name":"first_int_exp_set","atom":661}},{"Entity":{"atom":18}},{"Repetition":{"atom":663,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":652}},{"Named":{"name":"second_int_exp_set","atom":665}},{"Entity":{"atom":672}},{"Repetition":{"atom":667,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[662,664,666,668]}},{"Entity":{"atom":652}},{"Entity":{"atom":631}},{"Alternative":{"atoms":[628,644,660,669,670,671]}},{"Repetition":{"atom":667,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[662,664,666,673]}},{"Alternative":{"atoms":[628,644,660,674,670,671]}},{"Repetition":{"atom":658,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[653,655,657,676]}},{"Alternative":{"atoms":[628,644,677,674,670,671]}},{"Repetition":{"atom":642,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[632,634,641,679]}},{"Alternative":{"atoms":[628,680,677,674,670,671]}},{"Named":{"name":"int_exp","atom":640}},{"Entity":{"atom":67}},{"Named":{"name":"close_paren","atom":683}},{"Sequence":{"atoms":[639,682,684]}},{"Named":{"name":"int_exp","atom":685}},{"Entity":{"atom":18}},{"Repetition":{"atom":687,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":681}},{"Entity":{"atom":650}},{"Alternative":{"atoms":[689,690]}},{"Named":{"name":"sequence","atom":691}},{"Sequence":{"atoms":[686,688,692]}},{"Entity":{"atom":681}},{"Alternative":{"atoms":[693,694]}},{"Named":{"name":"int_exp","atom":637}},{"Sequence":{"atoms":[636,696,647,651]}},{"Named":{"name":"second_int_exp_set","atom":635}},{"Sequence":{"atoms":[632,634,698,679]}},{"Alternative":{"atoms":[628,699,677,674,670,671]}},{"Repetition":{"atom":626,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[598,600,625,701]}},{"Alternative":{"atoms":[702,699,677,674,670,671]}},{"Named":{"name":"sequence","atom":624}},{"Sequence":{"atoms":[620,621,623,704]}},{"Repetition":{"atom":618,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[617,706]}},{"Named":{"name":"second_set","atom":601}},{"Sequence":{"atoms":[598,600,708,701]}},{"Alternative":{"atoms":[709,699,677,674,670,671]}},{"Named":{"name":"sqrt","atom":597}},{"Entity":{"atom":67}},{"Sequence":{"atoms":[595,596,711,712]}},{"Alternative":{"atoms":[594,602]}},{"Sequence":{"atoms":[714,706]}},{"Named":{"name":"first_set","atom":593}},{"Sequence":{"atoms":[716,600,708,701]}},{"Alternative":{"atoms":[717,699,677,674,670,671]}},{"Entity":{"atom":464}},{"Entity":{"atom":721}},{"Str":{"pattern":"-"}},{"Named":{"name":"hyphen","atom":720}},{"Sequence":{"atoms":[719,722]}},{"Entity":{"atom":431}},{"Entity":{"atom":721}},{"Named":{"name":"hyphen","atom":725}},{"Sequence":{"atoms":[724,726]}},{"Alternative":{"atoms":[0,592,723,727]}}],"root":728},"bindings":[]}},"preprocess":{},"tables":{"units":{"file":"units.yaml","rows":[{"name":"ton-force (2000 lb)"},{"name":"ton_refrigeration"},{"name":"dprime_Hg_32degF"},{"name":"dprime_Hg_60degF"},{"name":"fl oz (US label)"},{"name":"a_sidereal_year"},{"name":"a_tropical_year"},{"name":"aW (Cardelli)"},{"name":"ftH_2O_39degF"},{"name":"inH_2O_39degF"},{"name":"inH_2O_60degF"},{"name":"liq pint (US)"},{"name":"oz (US label)"},{"name":"pica_computer"},{"name":"rad_radiation"},{"name":"cmH_2O_4degC"},{"name":"ft_US_survey"},{"name":"h-bar_atomic"},{"name":"in_US_survey"},{"name":"lambda-bar_C"},{"name":"mi_US_survey"},{"name":"min_sidereal"},{"name":"pica_printer"},{"name":"yd_US_survey"},{"name":"dry pt (US)"},{"name":"dry qt (US)"},{"name":"gi_imperial"},{"name":"hp_electric"},{"name":"inHg_32degF"},{"name":"inHg_60degF"},{"name":"liq qt (US)"},{"name":"pt_computer"},{"name":"statcoulomb"},{"name":"\"Hg_32degF"},{"name":"\"Hg_60degF"},{"name":"Btu_39degF"},{"name":"Btu_59degF"},{"name":"Btu_60degF"},{"name":"cmHg_0degC"},{"name":"d_sidereal"},{"name":"dwt (troy)"},{"name":"fl oz (UK)"},{"name":"fl oz (US)"},{"name":"h-bar_eV_s"},{"name":"h_sidereal"},{"name":"m_e_atomic"},{"name":"pt_printer"},{"name":"rh_percent"},{"name":"s_sidereal"},{"name":"tbsp_label"},{"name":"cup_label"},{"name":"dprime_Hg"},{"name":"dprime_in"},{"name":"dr (avdp)"},{"name":"hp_boiler"},{"name":"hp_metric"},{"name":"prime_min"},{"name":"scr (ap.)"},{"name":"ton_short"},{"name":"tsp_label"},{"name":"Btu_mean"},{"name":"E_erlang"},{"name":"bbl (US)"},{"name":"cwt (UK)"},{"name":"cwt (US)"},{"name":"dprime_s"},{"name":"gal (UK)"},{"name":"gal (US)"},{"name":"hp_water"},{"name":"mil_nato"},{"name":"prime_Hg"},{"name":"prime_ft"},{"name":"statwatt"},{"name":"thm (EC)"},{"name":"thm (US)"},{"name":"ton_long"},{"name":"Lambert"},{"name":"bu (US)"},{"name":"lb_troy"},{"name":"oz_troy"},{"name":"pt (UK)"},{"name":"qt (UK)"},{"name":"statmho"},{"name":"statohm"},{"name":"ton_TNT"},{"name":"Btu_th"},{"name":"a_year"},{"name":"byte_B"},{"name":"cal_IT"},{"name":"cal_th"},{"name":"cmH_2O"},{"name":"dprime"},{"name":"ftH_2O"},{"name":"inH_2O"},{"name":"kayser"},{"name":"micron"},{"name":"mmH_2O"},{"name":"statWb"},{"name":"'_min"},{"name":"Aring"},{"name":"Darcy"},{"name":"abohm"},{"name":"barye"},{"name":"bel_B"},{"name":"dB_mW"},{"name":"darcy"},{"name":"fermi"},{"name":"fl dr"},{"name":"gamma"},{"name":"h-bar"},{"name":"hp_UK"},{"name":"lbmol"},{"name":"minim"},{"name":"prime"},{"name":"shake"},{"name":"statA"},{"name":"statF"},{"name":"statH"},{"name":"statT"},{"name":"statV"},{"name":"\"_in"},{"name":"'_ft"},{"name":"Hart"},{"name":"Torr"},{"name":"barn"},{"name":"cmHg"},{"name":"cmil"},{"name":"degC"},{"name":"degF"},{"name":"degK"},{"name":"degR"},{"name":"fath"},{"name":"ft.L"},{"name":"ft.c"},{"name":"ftHg"},{"name":"inHg"},{"name":"l.h."},{"name":"l.m."},{"name":"l.s."},{"name":"l.w."},{"name":"l.y."},{"name":"mmHg"},{"name":"slug"},{"name":"tbsp"},{"name":"thou"},{"name":"\"Hg"},{"name":"\"_s"},{"name":"'Hg"},{"name":"Btu"},{"name":"E_h"},{"name":"Gal"},{"name":"Ohm"},{"name":"a_0"},{"name":"abA"},{"name":"abC"},{"name":"abF"},{"name":"abH"},{"name":"abS"},{"name":"abV"},{"name":"atm"},{"name":"bar"},{"name":"bit"},{"name":"c_0"},{"name":"cal"},{"name":"cup"},{"name":"dBm"},{"name":"dec"},{"name":"deg"},{"name":"den"},{"name":"dyn"},{"name":"erg"},{"name":"fur"},{"name":"gon"},{"name":"gpm"},{"name":"kat"},{"name":"kip"},{"name":"lbf"},{"name":"lnk"},{"name":"m_e"},{"name":"mil"},{"name":"min"},{"name":"mol"},{"name":"mpg"},{"name":"oct"},{"name":"pdl"},{"name":"ppm"},{"name":"psi"},{"name":"rad"},{"name":"rem"},{"name":"rhe"},{"name":"tex"},{"name":"tsp"},{"name":"var"},{"name":"Bd"},{"name":"Bi"},{"name":"Bq"},{"name":"Ci"},{"name":"Da"},{"name":"Gi"},{"name":"Gs"},{"name":"Gy"},{"name":"Hz"},{"name":"Mx"},{"name":"Np"},{"name":"Oe"},{"name":"Pa"},{"name":"Sh"},{"name":"St"},{"name":"Sv"},{"name":"Wb"},{"name":"ac"},{"name":"as"},{"name":"at"},{"name":"cd"},{"name":"ch"},{"name":"ct"},{"name":"dr"},{"name":"eV"},{"name":"ft"},{"name":"gf"},{"name":"gi"},{"name":"gr"},{"name":"ha"},{"name":"hp"},{"name":"in"},{"name":"kn"},{"name":"kp"},{"name":"lb"},{"name":"lm"},{"name":"lx"},{"name":"mi"},{"name":"oz"},{"name":"pH"},{"name":"pc"},{"name":"ph"},{"name":"pk"},{"name":"rd"},{"name":"rh"},{"name":"sb"},{"name":"sr"},{"name":"st"},{"name":"ua"},{"name":"yd"},{"name":"\""},{"name":"'"},{"name":"A"},{"name":"C"},{"name":"D"},{"name":"F"},{"name":"G"},{"name":"H"},{"name":"J"},{"name":"K"},{"name":"L"},{"name":"M"},{"name":"N"},{"name":"P"},{"name":"R"},{"name":"S"},{"name":"T"},{"name":"V"},{"name":"W"},{"name":"a"},{"name":"c"},{"name":"d"},{"name":"e"},{"name":"g"},{"name":"h"},{"name":"l"},{"name":"m"},{"name":"s"},{"name":"t"},{"name":"u"}]},"dimensions":{"file":"dimensions.yaml","rows":[{"name":"dim_Theta"},{"name":"dim_phi"},{"name":"dim_I"},{"name":"dim_J"},{"name":"dim_L"},{"name":"dim_M"},{"name":"dim_N"},{"name":"dim_T"}]},"prefixes_double":{"file":"prefixes_double.yaml","rows":[{"name":"Ei"},{"name":"Gi"},{"name":"Ki"},{"name":"Mi"},{"name":"Pi"},{"name":"Ti"},{"name":"Yi"},{"name":"Zi"},{"name":"da"}]},"prefixes_single":{"file":"prefixes_single.yaml","rows":[{"name":"1"},{"name":"E"},{"name":"G"},{"name":"M"},{"name":"P"},{"name":"Q"},{"name":"R"},{"name":"T"},{"name":"Y"},{"name":"Z"},{"name":"a"},{"name":"c"},{"name":"d"},{"name":"f"},{"name":"h"},{"name":"k"},{"name":"m"},{"name":"n"},{"name":"p"},{"name":"q"},{"name":"r"},{"name":"u"},{"name":"y"},{"name":"z"}]},"prefixed_units":{"file":"prefixed_units.yaml","rows":[{"name":"kcal_IT"},{"name":"kcal_th"},{"name":"mbar"},{"name":"cSt"},{"name":"kgf"},{"name":"uin"},{"name":"cP"},{"name":"dB"},{"name":"kg"},{"name":"mL"},{"name":"ml"}]}},"lint":{"order_warnings":["rule forward_slashes: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule end_guard: branches 1 and 2 are order-dependent (first set not statically known)","rule slashed_number_named_int_exp: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 1 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 1 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 2 and 7 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 2 and 8 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 3 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 3 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 3 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 3 and 7 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 3 and 8 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 3 and 9 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 4 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 4 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 4 and 7 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 4 and 8 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 4 and 9 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 5 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 5 and 7 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 5 and 8 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 5 and 9 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 6 and 7 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 6 and 8 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 6 and 9 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 7 and 8 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 7 and 9 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units: branches 8 and 9 are order-dependent (shared first bytes; ordered choice is decisive)","rule wrapper_prefixes_units_value: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule named_int_exp_prefixes_units: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule implicit_extended: branches 1 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule implicit_extended: branches 2 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 1 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 1 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 1 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 1 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 2 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 2 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 2 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 2 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 3 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule prefixes_units_int_exp: branches 4 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule dimension_rules_named_exp: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule dimension_rules_int_exp: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule dimension_rules_int_exp: branches 1 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule dimension_rules_int_exp: branches 2 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule dimension_rules_int_exp: branches 3 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule dimension_rules_int_exp: branches 3 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule dimension_rules_int_exp: branches 4 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule expression: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule expression: branches 1 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule expression: branches 1 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule expression: branches 2 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule expression: branches 2 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule expression: branches 3 and 4 are order-dependent (shared first bytes; ordered choice is decisive)"]},"default_entry":"expression","render":{},"derive":{},"tests":[{"entry":"expression","kind":"accept","input":"mm*s^-2","expect":{}},{"entry":"expression","kind":"accept","input":"sqrt(Hz)","expect":{}},{"entry":"expression","kind":"accept","input":"K/(kg*m)","expect":{}},{"entry":"expression","kind":"accept","input":"p-","expect":{}},{"entry":"expression","kind":"accept","input":"(m)(s)","expect":{}},{"entry":"expression","kind":"accept","input":"dB","expect":{}},{"entry":"expression","kind":"accept","input":"dB^2","expect":{}},{"entry":"expression","kind":"accept","input":"mbar*s^-2","expect":{}},{"entry":"expression","kind":"accept","input":"kgf","expect":{}},{"entry":"expression","kind":"accept","input":"sqrt(sqrt(m))","expect":{}},{"entry":"expression","kind":"reject","input":"que?","expect":{}},{"entry":"expression","kind":"reject","input":"m2","expect":{}},{"entry":"expression","kind":"reject","input":"dim_Ldim_M","expect":{}},{"entry":"expression","kind":"reject","input":"mm*","expect":{}},{"entry":"expression","kind":"reject","input":"m*s/","expect":{}},{"entry":"expression","kind":"reject","input":"sqrt(m)^2","expect":{}}],"docs":{},"source":"# UnitsML AsciiUnits expression grammar.\n#\n# 1:1 transcription of unitsml-ruby lib/unitsml/parse.rb +\n# lib/unitsml/intermediate_exp_rules.rb (Parslet), rule for rule, in the\n# same alternative order — PEG ordered choice makes order decisive, and the\n# quirks (trailing-extender acceptance, guard fall-through to prefixed\n# units, no power after fenced/sqrt forms) are load-bearing.\n#\n# Terminal tables are generated from UnitsDB via scripts/gen_tables.rb and\n# embedded in the artifact at compile time.\n#\n# Capture names (unit, prefix, dimension, integer, power_numerator, extender,\n# sqrt, int_exp, sequence, first_set, second_set, open_paren, close_paren)\n# mirror the Parslet .as() names so consumers can map them 1:1.\n\ngrammar UnitsmlAscii version \"0.1.0\" edition 2 {\n\n ws = %x09 / %x0A / %x0B / %x0C / %x0D / %x20\n spaces = 1*ws\n lparen = \"(\"\n rparen = \")\"\n hyphen = \"-\"\n star = \"*\"\n digit = %x30-39\n forward_slashes = \"//\" / \"/\"\n extender = (forward_slashes / star) as extender\n # The signed run is one authored capture: edition 2 drops anonymous\n # literals from the tree, so the \"-\" sign would vanish and the digits\n # would name per-iteration — the capture keeps the exact v1 slice\n # (value \"-2\", \"1/2\", offset..length) the tree readers scalarize.\n slashed_number = (([\"-\"] 1*digit) [forward_slashes ([\"-\"] 1*digit)]) as integer\n end_guard = !ANY / &(extender / lparen / rparen / spaces)\n\n unit = alt from_table \"units\" column \"name\" as unit\n prefixed_units = alt from_table \"prefixed_units\" column \"name\" as unit\n single_letter_prefixes = alt from_table \"prefixes_single\" column \"name\" as prefix\n double_letter_prefixes = alt from_table \"prefixes_double\" column \"name\" as prefix\n dimensions = alt from_table \"dimensions\" column \"name\" as dimension\n\n power = \"^\" slashed_number_int_exp as power_numerator\n slashed_number_int_exp = slashed_number / (lparen slashed_number_named_int_exp as int_exp rparen)\n slashed_number_named_int_exp = (lparen as open_paren slashed_number_int_exp rparen as close_paren) / slashed_number_int_exp\n unit_and_power = unit [power]\n sqrt_sequence = \"sqrt\" lparen prefixes_units_int_exp as sqrt rparen\n sqrt_dimensions = \"sqrt\" lparen dimension_rules_int_exp as sqrt rparen\n extended_prefixed_units = extender [spaces] prefixes_units_int_exp as sequence\n powered_dimensions = dimensions [power]\n\n prefixes_units = (sqrt_sequence [extended_prefixed_units]) / (\"1\" as unit [extended_prefixed_units]) / (unit_and_power extended_prefixed_units) / (unit_and_power end_guard) / (double_letter_prefixes unit_and_power extended_prefixed_units) / (double_letter_prefixes unit_and_power) / (single_letter_prefixes unit_and_power extended_prefixed_units) / (single_letter_prefixes unit_and_power) / (prefixed_units [power] end_guard)\n\n wrapper_prefixes_units_value = int_exp_prefixes_units / prefixes_units_int_exp\n int_exp_prefixes_units = lparen [spaces] named_int_exp_prefixes_units as int_exp [spaces] rparen\n prefixes_units_named_int_exp = (lparen as open_paren [spaces] wrapper_prefixes_units_value as int_exp [spaces] rparen as close_paren)\n named_int_exp_prefixes_units = (prefixes_units_named_int_exp as int_exp [(prefixes_units_int_exp / extended_prefixed_units)]) / prefixes_units_int_exp\n\n implicit_extended = (prefixes_units as first_set spaces as extender prefixes_units as second_set) / (int_exp_prefixes_units as first_int_exp_set [spaces] int_exp_prefixes_units as second_int_exp_set) / (prefixes_units as first_set [spaces] int_exp_prefixes_units as second_int_exp_set) / (int_exp_prefixes_units as first_int_exp_set [spaces] prefixes_units as second_set)\n\n prefixes_units_int_exp = (implicit_extended as implicit_extended [spaces] [prefixes_units_int_exp as sequence]) / (implicit_extended as implicit_extended [spaces] extender [spaces] prefixes_units_int_exp as sequence) / (int_exp_prefixes_units [spaces] extender [spaces] prefixes_units_int_exp as sequence) / (prefixes_units [spaces] extender [spaces] prefixes_units_int_exp as sequence) / (int_exp_prefixes_units [prefixes_units_int_exp as sequence]) / (prefixes_units [prefixes_units_int_exp as sequence])\n\n dimension_rules = (sqrt_dimensions / powered_dimensions) [extended_dimension_rules]\n extended_dimension_rules = [spaces] extender [spaces] dimension_rules_int_exp as sequence\n int_exp_dimension_rules = lparen dimension_rules_named_exp as int_exp rparen [extended_dimension_rules]\n dimension_rules_named_exp = ((lparen as open_paren dimension_rules_int_exp as int_exp rparen as close_paren) as int_exp [spaces] (dimension_rules_int_exp / extended_dimension_rules) as sequence) / dimension_rules_int_exp\n\n dimension_rules_int_exp = (dimension_rules as first_set spaces as extender dimension_rules as second_set [dimension_rules_int_exp]) / (dimension_rules as first_set [spaces] int_exp_dimension_rules as second_int_exp_set [dimension_rules_int_exp]) / (int_exp_dimension_rules as first_int_exp_set [spaces] dimension_rules as second_set [dimension_rules_int_exp]) / (int_exp_dimension_rules as first_int_exp_set [spaces] int_exp_dimension_rules as second_int_exp_set [dimension_rules_int_exp]) / int_exp_dimension_rules / dimension_rules\n\n expression = prefixes_units_int_exp / dimension_rules_int_exp / (single_letter_prefixes hyphen) / (double_letter_prefixes hyphen)\n\n entry expression: expression\n\n test expression {\n accept \"mm*s^-2\"\n accept \"sqrt(Hz)\"\n accept \"K/(kg*m)\"\n accept \"p-\"\n accept \"(m)(s)\"\n accept \"dB\"\n accept \"dB^2\"\n accept \"mbar*s^-2\"\n accept \"kgf\"\n accept \"sqrt(sqrt(m))\"\n reject \"que?\"\n reject \"m2\"\n reject \"dim_Ldim_M\"\n reject \"mm*\"\n reject \"m*s/\"\n reject \"sqrt(m)^2\"\n }\n}\n","source_hash":"7702a1bd52072d5d860e8176b50b5bebb218c1fda864592bb7313419e94506e3","unicode_tables":"onigmo (Ruby 4.0.1)","compiler_version":"1.5.8","edition":2,"semantics_hash":"sha256:4934ae2e2e40251a1c8c30c923a57a7e0e70e765ca63c17af13e1ec32eb1904c","checksum":"sha256:3a5d423ea975d46e9ab4b98a652e9276849f540226466dbacdd5001b2f6a5016","validated":{"lint_errors":0,"lint_warnings":56,"tests_total":16,"tests_failures":0,"self_test":true},"byte_checksum":"sha256:b2f159fe1592e822215c1836f28cf2b78fc57c205199fcc292479c3d2c097977"}