-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixing parsing tree bug and using lark standalone
Signed-off-by: Aryan Roy <[email protected]>
- Loading branch information
1 parent
37702f2
commit 2f34a9b
Showing
10 changed files
with
6,597 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
""" | ||
Copyright (c) 2023 Aryan Roy. All rights reserved. | ||
formulate: Easy conversions between different styles of expressions | ||
""" | ||
|
||
from . import matching_tree | ||
from . import numexpr_parser | ||
from . import ttreeformula_parser | ||
|
||
def convert_ptree(raw_ptree): | ||
|
||
if isinstance(raw_ptree, numexpr_parser.Token) or isinstance(raw_ptree, ttreeformula_parser.Token): | ||
return | ||
|
||
raw_ptree.__class__ = matching_tree.ptnode | ||
|
||
for x in raw_ptree.children: | ||
convert_ptree(x) | ||
|
||
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.