Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
P parabix-devel
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 9
    • Issues 9
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • cameron
  • parabix-devel
  • Wiki
  • Bracket Matching

Bracket Matching · Changes

Page history
Update Bracket Matching authored Feb 14, 2022 by lperesde's avatar lperesde
Hide whitespace changes
Inline Side-by-side
Showing with 9 additions and 11 deletions
+9 -11
  • Bracket-Matching.md Bracket-Matching.md +9 -11
  • No files found.
Bracket-Matching.md
View page @ e676da87
......@@ -49,29 +49,27 @@ _// string.json_
Thus, when we apply NestingDepth kernel to this stream, we get the output:
```
Bracket Stream .....................
Nesting Depth 000000000000000000000
ND BixNum[2] .....................
ND BixNum[1] .....................
ND BixNum[0] .....................
Bracket Stream ....................
Nesting Depth 00000000000000000000
ND BixNum[2] ....................
ND BixNum[1] ....................
ND BixNum[0] ....................
```
Assume that `valueToken` is a bit stream that marks the end position of
any legal JSON numeral, string or keyword, then the example above would look like:
```
valueToken ...................1.
EOFbit ....................1
valueToken ...................1
```
Then we can validate if we have valid non-nesting values by checking:
```
otherND = bnc.UGT(ND, 0)
mix = otherND | valueToken // if only one bit is set, then we don't have other ND
begin = ~Advance(<1>, 1)
firstValue = ScanTo(begin, mix)
nonNestingValue = AdvanceThenScanThru(firstValue, ws) & EOFbit
err = EOFBit ^ nonNestingValue
firstValue = ScanTo(begin, valueToken)
nonNestingValue = ScanTo(Advance(firstValue, 1), valueToken)
errSimpleValue = nonNestingValue & ~otherND
```
......
Clone repository
  • Bracket Matching
  • CSV Validation
  • CSVediting
  • CSVparsing
  • Character Code Compilers
  • KernelLibrary
  • Pablo
  • ParabixTransform
  • Parallel Deletion
  • Parallel Hashing
  • Performance Testing Script
  • Shuffle Pattern Library
  • StaticCCC
  • String Insertion
  • UCD: Unicode Property Database and Compilers
View All Pages