hylo-lang / Lotsawa

A Swift implementation of the MARPA algorithms
Apache License 2.0
19 stars 2 forks source link

v2 Cleanup #9

Closed nickpdemarco closed 1 year ago

nickpdemarco commented 2 years ago

Minor cleanup / refactor, and some improvements to documentation.

dabrahams commented 2 years ago

Probably

Sent from my iPhone

On Sep 8, 2022, at 10:56 AM, nickpdemarco @.***> wrote:

 @nickpdemarco commented on this pull request.

In Sources/Lotsawa/Chart.swift:

@@ -47,17 +47,21 @@ extension Chart { /// It is arranged to avoid 64-bit alignment, since this will be combined into an Entry. /// You'd want to swap the elements for optimal performance on big-endian architectures. var storage: (

  • /// 16-bit dot position and the low 16 bits of the origin
  • dotPosition_originLow: UInt32,
  • /// The high 16 bits of the origin, 1 bit for isEarley, 14 bit transition or LHS symbol,
  • /// 1 bit for isCompletion.
  • originHi_isEarley_symbol_isCompletion: UInt32)
  • /// The low 16 bits of the origin and a 16-bit dot position.
  • // bits | xxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxx |
  • // meaning | originLow | dotPosition |
  • originLow_dotPosition: UInt32,
  • /// 1 bit for isCompletion, 14 bit transition or LHS symbol, 1 bit for isEarley, and the high 16 bits of the origin. Sure - what's your editorconfig set to? 100?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.