algol68 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #------------------------------------------------------------------------------
  2. # $File: algol68,v 1.4 2021/08/15 06:00:55 christos Exp $
  3. # algol68: file(1) magic for Algol 68 source
  4. #
  5. # URL: https://en.wikipedia.org/wiki/ALGOL_68
  6. # Reference: http://www.softwarepreservation.org/projects/ALGOL/report/Algol68_revised_report-AB.pdf
  7. # Update: Joerg Jenderek
  8. 0 search/8192 (input,
  9. >0 use algol_68
  10. # graph_2d.a68
  11. 0 regex/4006 \^PROC
  12. #>&-4 string x \b, dBase or Algol "%s"
  13. # most xBase scripts *.prg with PROCEDURE like: Areacode BarCount Def_mens Vendors
  14. #>&-4 string =PROCEDURE \b, dBase PROCEDURE
  15. # skip xBase program scripts *.prg with PROCEDURE keyword
  16. # keyword proc probably followed by white space used to specify algol procedures
  17. >&-4 string !PROCEDURE
  18. >>0 use algol_68
  19. 0 regex/1024 \bMODE[\t\ ]
  20. >0 use algol_68
  21. 0 regex/1024 \bMODE[\t\ ]
  22. >0 use algol_68
  23. 0 regex/1024 \bREF[\t\ ]
  24. >0 use algol_68
  25. 0 regex/1024 \bFLEX[\t\ ]\*\\[
  26. >0 use algol_68
  27. # display information like mime type and file name extension of Algol 68 source text
  28. 0 name algol_68 Algol 68 source text
  29. !:mime text/x-Algol68
  30. # https://file-extension.net/seeker/file_extension_a68
  31. !:ext a68
  32. #!:ext a68/alg
  33. #0 regex [\t\ ]OD Algol 68 source text
  34. #>0 use algol_68
  35. #!:mime text/x-Algol68
  36. #0 regex [\t\ ]FI Algol 68 source text
  37. #>0 use algol_68
  38. #!:mime text/x-Algol68