You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

lpcode.h 745B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. ** $Id: lpcode.h $
  3. */
  4. #if !defined(lpcode_h)
  5. #define lpcode_h
  6. #include "lua.h"
  7. #include "lptypes.h"
  8. #include "lptree.h"
  9. #include "lpvm.h"
  10. int tocharset (TTree *tree, Charset *cs);
  11. int checkaux (TTree *tree, int pred);
  12. int fixedlen (TTree *tree);
  13. int hascaptures (TTree *tree);
  14. int lp_gc (lua_State *L);
  15. Instruction *compile (lua_State *L, Pattern *p);
  16. void realloccode (lua_State *L, Pattern *p, int nsize);
  17. int sizei (const Instruction *i);
  18. #define PEnullable 0
  19. #define PEnofail 1
  20. /*
  21. ** nofail(t) implies that 't' cannot fail with any input
  22. */
  23. #define nofail(t) checkaux(t, PEnofail)
  24. /*
  25. ** (not nullable(t)) implies 't' cannot match without consuming
  26. ** something
  27. */
  28. #define nullable(t) checkaux(t, PEnullable)
  29. #endif