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 06, 2022 by lperesde's avatar lperesde
Show whitespace changes
Inline Side-by-side
Showing with 34 additions and 0 deletions
+34 -0
  • Bracket-Matching.md Bracket-Matching.md +34 -0
  • No files found.
Bracket-Matching.md
View page @ 04895965
...@@ -81,3 +81,37 @@ after any value or Comma. ...@@ -81,3 +81,37 @@ after any value or Comma.
// After the LBrak we must have either a value or an RBrak. // After the LBrak we must have either a value or an RBrak.
errAfterLBrak = ScanTo(Advance(arrayStart, 1), anyToken) & ~ (nested | valueToken | RBrak) errAfterLBrak = ScanTo(Advance(arrayStart, 1), anyToken) & ~ (nested | valueToken | RBrak)
``` ```
# CFG Kernel (_note: this doc isn't ready_)
The CFG kernel is a Parabix kernel (to be implemented) that can compute a context-free grammars given a set of rules with its own syntax (close to EBNF), a BixNum representing the nesting depth of its tokens (see NestingDepth kernel), and a StreamSet representing all valid markers.
```C++
enum Token {
lCurly,
rCurly,
lBracket,
rBracket,
colon,
str,
value
};
// TODO: This is just an initial idea and it wouldn't work. Need to improve that.
CFGRule * valueRule = CGF::match(Token::value)
CFGRule * arrRule = CFG::matchBracket(
Token::lBracket,
{ Token::value },
Token::rBracket
);
CFGRule * objRule = CFG::matchBracket(
Token::lCurly,
{ Token::str, Token::colon, Token::value },
Token::rCurly
);
Nesting Depth 00011122211222233443332221111000
ND BixNum[2] .................11.............
ND BixNum[1] ......111..111111..111111.......
ND BixNum[0] ...111...11....11..111...1111...
```
\ No newline at end of file
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