PicoLisp implementation of the BOAWP specification https://boawp.org
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.
 
 
 

28 lines
774 B

#!/usr/bin/env pil
#
# Generate Markdown tables for documentation
(load "protocols.l")
(de gen-table (Lst)
(prinl "| Name | Decimal | Hex | UTF-8 | BOAWP Version |")
(prinl "| :---- | :----: | :----: | :----: | :----: |")
(mapcar '((S)
(prin "| " (cdr S) " | " (car S) " | 0x" (pad 2 (hex (car S))) " | ")
(print (char (car S)))
(prinl " | " 0 " |") )
Lst ) )
(mapcar '((N) (gen-table N) (prinl))
(list
*BOAWP_default_commands
*BOAWP_http_commands
*BOAWP_stomp_commands
*BOAWP_gemini_commands
*BOAWP_default_header_names
*BOAWP_http_header_names
*BOAWP_stomp_header_names
*BOAWP_gemini_header_names ) )
(bye)