clinton/parenscript.git
15 years agoCorrected the definition of ps:length.
Travis Cross [Sun, 17 Aug 2008 09:56:55 +0000 (09:56 +0000)]
Corrected the definition of ps:length.

Thanks to Daniel Gackle for pointing out the problem and the most
obvious solution.

15 years agoAdded a test for correct output of the JS:in operator.
Travis Cross [Mon, 12 May 2008 08:26:03 +0000 (08:26 +0000)]
Added a test for correct output of the JS:in operator.

15 years agoOutput JS operators in lowercase.
Travis Cross [Mon, 12 May 2008 08:25:26 +0000 (08:25 +0000)]
Output JS operators in lowercase.

16 years agoUpdated so as to ps-intern fewer extraneous symbols.
Travis Cross [Sat, 5 Apr 2008 09:16:56 +0000 (09:16 +0000)]
Updated so as to ps-intern fewer extraneous symbols.

16 years agoDeprecated define-script-symbol-macro since it was part of the public interface.
Travis Cross [Sat, 5 Apr 2008 08:59:22 +0000 (08:59 +0000)]
Deprecated define-script-symbol-macro since it was part of the public interface.

16 years agoUpdated the define-script-symbol-macro export to define-ps-symbol-macro.
Travis Cross [Sat, 5 Apr 2008 08:51:55 +0000 (08:51 +0000)]
Updated the define-script-symbol-macro export to define-ps-symbol-macro.

16 years agoReorganized the package exports.
Travis Cross [Sat, 5 Apr 2008 08:48:42 +0000 (08:48 +0000)]
Reorganized the package exports.

16 years agoCorrected parameter docstring.
Travis Cross [Sat, 5 Apr 2008 08:39:27 +0000 (08:39 +0000)]
Corrected parameter docstring.

16 years agoMoved the definition of ps-convert-op-name since we compile compile.lisp before print...
Travis Cross [Sat, 5 Apr 2008 08:16:59 +0000 (08:16 +0000)]
Moved the definition of ps-convert-op-name since we compile compile.lisp before printer.lisp.

16 years agoAdded some symbol mangling fixes.
Travis Cross [Sat, 5 Apr 2008 08:15:11 +0000 (08:15 +0000)]
Added some symbol mangling fixes.

16 years agoFixed one remaining define-script-symbol-macro.
Travis Cross [Sat, 5 Apr 2008 07:19:13 +0000 (07:19 +0000)]
Fixed one remaining define-script-symbol-macro.

16 years agoIntroduced ps-symbols and removed use of :parenscript-special-forms package.
Travis Cross [Sat, 5 Apr 2008 07:07:37 +0000 (07:07 +0000)]
Introduced ps-symbols and removed use of :parenscript-special-forms package.

The idea here is to stop abusing the CL package system while still
allowing the user control of the PS environment.

16 years agoWhitespace fix.
Travis Cross [Sat, 5 Apr 2008 06:38:39 +0000 (06:38 +0000)]
Whitespace fix.

16 years agoChanged script-* to ps-* across the board for consistency.
Travis Cross [Sat, 5 Apr 2008 06:36:29 +0000 (06:36 +0000)]
Changed script-* to ps-* across the board for consistency.

16 years agoQuoted parens in a docstring to make Emacs happy.
Travis Cross [Sat, 5 Apr 2008 05:43:00 +0000 (05:43 +0000)]
Quoted parens in a docstring to make Emacs happy.

16 years agoIntern all special form symbols in the :parenscript-special-forms package.
Travis Cross [Tue, 1 Apr 2008 15:30:22 +0000 (15:30 +0000)]
Intern all special form symbols in the :parenscript-special-forms package.

16 years agoExported PI.
Travis Cross [Tue, 1 Apr 2008 08:37:39 +0000 (08:37 +0000)]
Exported PI.

16 years agoExported hyperbolic trig symbols.
Travis Cross [Tue, 1 Apr 2008 08:36:41 +0000 (08:36 +0000)]
Exported hyperbolic trig symbols.

16 years agoRearranged math-related exports.
Travis Cross [Tue, 1 Apr 2008 08:35:57 +0000 (08:35 +0000)]
Rearranged math-related exports.

16 years agoAdded handling for PI.
Travis Cross [Tue, 1 Apr 2008 08:30:07 +0000 (08:30 +0000)]
Added handling for PI.

16 years agoRelocated the definitions for the 1+ and 1- psmacros with the other math functions.
Travis Cross [Tue, 1 Apr 2008 08:18:01 +0000 (08:18 +0000)]
Relocated the definitions for the 1+ and 1- psmacros with the other math functions.

16 years agoImplemented equivalents for the CL hyperbolic trigometric functions.
Travis Cross [Tue, 1 Apr 2008 08:13:07 +0000 (08:13 +0000)]
Implemented equivalents for the CL hyperbolic trigometric functions.

16 years agoAdded PS-ONCE-ONLY macro building helper.
Travis Cross [Tue, 1 Apr 2008 07:59:04 +0000 (07:59 +0000)]
Added PS-ONCE-ONLY macro building helper.

16 years agoRearranged math psmacros to match the order that the corresponding functions appear...
Travis Cross [Mon, 31 Mar 2008 23:03:58 +0000 (23:03 +0000)]
Rearranged math psmacros to match the order that the corresponding functions appear in the HyperSpec.

16 years agoAdded support for SQRT function.
Travis Cross [Mon, 31 Mar 2008 22:48:10 +0000 (22:48 +0000)]
Added support for SQRT function.

16 years agoAdded support for LOG function.
Travis Cross [Mon, 31 Mar 2008 22:46:13 +0000 (22:46 +0000)]
Added support for LOG function.

Thanks to: Daniel Gackle <danielgackle@gmail.com>

16 years agoUpdated atan to support two arguments as in CL.
Travis Cross [Mon, 31 Mar 2008 22:43:45 +0000 (22:43 +0000)]
Updated atan to support two arguments as in CL.

ATAN with two arguments translates into atan2 in JS.

16 years agoAdded a couple of test cases for object literals.
Travis Cross [Mon, 31 Mar 2008 22:08:55 +0000 (22:08 +0000)]
Added a couple of test cases for object literals.

16 years agoUpdated the blank-object-literal test for the now correct behavior.
Travis Cross [Mon, 31 Mar 2008 22:02:31 +0000 (22:02 +0000)]
Updated the blank-object-literal test for the now correct behavior.

16 years agoAdded {} to *ps-literals*.
Travis Cross [Mon, 31 Mar 2008 22:02:00 +0000 (22:02 +0000)]
Added {} to *ps-literals*.

Using {} as a literal to create an empty object literal was only
working by accident previously.  When not in the function position, {}
was being compiled as a JS variable rather than an object-literal,
which just happened to work sometimes.  In concert with correctly
checking symbols that aren't in the parenscript package, this should
provide for more reliable behavior.

16 years agoUpdated ps-literal-p to correctly identify literal symbols without regard to the...
Travis Cross [Mon, 31 Mar 2008 21:51:58 +0000 (21:51 +0000)]
Updated ps-literal-p to correctly identify literal symbols without regard to the symbol's package.

16 years agoSilence an unused variable warning.
Travis Cross [Mon, 31 Mar 2008 21:27:33 +0000 (21:27 +0000)]
Silence an unused variable warning.

16 years agoUpdated ps-special-form-p to correctly identify a special form even if the symbol...
Travis Cross [Mon, 31 Mar 2008 02:13:23 +0000 (02:13 +0000)]
Updated ps-special-form-p to correctly identify a special form even if the symbol identifying the special form is in the wrong package.

16 years agoCleaned up and standardized indentation of JS code in the reference documentation.
Travis Cross [Sun, 30 Mar 2008 23:39:49 +0000 (23:39 +0000)]
Cleaned up and standardized indentation of JS code in the reference documentation.

16 years agoAdded myself to the list of contributors.
Travis Cross [Sun, 30 Mar 2008 22:53:08 +0000 (22:53 +0000)]
Added myself to the list of contributors.

16 years agoAdded a mechanism for expanding parenscript forms in a clean environment.
Travis Cross [Sun, 30 Mar 2008 22:51:16 +0000 (22:51 +0000)]
Added a mechanism for expanding parenscript forms in a clean environment.

16 years agoRemoved deprecated exports that are no longer implemented.
Travis Cross [Sun, 30 Mar 2008 22:38:31 +0000 (22:38 +0000)]
Removed deprecated exports that are no longer implemented.

16 years agoCleaned up and rearranged the package exports a bit.
Travis Cross [Sun, 30 Mar 2008 22:35:50 +0000 (22:35 +0000)]
Cleaned up and rearranged the package exports a bit.

16 years agoUpdated the documentation and test cases.
Travis Cross [Sun, 30 Mar 2008 22:28:56 +0000 (22:28 +0000)]
Updated the documentation and test cases.

16 years agoSome minor comment and whitespace cleanup.
Travis Cross [Sun, 30 Mar 2008 20:11:34 +0000 (20:11 +0000)]
Some minor comment and whitespace cleanup.

16 years agoWhitespaceification: removed indentation tabs throughout project.
Travis Cross [Sun, 30 Mar 2008 19:57:12 +0000 (19:57 +0000)]
Whitespaceification: removed indentation tabs throughout project.

...and replaced each tab with 8 spaces.  Tab indentation had
previously been used inconsistently and was dominated by space-based
indentation.

In the future, disable indent-tabs-mode in emacs!

(setq indent-tabs-mode nil)

16 years agoImproved, extended, and refactored iteration special forms.
Travis Cross [Sun, 30 Mar 2008 19:35:12 +0000 (19:35 +0000)]
Improved, extended, and refactored iteration special forms.

 * Added support for DO*.

 * DO now does parallel assignment.

 * DO/DO* now correctly support init-forms such as:

     (do (a (b) (c 1) (d 1 (1+ d))) ...)

 * DO/DO*/DOTIMES/DOLIST/DOEACH now support return values via a lambda
   transform.

 * DOEACH now supports implicit key/value destructuring, e.g.:

     (doeach ((key val) arr res) ...)

 * Added labeled-for to facilitate creating labeled for loops.

 * Restructured low level printer operators to better match the
   underlying JS.

16 years agoUpdated let1-dynamic to clean up its temporary stack variable after use.
Travis Cross [Sun, 30 Mar 2008 02:33:34 +0000 (02:33 +0000)]
Updated let1-dynamic to clean up its temporary stack variable after use.

16 years agoAdded setq and psetq.
Travis Cross [Sun, 30 Mar 2008 02:27:55 +0000 (02:27 +0000)]
Added setq and psetq.

16 years agoAdded psetf.
Travis Cross [Sun, 30 Mar 2008 02:25:53 +0000 (02:25 +0000)]
Added psetf.

16 years agoAliased let to simple-let.
Travis Cross [Sun, 30 Mar 2008 02:23:16 +0000 (02:23 +0000)]
Aliased let to simple-let.

16 years agoAdded simple-let, which does parallel binding without a lambda.
Travis Cross [Sun, 30 Mar 2008 02:22:18 +0000 (02:22 +0000)]
Added simple-let, which does parallel binding without a lambda.

16 years agoAdded simple-let* and aliased let* to it.
Travis Cross [Sun, 30 Mar 2008 02:14:00 +0000 (02:14 +0000)]
Added simple-let* and aliased let* to it.

16 years agoAdded lexical-let.
Travis Cross [Sun, 30 Mar 2008 02:08:29 +0000 (02:08 +0000)]
Added lexical-let.

16 years agoGreatly simplified implementation of lexical-let*.
Travis Cross [Sun, 30 Mar 2008 02:05:25 +0000 (02:05 +0000)]
Greatly simplified implementation of lexical-let*.

16 years agoAdded support for breaking and continuing to arbitrary labels.
Travis Cross [Sun, 30 Mar 2008 01:46:18 +0000 (01:46 +0000)]
Added support for breaking and continuing to arbitrary labels.

16 years agoWhitespace standardization in src/package.lisp.
Travis Cross [Tue, 26 Feb 2008 23:09:02 +0000 (23:09 +0000)]
Whitespace standardization in src/package.lisp.

16 years agoCorrected spelling error.
Travis Cross [Tue, 26 Feb 2008 22:59:53 +0000 (22:59 +0000)]
Corrected spelling error.

16 years agoAdded #\= to *special-chars*.
Vladimir Sedach [Fri, 1 Feb 2008 15:30:49 +0000 (15:30 +0000)]
Added #\= to *special-chars*.

Now you can write boolean= function names.

As requested by Daniel Gackle.

16 years agoFixed bug where (setf x (- x 1 2)) yielded x -= 1 - 2.
Vladimir Sedach [Fri, 1 Feb 2008 06:25:58 +0000 (06:25 +0000)]
Fixed bug where (setf x (- x 1 2)) yielded x -= 1 - 2.

16 years agoMade the ps-html facility work both in Parenscript and in Common Lisp.
Vladimir Sedach [Wed, 26 Dec 2007 03:33:44 +0000 (03:33 +0000)]
Made the ps-html facility work both in Parenscript and in Common Lisp.

16 years agoAdded 'concatenate' to Parenscript macro utilities.
Vladimir Sedach [Wed, 26 Dec 2007 03:31:40 +0000 (03:31 +0000)]
Added 'concatenate' to Parenscript macro utilities.

16 years agoRenamed src/lib Parenscript library files, got rid of Parenscript CSS system.
Vladimir Sedach [Wed, 26 Dec 2007 03:08:10 +0000 (03:08 +0000)]
Renamed src/lib Parenscript library files, got rid of Parenscript CSS system.

16 years agoMoved functional runtime PS utilities from src/libs/functional.lisp into *ps-lisp...
Vladimir Sedach [Wed, 26 Dec 2007 01:23:06 +0000 (01:23 +0000)]
Moved functional runtime PS utilities from src/libs/functional.lisp into *ps-lisp-library* in src/lib/js-lib.lisp.

16 years agoFixed literals error.
Vladimir Sedach [Tue, 25 Dec 2007 04:32:14 +0000 (04:32 +0000)]
Fixed literals error.

Introduced by patch: Mon Dec 24 17:02:17 MST 2007 Vladimir Sedach <vsedach@gmail.com>

16 years agoIntroduced special global variables to Parenscript; renamed let and lexical-let to...
Vladimir Sedach [Tue, 25 Dec 2007 00:08:13 +0000 (00:08 +0000)]
Introduced special global variables to Parenscript; renamed let and lexical-let to let* and lexical-let*, and made let itself expand to let* until parallel assignment let is implemented.

16 years agoMade special forms be compiled into named functions in a new package, parenscript...
Vladimir Sedach [Tue, 25 Dec 2007 00:02:17 +0000 (00:02 +0000)]
Made special forms be compiled into named functions in a new package, parenscript-special-forms, and introduced literal special forms.

The literal special forms should improve error messages and debugging.

16 years agoMade with-ps-gensyms prefix the given gensym with the symbol-to-js name of the given...
Vladimir Sedach [Mon, 24 Dec 2007 23:58:15 +0000 (23:58 +0000)]
Made with-ps-gensyms prefix the given gensym with the symbol-to-js name of the given gensym variable binding if an explicit prefix was not provided.

(the rationale for this is to save a little typing)

16 years agoGot rid of js-keyword form.
Vladimir Sedach [Mon, 24 Dec 2007 23:46:17 +0000 (23:46 +0000)]
Got rid of js-keyword form.

16 years agoMoved code from js/ps-macrology.lisp to special-forms.lisp; straightened out parenscr...
Vladimir Sedach [Thu, 15 Nov 2007 02:17:42 +0000 (02:17 +0000)]
Moved code from js/ps-macrology.lisp to special-forms.lisp; straightened out parenscript.asd to use serial file dependencies; unexported defaultf; rewrote rebind as lexical-let and exported it.

16 years agoFixed problems with expressions being compiled to statements inside expression progns...
Vladimir Sedach [Sun, 11 Nov 2007 18:10:33 +0000 (18:10 +0000)]
Fixed problems with expressions being compiled to statements inside expression progns; introduced mechanism for declaring variables in expression scopes; refactored function compilation.

16 years agoRemoved outdated internal documentation.
Vladimir Sedach [Sun, 4 Nov 2007 18:45:45 +0000 (18:45 +0000)]
Removed outdated internal documentation.

16 years agoFixed definition of *ps-lisp-library*. parenscript-20071104
Vladimir Sedach [Sun, 4 Nov 2007 18:18:42 +0000 (18:18 +0000)]
Fixed definition of *ps-lisp-library*.

16 years agoAdded length, @, mapcar utility functions, exported all library function symbols.
Vladimir Sedach [Sun, 4 Nov 2007 18:05:53 +0000 (18:05 +0000)]
Added length, @, mapcar utility functions, exported all library function symbols.

16 years agoAdded define-symbol-macro unit test.
Vladimir Sedach [Thu, 1 Nov 2007 01:53:15 +0000 (01:53 +0000)]
Added define-symbol-macro unit test.

16 years agoFixed define-symbol-macro.
Vladimir Sedach [Thu, 1 Nov 2007 01:46:03 +0000 (01:46 +0000)]
Fixed define-symbol-macro.

16 years agoPrettied up whitespace and comments in parse-lambda-list, ref2test. parenscript-20071031
Vladimir Sedach [Wed, 31 Oct 2007 07:03:59 +0000 (07:03 +0000)]
Prettied up whitespace and comments in parse-lambda-list, ref2test.

16 years agoGot rid of unused functions in util.lisp, slight refactoring.
Vladimir Sedach [Wed, 31 Oct 2007 07:01:32 +0000 (07:01 +0000)]
Got rid of unused functions in util.lisp, slight refactoring.

16 years agoMore refactorings to the printer, exported symbols that control printer behavior.
Vladimir Sedach [Mon, 29 Oct 2007 19:45:21 +0000 (19:45 +0000)]
More refactorings to the printer, exported symbols that control printer behavior.

16 years agoRefactored Parenscript printer code.
Vladimir Sedach [Fri, 26 Oct 2007 06:06:25 +0000 (06:06 +0000)]
Refactored Parenscript printer code.

16 years agoChanged ps-inline to take a form instead of an implicit progn as a parameter; gave...
Vladimir Sedach [Tue, 16 Oct 2007 22:04:45 +0000 (22:04 +0000)]
Changed ps-inline to take a form instead of an implicit progn as a parameter; gave ps-inline and ps-inline* optional arguments.

The optional arguments bind *js-quote-char* to make it more convenient
to use the two functions with different html generation macros (which
may use single or double quotes to delimit attribute values).

16 years agoFurther ignore declarations for unused variables.
Vladimir Sedach [Tue, 16 Oct 2007 21:54:53 +0000 (21:54 +0000)]
Further ignore declarations for unused variables.

Thanks to: Kevin Layer <layer@known.net>

16 years agoIn parse-lambda-list, made the need-symbol function work.
Vladimir Sedach [Sun, 14 Oct 2007 18:18:11 +0000 (18:18 +0000)]
In parse-lambda-list, made the need-symbol function work.

Otherwise the conditional always evaluated to nil.

16 years agoIn package definition, instead of exporting "NIL", exported (symbol-name 'nil).
Vladimir Sedach [Sun, 14 Oct 2007 18:17:22 +0000 (18:17 +0000)]
In package definition, instead of exporting "NIL", exported (symbol-name 'nil).

The latter causes a problem in case-sensitive Allegro.

Thanks to Kevin Layer for the patch.

16 years agoDeclared unused "expecting" variables in ps-special-form definitions ignorable.
Vladimir Sedach [Sun, 14 Oct 2007 18:16:20 +0000 (18:16 +0000)]
Declared unused "expecting" variables in ps-special-form definitions ignorable.

Thanks to: Kevin Layer <layer@known.net>

16 years agoMade ps-macrology depend on utils in parenscript asdf definition.
Vladimir Sedach [Sun, 14 Oct 2007 18:15:19 +0000 (18:15 +0000)]
Made ps-macrology depend on utils in parenscript asdf definition.

Thanks to: Kevin Layer <layer@known.net>

16 years agoFixed a bug in how symbol-macros were defined, expanded, and used by 'with-slots'.
Vladimir Sedach [Thu, 11 Oct 2007 02:27:40 +0000 (02:27 +0000)]
Fixed a bug in how symbol-macros were defined, expanded, and used by 'with-slots'.

16 years agoMade defun, defvar and doeach expect a symbol as the "name" argument instead of tryin...
Vladimir Sedach [Wed, 10 Oct 2007 23:12:57 +0000 (23:12 +0000)]
Made defun, defvar and doeach expect a symbol as the "name" argument instead of trying to compile-parenscript-form :expecting :expression.

16 years agoMade the handling of keyword symbols across Parenscript be consistent with the treatm...
Vladimir Sedach [Wed, 10 Oct 2007 23:12:10 +0000 (23:12 +0000)]
Made the handling of keyword symbols across Parenscript be consistent with the treatment of other symbols.

Previously a keyword symbol was being treated as a quoted symbol by
Parenscript.

16 years agoAdded support for &whole arguments in ps macro lambda lists; renamed parser.lisp...
Vladimir Sedach [Sun, 23 Sep 2007 06:07:26 +0000 (06:07 +0000)]
Added support for &whole arguments in ps macro lambda lists; renamed parser.lisp to compiler.lisp.

16 years agoAdded macro environment unit test that tests for bug "inconsistent expansion of local...
Vladimir Sedach [Thu, 20 Sep 2007 23:49:34 +0000 (23:49 +0000)]
Added macro environment unit test that tests for bug "inconsistent expansion of local macro".

16 years agoEliminated unwinding of macro environment for macro expansions.
Vladimir Sedach [Thu, 20 Sep 2007 23:33:14 +0000 (23:33 +0000)]
Eliminated unwinding of macro environment for macro expansions.

This fixed bug:

  "Bug: inconsistent expansion of local macro" submitted by Daniel
  Gackle on 2007-09-12

16 years agoUpdated description of PS-HTML in the tutorial. parenscript-20070828
Vladimir Sedach [Tue, 28 Aug 2007 23:04:38 +0000 (23:04 +0000)]
Updated description of PS-HTML in the tutorial.

16 years agoRevised obfuscation facility, added its description to the reference, and added more...
Vladimir Sedach [Fri, 24 Aug 2007 21:32:01 +0000 (21:32 +0000)]
Revised obfuscation facility, added its description to the reference, and added more unit tests.

16 years agoAdded description of namespace system to the reference.
Vladimir Sedach [Fri, 24 Aug 2007 20:43:13 +0000 (20:43 +0000)]
Added description of namespace system to the reference.

16 years agoFixed problem with (- 1). Unary operator "-" didn't like number constants.
Vladimir Sedach [Fri, 24 Aug 2007 20:16:51 +0000 (20:16 +0000)]
Fixed problem with (- 1). Unary operator "-" didn't like number constants.

16 years agoAdded defsetf and (defun (setf examples to the reference.
Vladimir Sedach [Fri, 24 Aug 2007 20:01:23 +0000 (20:01 +0000)]
Added defsetf and (defun (setf examples to the reference.

16 years agoAdded ps-print method specialized on null to ignore printing of nils.
Vladimir Sedach [Fri, 24 Aug 2007 20:00:41 +0000 (20:00 +0000)]
Added ps-print method specialized on null to ignore printing of nils.

16 years agoAdded code to remove unreachable constant forms from progn.
Vladimir Sedach [Fri, 24 Aug 2007 19:39:30 +0000 (19:39 +0000)]
Added code to remove unreachable constant forms from progn.

16 years agoUpdated the introduction doc.
Vladimir Sedach [Fri, 24 Aug 2007 18:20:47 +0000 (18:20 +0000)]
Updated the introduction doc.

16 years agoUpdated the ParenScript reference.
Vladimir Sedach [Fri, 24 Aug 2007 18:15:29 +0000 (18:15 +0000)]
Updated the ParenScript reference.

16 years agoUpdated the ParenScript tutorial.
Vladimir Sedach [Thu, 23 Aug 2007 23:10:54 +0000 (23:10 +0000)]
Updated the ParenScript tutorial.

16 years agoRemoved js-file and js-script from deprecated interface.
Vladimir Sedach [Thu, 23 Aug 2007 23:09:39 +0000 (23:09 +0000)]
Removed js-file and js-script from deprecated interface.

These were helper macros for net.html.generator from AllegroServe,
which really don't belong in ParenScript.

16 years agoFixed error where function call arguments weren't getting compiled to expressions.
Vladimir Sedach [Thu, 23 Aug 2007 23:08:02 +0000 (23:08 +0000)]
Fixed error where function call arguments weren't getting compiled to expressions.

16 years agoAdded the ability to compile cond to expressions.
Vladimir Sedach [Thu, 23 Aug 2007 21:35:15 +0000 (21:35 +0000)]
Added the ability to compile cond to expressions.