ReactionCan

In ReactionCan by User:Zzo38, there are cans, and subroutines, and macros, and liquid substances to put into the can, some of which are more dense, and some of which can react with others. There is also an accumulator which can store a non-negative integer, and a return stack for returning from subroutine calls.

Each command ends with a semicolon, the commands are:
 * subroutine; Declares the beginning of a subroutine.
 * substance.can; Fill the empty part of the can with the substance.
 * substance.can.subroutine; Fill the empty part of the can with the substance and call the subroutine on a reaction.
 * can.can; Pour the contents of one can to another.
 * can.</tt>can.</tt>subroutine;</tt> Pour the contents of one can to another and call the subroutine on a reaction.
 * can;</tt> Make a can empty.
 * ;</tt> Return from subroutine call.
 * number;</tt> Discard this many top entries from the return stack (but do not return).
 * +</tt>number;</tt> Add this number to the accumulator.
 * -</tt>number;</tt> Subtract this number from the accumulator value if the result is not negative. If the result would be negative, instead keep the accumulator how it is.
 * macro;</tt> Declares the beginning of a macro definition. You cannot define macros inside of another macro.
 * !;</tt> End of a macro definition.
 * macro.</tt>parameter;</tt> Uses a macro, with this given parameter. Inside of the macro, any $</tt> is replaced by the given parameter. Macros cannot be called recursively.
 * "</tt>text<tt>";</tt> Output text. A newline is done by omitting the text.

The syntax consists of:
 * subroutine: A name consisting of all lowercase letters.
 * macro: A name with the first letter uppercase and the rest lowercase.
 * substance: A number, followed by zero or more reactants.
 * reactant: A name with the first letter uppercase and the rest lowercase.
 * can: A number and a name of all lowercase letters.
 * number: Any non-negative integer, or an asterisk. An asterisk represents the value stored in the accumulator.
 * parameter: Anything without a semicolon.
 * text: Anything without quotation marks.

Whitespace can be used anywhere and is insignificant. Comments start with a <tt>#</tt> character and last until the end of the line.

The number at the beginning of the name of a can is the capacity of how much can be stored in this can.

The number of a substance tells the order of stacking according to density. The reactants tell what will make a reaction.