initial commit

This commit is contained in:
boyreau 2026-11-04 18:00:08 +01:00
commit 549fbc6b74
31 changed files with 3377 additions and 0 deletions

View file

@ -0,0 +1,47 @@
/**
* @file push_counter.h
* @brief Push_Counter: a visitor that counts Push mnemonics.
*/
#ifndef PUSH_COUNTER_H
#define PUSH_COUNTER_H
#include <stddef.h>
#include "visitor.h"
/**
* @brief Forward declaration of non-derivable class Push_Counter.
*
*/
typedef struct _push_counter_t push_counter_t;
/**
* @brief Push_Counter vtable is identical to Visitor vtable (no new methods).
*
*/
typedef visitor_vtable_t push_counter_vtable_t;
/**
* @brief Constructs a Push_Counter with count initialized to 0.
*
* @return A newly allocated Push_Counter.
*/
push_counter_t* push_counter_build_default(void);
/**
* @brief Destroys a Push_Counter.
*
* @param self The Push_Counter (can be NULL).
*/
void push_counter_destroy(push_counter_t *self);
/**
* @brief Returns the number of Push mnemonics visited.
*
* @param self The Push_Counter.
* @pre self != NULL.
* @return The count of Push mnemonics.
*/
size_t push_counter_count(const push_counter_t *const self);
#endif /* PUSH_COUNTER_H */