XCache is a fast, stable PHP opcode cacher that has been proven and is now running on production servers under high load. https://xcache.lighttpd.net/
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.

38 lines
555 B

  1. #! /usr/bin/awk -f
  2. # vim:ts=4:sw=4
  3. # process eaccelerator/opcodes.c
  4. BEGIN {
  5. FS=" "
  6. max = 0;
  7. started = 0
  8. }
  9. /OPDEF/ {
  10. if (started) {
  11. sub(/".*"/, "")
  12. if (!match($0, /EXT_([^ |]+).*OP[1S]_([^ |]+).*OP2_([^ |]+).*RES_([^ |)]+).*/, array)) {
  13. print "error" $0
  14. exit
  15. }
  16. printf "\tOPSPEC(%10s, %10s, %10s, %10s)\n", array[1], array[2], array[3], array[4]
  17. next
  18. }
  19. }
  20. /^}/ {
  21. print $0
  22. exit;
  23. }
  24. /^[ ]*,[ ]*$/ {
  25. next
  26. }
  27. {
  28. if (started) {
  29. print $0
  30. next
  31. }
  32. }
  33. /^static/ {
  34. started = 1;
  35. print "static const xc_opcode_spec_t xc_opcode_spec[] = {"
  36. }