Language Specification · v2026.07.04

The Tungsten Programmer's Language

A complete and concise specification of the syntax and semantics of Tungsten, version 2026.07.04. Syntax and lexical analysis are formally specified; the rest is described in precise, informal English.

  1. 0IntroductionWhat Tungsten is, and the shape of the language
  2. 1Lexical AnalysisTokens, literals, indentation, and the grammar
  3. 2Floating-Point Math Modesstrict / precise / fast, FMA contraction, scoped blocks
  4. AUnits of MeasurementDimensional analysis and the unit system
  5. BPhysical ConstantsBuilt-in constants and their units
  6. CWValue EncodingThe NaN-boxed value representation

Made in America, released on its 250th birthday. © 2013–2026 Erik Peterson. Licensed CC BY-SA 4.0.