test files for newlisp source parser?

Started by cormullion, October 03, 2008, 08:38:19 AM

Previous topic - Next topic

cormullion

I'm working on a source code parser, and I'm wondering whether there's such a thing as an official - or unofficial -  test file that contains every possible syntax, such that you could run it to see whether everything has been parsed properly? For example, numbers in various formats, strings in various guises, and so on...



Also, what happens when newLISP sees [CMD] [/CMD] in a source file?  I know what happens when you're working at a terminal, but what about non-interactively?

xytroxon

#1
Quote from: "cormullion"I'm working on a source code parser, and I'm wondering whether there's such a thing as an official - or unofficial -  test file that contains every possible syntax, such that you could run it to see whether everything has been parsed properly? For example, numbers in various formats, strings in various guises, and so on...


Use the source Luke er. cormullion ;)



In the source code distribution, Lutz has a series of "qa" files.

http://newlisp.nfshost.com/downloads/development/newlisp-9.9.5.tgz">//http://newlisp.nfshost.com/downloads/development/newlisp-9.9.5.tgz



(Note; Most of these files have NO .lsp extension)



The two main files are:

qa-dot -> run tests for countries that use decimal point numbers

qa-comma -> run tests for countries that use commas in numbers



And there are aeveral other files for machine specific, or more in-depth tests.



qa-cilk

qa-dictionary

qa-lfs

qa-local-domain

qa-net

qa-ref

qa-setsig

qa-utf16path.lsp

qa-utf8

qa-xml



-- xytroxon
\"Many computers can print only capital letters, so we shall not use lowercase letters.\"

-- Let\'s Talk Lisp (c) 1976

cormullion

#2
that's a good idea - thanks. I've never looked at the source...