Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse Error on Out of Range Binary Integers #1337

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Commits on Nov 13, 2024

  1. Parse Error on Out of Range Binary Integers

    - add checks for signed/unsigned in BinaryIntegerBaseParser and BinaryIntegerBaseUnparser
    - add tests for parse and unparse
    - update failing tests
    
    DAFFODIL-2297
    olabusayoT committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    e88324f View commit details
    Browse the repository at this point in the history
  2. fixup! Parse Error on Out of Range Binary Integers

    - currently we don't check the minimum lengths for signed/unsigned binary ints and this causes issues when you try to set a binary int to 0 bits (RSDE), so per the DFDL workgroup we add in these checks.
    - add width check to unparse code and associated test
    - fix bug where we weren't returning after UnparseError
    - add SDEs for checks for non-expression fixed lengths
    - add tunable allowSignedIntegerLength1Bit and update tests to use
    - add WarnID SignedBinaryIntegerLength1Bit
    - SDW by default, SDE or UE/PE if tunable is false
    
    DAFFODIL-2297
    olabusayoT committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    a8035d4 View commit details
    Browse the repository at this point in the history
  3. fixup! fixup! Parse Error on Out of Range Binary Integers

    - currently we pass in isSigned boolean from ElementBaseGrammarMixin, but we can use the new PrimType.PrimNumeric.isSigned member instead for simplicity. We also added the minWidth member to simplify checking the minimum width of PrimNumeric types
    
    DAFFODIL-2339
    olabusayoT committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    46b1dfe View commit details
    Browse the repository at this point in the history
  4. fixup! fixup! fixup! Parse Error on Out of Range Binary Integers

    - move vals into conditional blocks that use them
    - fix diagnostic message to be grammatically correct for unsigned
    - make binaryIntegerValue lazy val
    - add tests for coverage
    - make isSigned a def instead of a val
    - set minWidth for decimal to Nope
    - fix minWidth bug for Byte type
    - add comment for non PrimNumeric usage of PackedBinaryIntegerBaseParser
    - make it a PE if nBits == 0 for PackedBinaryIntegerBaseParser
    
    DAFFODIL-2297
    olabusayoT committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    9e84148 View commit details
    Browse the repository at this point in the history
  5. fixup! fixup! fixup! fixup! Parse Error on Out of Range Binary Integers

    - added test for parsing from -1 to 1 bit
    - added checks for signed/unsigned minWidth to decimal with tests
    
    DAFFODIL-2297
    olabusayoT committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    ecd1f45 View commit details
    Browse the repository at this point in the history
  6. fixup! fixup! fixup! fixup! Parse Error on Out of Range Binary Integers

    - added more decimal tests
    - updated PE to be dynamic for signed and unsigned packed integers
    - added PE for packed decimal with length 0
    
    DAFFODIL-2297
    olabusayoT committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    a67fe6d View commit details
    Browse the repository at this point in the history
  7. fixup! fixup! fixup! fixup! fixup! Parse Error on Out of Range Binary…

    … Integers
    
    - move checkMinWidth and checkMaxWidth into BinaryNumberCheckWidth trait
    - no SDW on parsing/unparsing 1 bit length signed numbers (just during compilation for bit length known at compile time)
    - update tests
    - add test for packed integer IVC
    
    DAFFODIL-2297
    olabusayoT committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    f9ff30f View commit details
    Browse the repository at this point in the history