function action($action) {

		// Choice of possible actions
		// Note the frequent fallthroughs : the actions are decrementally "long"
		switch ($action) {

			case self::JSMIN_ACT_FULL :
				// Write A to output, then fall through

				$this->put($this->theA);

			case self::JSMIN_ACT_BUF : // N.B. possible fallthrough from above
				// Copy B to A

				$tmpA = $this->theA = $this->theB;

				// Treating a string as a single char : outputting it whole
				// Note that the string-opening char (" or ') is memorized in B

				if ($tmpA == '\'' || $tmpA == '"') {
					
					$pos = $this->inPos;
					while (true) {
						// instead of looping char by char, we directly go to the next
						// revelant char, thanks to php strpos function.
						$pos = $this->getCloser($this->in, array($this->theB,'\\',"\n"), $pos);

						if ( $pos === false ) {
							// Whoopsie
							throw new MyJsMinException('UnterminatedStringLiteral');
						}

						$tmpA = $this->in[$pos];
						
						if ($tmpA == $this->theB) {
							// String terminated
							break; // from while(true)
						}
						if ($tmpA == "\n") {
							// Whoopsie
							throw new MyJsMinException('UnterminatedStringLiteral');
						}
						// else
						if ($tmpA == '\\') {
							// Escape next char immediately
							$pos += 2;
						}
					}
					
					// cool, we got the whole string
					$this->put(substr($this->in, $this->inPos - 1, $pos - $this->inPos + 1));
					$this->inPos = $pos + 1;
					$this->theA = $tmpA;
				}

			case self::JSMIN_ACT_IMM : // N.B. possible fallthrough from above
				// Get the next B

				$this->theB = $this->next();

				// Special case of recognising regular expressions (beginning with /) that are
				// preceded by '(', ',' or '='

				$tmpA = $this->theA;

				if ($this->theB == '/' && ($tmpA == '(' || $tmpA == ',' || $tmpA == '=')) {

					// Output the two successive chars
					$this->put($tmpA);
					$this->put($this->theB);

					// Look for the end of the RE literal, watching out for escaped chars or a control /
					// end of line char (the RE literal then being unterminated !)
					$pos = $this->inPos;
					while (true) {
						// instead of looping char by char, we directly go to the next
						// revelant char, thanks to php strpos function.
						$pos = $this->getCloser($this->in, array('/','\\',"\n"), $pos);

						if ( $pos === false ) {
							// Whoopsie
							throw new MyJsMinException('UnterminatedRegExpLiteral');
						}

						$tmpA = $this->in[$pos];

						if ($tmpA == '/') {
							// RE literal terminated
							break; // from while(true)
						}
						if ( $tmpA == "\n") {
							// Whoopsie
							throw new MyJsMinException('UnterminatedRegExpLiteral');
						}
						// else
						if ($tmpA == '\\') {
							// Escape next char immediately
							$pos += 2;
						}
					}
					$this->put(substr($this->in, $this->inPos, $pos - $this->inPos));
					$this->inPos = $pos + 1;
					$this->theA = $tmpA;
					

					// Move forward after the RE literal
					$this->theB = $this->next();
				}

			break;
			default :
				throw new MyJsMinException('Expected a JSMin::ACT_* constant in action()');
		}
	}