axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Vim syntax file


From: Tim Daly
Subject: Re: [Axiom-developer] Vim syntax file
Date: Tue, 12 Nov 2013 12:38:28 -0500

Fabio,

>1) Are curly brackets ever used in axiom syntax? 
>It seems to me they are not and they have no meaning in axiom: if it is 
>so, I can remove them from sanity check, simplifying things.

I don't believe they have any meaning.

>2) If I give the command (for example)
>)tangle bookvol10.2
>then the result is an empty input file. 

The tangle command is optimized for files in src/input by default.
It defaults to a chunk name of "*", meaning the default chunk name.
To use a file such as algaggr.input.pamphlet in src/input, do

axiom -nox
)tangle algaggr
  (creates algaggr.input from algaggr.input.pamphlet)

)read algaggr
  (runs the algaggr.input file and exits because of the )lisp (bye) )

axiom -nox
)regress algaggr
  (reads algaggr.output and looks for failing test cases)


The ')tangle' command line is implemented by the tangle function
(see books/tangle.lisp)




For more complex files such as books/bookvol10.3.pamphlet you can 
extract particular named chunks. For instance, if you want to extract

the test cases for domain "Any":
)lisp (tangle "bookvol10.3.pamphlet" "Any.input" "Any.output")

the help file for domain "Any":
)lisp (tangle "bookvol10.3.pamphlet" "Any.help" "Any.help")

the spad source for domain "Any":
)lisp (tangle "bookvol10.3.pamphlet" "domain ANY Any" "Any.spad")

In general, the arguments are 
)lisp (tangle "the filename" "the chunk name" "the output file")

There is no reason why the )tangle command isn't more complex 
except that I haven't had a use case for it yet.




Also, the tangle function in books/tangle.lisp is not specific to
Axiom. It can be used in any literate programming context.

I'd encourage you to consider writing your vim file as a literate
program since you're the one who understands it best. Other people
will have to reverse engineer it to understand it.

Tim






reply via email to

[Prev in Thread] Current Thread [Next in Thread]