You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case, even though we check that abc must exist in symbol table while parsing condition of def, we forget this link and there is no way to get directly from abc in def condition to Rule instance of abc rule without looking up all rules in YARA file.
This ticket aims for improving the internal representation in such a way, that we'll keep these links and so it will be much easier to reach other parts of YARA file without doing whole file lookups.
Use-case:
I would like to rename rule and all links to it. So then if I do
These changes relate mostly to link between rules but I would also like to have something similar for strings.
Technical details:
It can be easier for rules since it can be solved just by some pointer to symbol table and renaming a rule would rename the record in symbol table (thus effectively renaming it everywhere else with zero cost) but it can be harder for strings since they are stored in trie-like structure for better lookup with string prefix. But that can possibly be solved by storing a pointer directly to the string itself which shouldn't change even if we move the string in trie to somewhere else.
The text was updated successfully, but these errors were encountered:
…n (issue #73) (#96)
* Add TokenType and ExpressionType and put in separate files to allow import of symbol.h from literal.h
* Solve #73 for rule names - renaming rule also renames all references to it
* Each string reference was just string, now it is linked to string definition so renaming will be easier.
* Remove ParserMode::Incomplete to be part of anothoer PR
* Cleanup: Remove some asserts and printouts
Co-authored-by: Tadeáš Kučera <tadeas.kucera@avast.com>
Right now, the internal representation many times forgets link between individual construct in individual representation. One such example is this one
In this case, even though we check that
abc
must exist in symbol table while parsing condition ofdef
, we forget this link and there is no way to get directly fromabc
indef
condition toRule
instance ofabc
rule without looking up all rules in YARA file.This ticket aims for improving the internal representation in such a way, that we'll keep these links and so it will be much easier to reach other parts of YARA file without doing whole file lookups.
Use-case:
I would like to rename rule and all links to it. So then if I do
then I would expect output to be
and not
These changes relate mostly to link between rules but I would also like to have something similar for strings.
Technical details:
It can be easier for rules since it can be solved just by some pointer to symbol table and renaming a rule would rename the record in symbol table (thus effectively renaming it everywhere else with zero cost) but it can be harder for strings since they are stored in trie-like structure for better lookup with string prefix. But that can possibly be solved by storing a pointer directly to the string itself which shouldn't change even if we move the string in trie to somewhere else.
The text was updated successfully, but these errors were encountered: