/pine

Basic arithmetic language for woodworking in imperial units.

Primary LanguageJavaScript

List of expressions we should parse

Individual values

  • 1
  • 1"
  • 1'
  • [ ]
  • 1/2
  • 1/2"
  • 1/2'
  • [ ]
  • [ ]
  • 1 1/2
  • 1 1/2"
  • 1 1/2'
  • 1" 1/2 ??
  • 1' 1/2
  • 1' 1/2"
  • 1' 1"

Assumed inches

1 = 1 inch
1/2 = 1/2 inch
2 1/2 = 2 1/2 inches

Prime marks

1' = 1 foot
4 1/2" = 4 1/2 inches
4 1/2' = 4 1/2 feet
2' 6" = 2 feet 6 inches
2' 3" = 2 feet 3 inches

Arithmetic

1/2 + 1/2 = 1 inch
3' + 3' = 6 feet
3' + 3" = 3 feet 3 inches
3 1/2' + 3 1/2' = 7 feet
3 1/2' + 2 1/2" = 3 feet 8 1/2 inches