Source code of Windows XP (NT5)
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.

51 lines
721 B

  1. `del definitions`;
  2. `del rules`;
  3. `del usercode`;
  4. `del parser.ll`;
  5. while (<>)
  6. {
  7. if($ARGV ne $oldargv)
  8. {
  9. open STDOUT, ">>definitions";
  10. $lineNumber = 1;
  11. printf("#line %d \"%s\"\n", $lineNumber, $ARGV);
  12. $oldargv = $ARGV;
  13. $section = 0;
  14. }
  15. }
  16. continue{
  17. $lineNumber++;
  18. /\%\%/;
  19. if ($&)
  20. {
  21. $section++;
  22. close STDOUT;
  23. if($section eq 1)
  24. {
  25. open STDOUT, ">>rules";
  26. }
  27. if($section eq 2)
  28. {
  29. open STDOUT, ">>usercode";
  30. }
  31. printf("#line %d \"%s\"\n", $lineNumber, $ARGV);
  32. }
  33. else
  34. {
  35. print;
  36. }
  37. }
  38. close STDOUT;
  39. `type definitions >parser.ll`;
  40. `echo %% >>parser.ll` ;
  41. `type rules >>parser.ll`;
  42. `echo %% >>parser.ll`;
  43. `type usercode >>parser.ll`;
  44. `del definitions`;
  45. `del rules`;
  46. `del usercode`;