- Apr 03, 2024
-
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
Clear the buffer after reading.
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
Rulevalidation is now done by the Rule.
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
The allocated memory wasn't freed in case of an error. Also the wrong constant has been used, which happens to be the same.
-
Jonathan Schöbel authored
-
- Apr 02, 2024
-
-
Jonathan Schöbel authored
Note, that raw_get_rule won't be implemented yet, because an allocated Rule, which contains observer pointers has to be returned, which is difficult to annotate.
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
As most of the code, is now already abstracted by the Rule, the separate static method isn't worth it any more.
-
Jonathan Schöbel authored
The caller now has to first construct a Rule object, which can then be passed to a Grammar. If raw_add or raw_set is used, the given Rule is cleared, so that it can be reused by the caller and a call to GR_Rule_free doesn't result in double free and data corruption, but sole free(rule) is still sufficient.
-
Jonathan Schöbel authored
This allows to reuse a rule, after it has been added to a grammar.
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
Make the functions actually static.
-
Jonathan Schöbel authored
This function checks, whether a given rule forms a valid rule using the symbols defined by a grammar.
-
Jonathan Schöbel authored
Obviously, this should be const.
-
Jonathan Schöbel authored
This method moves the internal data from one rule to another. The dest is deemed uninitialized before, src has to be assumed uninitialized after. Violating the latter will result in a double free or data corruption. If src should be afterwards Rule_init has to be called. If dest was used beforehand, Rule_free has to be called.
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
The logging implementation was copied from another project. It just prints to stderr and isn't configurable. A macro from the "GNU Autoconf Archive" is used to add printf-like-function annotations.
-
Jonathan Schöbel authored
This will be useful for using some Autoconf macros.
-
Jonathan Schöbel authored
This is useful to incorporate a rule without overhead.
-
Jonathan Schöbel authored
This is just the same implementation as for the source symbols.
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
It is easy to mess up with realloc. That's why this should definitely be tested.
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
-
- Apr 01, 2024
-
-
Jonathan Schöbel authored
This allows the sentinel to be used as return value.
-
Jonathan Schöbel authored
This reduces unnecessary checks, when the index is hardcoded.
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
-
- Mar 31, 2024
-
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
This will provide methods to manipulate a rule. It is separated from a grammar in order to simplify it. Essentially it is just a wrapper for two arrays.
-
- Mar 23, 2024
-
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
-