newLISP Fan Club

Forum => newLISP newS => Topic started by: cormullion on October 03, 2008, 08:38:19 AM

Title: test files for newlisp source parser?
Post by: cormullion on October 03, 2008, 08:38:19 AM
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?
Title: Re: test files for newlisp source parser?
Post by: xytroxon on October 03, 2008, 09:40:39 AM
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



(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
Title:
Post by: cormullion on October 03, 2008, 01:39:08 PM
that's a good idea - thanks. I've never looked at the source...