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

Support custom rewrite rule sets as input #26

Merged
merged 27 commits into from
Jan 25, 2024
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b4ca57e
Sketch user-defined rule set YAML
fizruk Jan 11, 2024
1de94a0
WIP Parse and sketch conversion for user-defined rule sets
fizruk Jan 11, 2024
694e52f
Update yegor.yaml rule set
fizruk Jan 11, 2024
3f2e27d
WIP matchObject implementation
fizruk Jan 15, 2024
e8156e5
feat: use the meta syntax as the main syntax
deemp Jan 16, 2024
4f98133
refactor: remove old files
deemp Jan 16, 2024
5ca1c7b
refactor: run bnfc
deemp Jan 16, 2024
d0c354f
refactor: generate a single parser
deemp Jan 16, 2024
d91e9ac
refactor: remove generated rules syntax files
deemp Jan 16, 2024
eccf0b9
refactor: use only meta syntax
deemp Jan 16, 2024
e003d2f
refactor: simplify code
deemp Jan 16, 2024
f4c4b11
refactor: pattern match Meta-things
deemp Jan 16, 2024
54ac539
refactor: support unit tests for custom rules
deemp Jan 16, 2024
97a8c7f
refactor: add unit tests for the rule 6
deemp Jan 16, 2024
e6ab161
fix: pre-defined rules tests
deemp Jan 16, 2024
1481ad7
feat: run user-defined tests
deemp Jan 16, 2024
cf6d2b9
chore: update the cabal file
deemp Jan 16, 2024
2a7f2f1
Fix matching
fizruk Jan 18, 2024
2f618bf
feat: add CLI
deemp Jan 18, 2024
1481558
Merge pull request #47 from objectionary/custom-rules-single-syntax
fizruk Jan 23, 2024
fd37bd1
Support --chain option, sketch more rules in yegor.yaml
fizruk Jan 23, 2024
cab3d70
Apply formatting
fizruk Jan 25, 2024
db87625
feat: enable ImportQualifiedPost
deemp Jan 25, 2024
5309a64
Apply formatting to Test.EO.Phi
fizruk Jan 25, 2024
f8c36a5
Add missing key in test
aabounegm Jan 25, 2024
5602f56
Specify Haskell extension as formatter for Haskell
aabounegm Jan 25, 2024
5c4a8a1
Move reading source to case when yaml is provided
aabounegm Jan 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: add unit tests for the rule 6
Co-authored-by: Abdelrahman Abounegm <[email protected]>
  • Loading branch information
deemp and aabounegm committed Jan 16, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 97a8c7ffb6bf2472bee1e424a086a3c3fe26eb18
15 changes: 12 additions & 3 deletions eo-phi-normalizer/test/eo/phi/rules/yegor.yaml
Original file line number Diff line number Diff line change
@@ -3,8 +3,17 @@ rules:
- name: Rule 6
description: "Accessing an α-binding"
pattern: |
?a ↦ ?n, ?B ⟧.?a
!a ↦ !n, !B ⟧.!a
result: |
?n(ρ ↦ ⟦ ?B ⟧)
!n(ρ ↦ ⟦ !B ⟧)
when:
- nf: [ "?n" ]
- nf: [ "!n" ]
tests:
- name: Should match
input: ⟦ hello ↦ ⟦⟧ ⟧.hello
output: ⟦⟧(ρ ↦ ⟦⟧)
matches: true
- name: Shouldn't match
input: ⟦ ⟧.hello
output: ''
matches: false