summaryrefslogtreecommitdiff
BranchCommit messageAuthorAge
mainsrc/paca.mjs: Improve implementation of interpretMetacharactersEuAndreh7 months
 
 
AgeCommit messageAuthorFilesLines
2025-08-01src/paca.mjs: Improve implementation of interpretMetacharactersHEADmainEuAndreh2-41/+220
2025-07-31Makefile: Install like a Node.js packageEuAndreh2-6/+10
2025-07-20tests/paca.mjs: Add WIP testsEuAndreh1-0/+9
2025-07-20src/paca.mjs: Rename buildDFA -> toDFAEuAndreh2-22/+25
2025-07-20src/paca.mjs: Support returning multiple options from `performTransition()`EuAndreh1-5/+6
2025-07-20Add initial support for caret and dollar metacharactersEuAndreh2-22/+200
2025-07-17.gitignore: Remove trailing slash from node_modules ruleEuAndreh1-1/+1
2025-07-17src/paca.mjs: Rename {start,end}ID => {start,end}EuAndreh1-44/+42
2025-07-17Do away with the "nextID" attribute•••Instead of being an increment over "end" that is carried along on NFA transformation, now the id is computed directly as an increment on "end". During this refactor, I even saw that "end" and "nextID" of `concat()` are computed differently, despite arriving at the same result: "end" is rhs.end, while "nextID" is the max of the nextID from lhs and rhs. EuAndreh2-53/+10
2025-07-16Support searching in the NFA using the metacharacters.•••* src/paca.mjs (searchNFAStep): Now instead of just checking if the node has a transition via a character literal directly, we also check (via the `performTransition()` function) if a metacharacter interpretation allows a transition to happen. (intepretMetacharacter): Add function that "executes" the action representation in the "meta" attribute of the object, when present. It is somewhat ad-hoc now, doing checks that implicitly only exist for "." or "class" metacharacters, but OK for now, given the possibilities. (performTransition): Do the fallback to `interpretMetacharacter()`, giving it an empty object when the node doesn't have the "meta" attribute. * tests/paca.mjs (test_{interpretMetacharacter,performTransition): Add routine test implementation. EuAndreh2-1/+123
[...]