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.
 
 
 
 
 
 

47 lines
745 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. name = "";
  12. if (match($0, /"([^"]+)"/, m)) {
  13. name = m[1];
  14. }
  15. sub(/"[^"]*"/, "");
  16. if (!match($0, /EXT_([^ |]+).*OP[1S]_([^ |]+).*OP2_([^ |]+).*RES_([^ |)]+).*/, array)) {
  17. print "error" $0
  18. exit
  19. }
  20. id = "";
  21. if (match($0, /\/\* *([0-9]+) *\*\//, comments)) {
  22. id = comments[1];
  23. }
  24. printf "\tOPSPEC(%10s, %10s, %10s, %10s) /* %s %-30s */\n", array[1], array[2], array[3], array[4], id, name;
  25. next
  26. }
  27. }
  28. /^}/ {
  29. print $0
  30. exit;
  31. }
  32. /^[ ]*,[ ]*$/ {
  33. next
  34. }
  35. {
  36. if (started) {
  37. print $0
  38. next
  39. }
  40. }
  41. /^static/ {
  42. started = 1;
  43. print "static const xc_opcode_spec_t xc_opcode_spec[] = {"
  44. }