/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*-
Shadow
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-
430664
public function addShadow($shadowAngle = 45, $blur = 15, $bgColor = 'transparent')
		#
		# Author:   Jarrod Oberto (Adapted from Pascal Naidon)
		# Ref:    http://www.les-stooges.org/pascal/webdesign/vignettes/index.php?la=en
		# Purpose:  Add a drop shadow to your image
		# Params in:  (int) $angle: the angle of the shadow
		#       (int) $blur: the blur distance
		#       (mixed) $bgColor: the color of the background
		# Params out:
		# Notes:
		#
	{
		// *** A higher number results in a smoother shadow
		define('STEPS', $blur * 2);

		// *** Set the shadow distance
		$shadowDistance = $blur * 0.25;

		// *** Set blur width and height
		$blurWidth = $blurHeight = $blur;


		if ($shadowAngle == 0)
		{
			$distWidth = 0;
			$distHeight = 0;
		}
		else
		{
			$distWidth = $shadowDistance * cos(deg2rad($shadowAngle));
			$distHeight = $shadowDistance * sin(deg2rad($shadowAngle));
		}


		// *** Convert color
		if (fix_strtolower($bgColor) != 'transparent')
		{
			$rgbArray = $this->formatColor($bgColor);
			$r0 = $rgbArray['r'];
			$g0 = $rgbArray['g'];
			$b0 = $rgbArray['b'];
		}


		$image = $this->imageResized;
		$width = $this->width;
		$height = $this->height;


		$newImage = imagecreatetruecolor($width, $height);
		imagecopyresampled($newImage, $image, 0, 0, 0, 0, $width, $height, $width, $height);


		// *** RGB
		$rgb = imagecreatetruecolor($width + $blurWidth, $height + $blurHeight);
		$colour = imagecolorallocate($rgb, 0, 0, 0);
		imagefilledrectangle($rgb, 0, 0, $width + $blurWidth, $height + $blurHeight, $colour);
		$colour = imagecolorallocate($rgb, 255, 255, 255);
		//imagefilledrectangle($rgb, $blurWidth*0.5-$distWidth, $blurHeight*0.5-$distHeight, $width+$blurWidth*0.5-$distWidth, $height+$blurWidth*0.5-$distHeight, $colour);
		imagefilledrectangle($rgb, $blurWidth * 0.5 - $distWidth, $blurHeight * 0.5 - $distHeight, $width + $blurWidth * 0.5 - $distWidth, $height + $blurWidth * 0.5 - $distHeight, $colour);
		//imagecopymerge($rgb, $newImage, 1+$blurWidth*0.5-$distWidth, 1+$blurHeight*0.5-$distHeight, 0,0, $width, $height, 100);
		imagecopymerge($rgb, $newImage, $blurWidth * 0.5 - $distWidth, $blurHeight * 0.5 - $distHeight, 0, 0, $width + $blurWidth, $height + $blurHeight, 100);


		// *** Shadow (alpha)
		$shadow = imagecreatetruecolor($width + $blurWidth, $height + $blurHeight);
		imagealphablending($shadow, false);
		$colour = imagecolorallocate($shadow, 0, 0, 0);
		imagefilledrectangle($shadow, 0, 0, $width + $blurWidth, $height + $blurHeight, $colour);


		for ($i = 0; $i <= STEPS; $i++)
		{

			$t = ((1.0 * $i) / STEPS);
			$intensity = 255 * $t * $t;

			$colour = imagecolorallocate($shadow, $intensity, $intensity, $intensity);
			$points = array(
				$blurWidth * $t, $blurHeight,     // Point 1 (x, y)
				$blurWidth, $blurHeight * $t,  // Point 2 (x, y)
				$width, $blurHeight * $t,  // Point 3 (x, y)
				$width + $blurWidth * (1 - $t), $blurHeight,     // Point 4 (x, y)
				$width + $blurWidth * (1 - $t), $height,     // Point 5 (x, y)
				$width, $height + $blurHeight * (1 - $t),  // Point 6 (x, y)
				$blurWidth, $height + $blurHeight * (1 - $t),  // Point 7 (x, y)
				$blurWidth * $t, $height      // Point 8 (x, y)
			);
			imagepolygon($shadow, $points, 8, $colour);
		}

		for ($i = 0; $i <= STEPS; $i++)
		{

			$t = ((1.0 * $i) / STEPS);
			$intensity = 255 * $t * $t;

			$colour = imagecolorallocate($shadow, $intensity, $intensity, $intensity);
			imagefilledarc($shadow, $blurWidth - 1, $blurHeight - 1, 2 * (1 - $t) * $blurWidth, 2 * (1 - $t) * $blurHeight, 180, 268, $colour, IMG_ARC_PIE);
			imagefilledarc($shadow, $width, $blurHeight - 1, 2 * (1 - $t) * $blurWidth, 2 * (1 - $t) * $blurHeight, 270, 358, $colour, IMG_ARC_PIE);
			imagefilledarc($shadow, $width, $height, 2 * (1 - $t) * $blurWidth, 2 * (1 - $t) * $blurHeight, 0, 90, $colour, IMG_ARC_PIE);
			imagefilledarc($shadow, $blurWidth - 1, $height, 2 * (1 - $t) * $blurWidth, 2 * (1 - $t) * $blurHeight, 90, 180, $colour, IMG_ARC_PIE);
		}


		$colour = imagecolorallocate($shadow, 255, 255, 255);
		imagefilledrectangle($shadow, $blurWidth, $blurHeight, $width, $height, $colour);
		imagefilledrectangle($shadow, $blurWidth * 0.5 - $distWidth, $blurHeight * 0.5 - $distHeight, $width + $blurWidth * 0.5 - 1 - $distWidth, $height + $blurHeight * 0.5 - 1 - $distHeight, $colour);


		// *** The magic
		imagealphablending($rgb, false);

		for ($theX = 0; $theX < imagesx($rgb); $theX++)
		{
			for ($theY = 0; $theY < imagesy($rgb); $theY++)
			{

				// *** Get the RGB values for every pixel of the RGB image
				$colArray = imagecolorat($rgb, $theX, $theY);
				$r = ($colArray >> 16) & 0xFF;
				$g = ($colArray >> 8) & 0xFF;
				$b = $colArray & 0xFF;

				// *** Get the alpha value for every pixel of the shadow image
				$colArray = imagecolorat($shadow, $theX, $theY);
				$a = $colArray & 0xFF;
				$a = 127 - floor($a / 2);
				$t = $a / 128.0;

				// *** Create color
				if (fix_strtolower($bgColor) == 'transparent')
				{
					$myColour = imagecolorallocatealpha($rgb, $r, $g, $b, $a);
				}
				else
				{
					$myColour = imagecolorallocate($rgb, $r * (1.0 - $t) + $r0 * $t, $g * (1.0 - $t) + $g0 * $t, $b * (1.0 - $t) + $b0 * $t);
				}

				// *** Add color to new rgb image
				imagesetpixel($rgb, $theX, $theY, $myColour);
			}
		}

		imagealphablending($rgb, true);
		imagesavealpha($rgb, true);

		$this->imageResized = $rgb;

		imagedestroy($image);
		imagedestroy($newImage);
		imagedestroy($shadow);
	}
632746
function AddShadowToImage(i, w, h, scale, sc, sb, so) {
  var sw = abs(so[0]), sh = abs(so[1]),
    cw = w + (sw > sb ? sw + sb : sb * 2) * scale,
    ch = h + (sh > sb ? sh + sb : sb * 2) * scale,
    xo = scale * ((sb || 0) + (so[0] < 0 ? sw : 0)),
    yo = scale * ((sb || 0) + (so[1] < 0 ? sh : 0)), cv, c;
  cv = NewCanvas(cw, ch);
  if(!cv)
    return null;
  c = cv.getContext('2d');
  sc && (c.shadowColor = sc);
  sb && (c.shadowBlur = sb * scale);
  so && (c.shadowOffsetX = so[0] * scale, c.shadowOffsetY = so[1] * scale);
  c.drawImage(i, xo, yo, w, h);
  return {image: cv, width: cw / scale, height: ch / scale};
}
193432
public static function box_shadow($element = '', $param = array("x" => 0, "y" => 0, "blur" => "0", "diffusion" => "0", "color" => "#000"))
    {
        if (!is_string($element) || empty($element)) return false;
        if (!is_array($param)) $param = array();

        $str = "";
        $str .= $element . "{\n";

        foreach (self::$browsers as $val) {
            $str .= $val . "box-shadow:" . $param["x"] . " " . $param["y"] . " " . $param["blur"] . " " . $param["diffusion"] . " " . $param["color"] . ";\n";
        }

        $str .= "}\n";
        return $str;
    }
654710
function (hash, val) {
            var key,
              value,
              element = this.element,
              hasSetSymbolSize,
              ret = this,
              skipAttr;

            // single key-value pair
            if (typeof hash === 'string' && val !== UNDEFINED) {
                key = hash;
                hash = {};
                hash[key] = val;
            }

            // used as a getter: first argument is a string, second is undefined
            if (typeof hash === 'string') {
                ret = (this[hash + 'Getter'] || this._defaultGetter).call(this, hash, element);

                // setter
            } else {

                for (key in hash) {
                    value = hash[key];
                    skipAttr = false;



                    if (this.symbolName && /^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(key)) {
                        if (!hasSetSymbolSize) {
                            this.symbolAttr(hash);
                            hasSetSymbolSize = true;
                        }
                        skipAttr = true;
                    }

                    if (this.rotation && (key === 'x' || key === 'y')) {
                        this.doTransform = true;
                    }

                    if (!skipAttr) {
                        (this[key + 'Setter'] || this._defaultSetter).call(this, value, key, element);
                    }

                    // Let the shadow follow the main element
                    if (this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(key)) {
                        this.updateShadows(key, value);
                    }
                }

                // Update transform. Do this outside the loop to prevent redundant updating for batch setting
                // of attributes.
                if (this.doTransform) {
                    this.updateTransform();
                    this.doTransform = false;
                }

            }

            return ret;
        }
97699
function (shadowEntry) {
            var shadowScopeOrder = this._defaults._shadowScopeOrder,
                index = _.findIndex(shadowScopeOrder, function (entry) {
                    return entry === shadowEntry;
                }),
                i = index + 1;

            // Find an appropriate scope of lower priority to add it before
            while (i < shadowScopeOrder.length) {
                if (shadowScopeOrder[i].promise.state() === "pending" ||
                        shadowScopeOrder[i].promise.state() === "resolved") {
                    break;
                }
                i++;
            }
            switch (shadowScopeOrder[i].promise.state()) {
            case "pending":
                // cannot decide now, lookup once pending promise is settled
                shadowScopeOrder[i].promise.always(function () {
                    this._tryAddToScopeOrder(shadowEntry);
                }.bind(this));
                break;
            case "resolved":
                this._pushToScopeOrder(shadowEntry.id, shadowScopeOrder[i].id);
                this.trigger(SCOPEORDER_CHANGE, {
                    id: shadowEntry.id,
                    action: "added"
                });
                this._triggerChange({
                    ids: shadowEntry.scope.getKeys()
                });
                break;
            default:
                throw new Error("Internal error: no scope found to add before. \"default\" is missing?..");
            }

        }
163893
function compileSourcePreCode() {
    var $version = '##version##';

    var componentRenderers = {};

    function extend(target, source) {
        if (source) {
            Object.keys(source).forEach(function (key) {
                var value = source[key];
                if (typeof value !== 'undefined') {
                    target[key] = value;
                }
            });
        }

        return target;
    }

    function each(array, iterator) {
        if (array && array.length > 0) {
            for (var i = 0, l = array.length; i < l; i++) {
                if (iterator(array[i], i) === false) {
                    break;
                }
            }
        }
    }

    function contains(array, value) {
        var result;
        each(array, function (item) {
            result = item === value;
            return !result;
        });

        return result;
    }

    var HTML_ENTITY = {
        /* jshint ignore:start */
        '&': '&amp;',
        '<': '&lt;',
        '>': '&gt;',
        '"': '&quot;',
        /* eslint-disable quotes */
        "'": '&#39;'
        /* eslint-enable quotes */
        /* jshint ignore:end */
    };

    function htmlFilterReplacer(c) {
        return HTML_ENTITY[c];
    }

    function escapeHTML(source) {
        if (source == null) {
            return '';
        }

        if (typeof source === 'string') {
            return source ? source.replace(/[&<>"']/g, htmlFilterReplacer) : '';
        }

        return '' + source;
    }

    function _classFilter(source) {
        if (source instanceof Array) {
            return source.join(' ');
        }

        return source;
    }

    function _styleFilter(source) {
        if (typeof source === 'object') {
            var result = '';
            if (source) {
                Object.keys(source).forEach(function (key) {
                    result += key + ':' + source[key] + ';';
                });
            }

            return result;
        }

        return source;
    }

    function _xclassFilter(source) {
        if (source instanceof Array) {
            source = source.join(' ');
        }

        return source ? ' ' + source : '';
    }

    function _xstyleFilter(source) {
        var result;
        if (typeof source === 'object') {
            result = '';
            if (source) {
                Object.keys(source).forEach(function (key) {
                    result += key + ':' + source[key] + ';';
                });
            }
        }
        else {
            result = source;
        }

        return result ? ';' + result : '';
    }

    function attrFilter(name, value) {
        if (value) {
            return ' ' + name + '="' + value + '"';
        }

        return '';
    }

    function boolAttrFilter(name, value) {
        if (value && value !== 'false' && value !== '0') {
            return ' ' + name;
        }

        return '';
    }

    function callFilter(ctx, name, args) {
        var filter = ctx.proto.filters[name];
        if (typeof filter === 'function') {
            return filter.apply(ctx, args);
        }
    }
}
804999
public void onDrawFrame(float frameTime)
    {
        if (!isEnabled() || (getFloat("enabled") <= 0.0f) || (owner == null)) { return; }
        Matrix4f worldmtx = owner.getTransform().getModelMatrix4f();
        boolean changed = mChanged.getAndSet(false);

        mNewDir.x = 0.0f;
        mNewDir.y = 0.0f;
        mNewDir.z = -1.0f;
        worldmtx.getTranslation(mNewPos);
        worldmtx.mul(mLightRot);
        worldmtx.transformDirection(mNewDir);
        mNewDir.normalize();
        if ((mOldDir.x != mNewDir.x) || (mOldDir.y != mNewDir.y) || (mOldDir.z != mNewDir.z))
        {
            changed = true;
            setVec4("world_direction", mNewDir.x, mNewDir.y, mNewDir.z, 0);
            mOldDir.set(mNewDir);
            mChanged.set(false);
        }
        if ((mOldPos.x != mNewPos.x) || (mOldPos.y != mNewPos.y) || (mOldPos.z != mNewPos.z))
        {
            changed = true;
            setPosition(mNewPos.x, mNewPos.y, mNewPos.z);
            mOldPos.set(mNewPos);
            mChanged.set(false);
        }
        GVRShadowMap shadowMap = (GVRShadowMap) getComponent(GVRShadowMap.getComponentType());
        if ((shadowMap != null) && changed && shadowMap.isEnabled())
        {
            shadowMap.setPerspShadowMatrix(worldmtx, this);
        }
    }
549602
function(chain) {
    var shadows = [], next = this.after(chain[0].from), end = chain[chain.length - 1].to;
    while (true) {
      shadows.push(next);
      var nextNode = next.to;
      if (!nextNode || nextNode == end)
        break;
      else
        next = nextNode.historyAfter || this.before(end);
      // (The this.before(end) is a hack -- FF sometimes removes
      // properties from BR nodes, in which case the best we can hope
      // for is to not break.)
    }
    return shadows;
  }
1254228
function makeCallback(entryCaller, entryStack, shadow = false) {
  /**
   * This callback should be called when an asynchronous error occurred.
   * @param {(string|Error)} messageOrError A message string or an _Error_ object at the point of actual error.
   * @returns {Error} An error with the updated stack which includes the callee.
   */
  function cb(messageOrError) {
    const caller = getCallerFromArguments(arguments)
    const { stack: errorStack } = new Error()
    const calleeStackLine = getCalleeStackLine(errorStack)
    const isError = messageOrError instanceof Error
    const message = isError ? messageOrError.message : messageOrError

    const stackHeading = getStackHeading(message)
    const entryHasCallee = caller !== null && entryCaller === caller
    const stackMessage = [
      stackHeading,
      ...(entryHasCallee || shadow ? [entryStack] : [
        calleeStackLine,
        entryStack,
      ]),
    ].join('\n')

    const stack = cleanStack(stackMessage)
    const properties = { message, stack }
    const e = isError ? messageOrError : new Error()

    return /** @type {Error} */ (Object.assign(/** @type {!Object} */ (e), properties))
  }

  return cb
}
13655
function (shadowOptions, group, cutOff) {
		var shadows = [],
			i,
			element = this.element,
			renderer = this.renderer,
			shadow,
			elemStyle = element.style,
			markup,
			path = element.path,
			strokeWidth,
			modifiedPath,
			shadowWidth,
			shadowElementOpacity;

		// some times empty paths are not strings
		if (path && typeof path.value !== 'string') {
			path = 'x';
		}
		modifiedPath = path;

		if (shadowOptions) {
			shadowWidth = pick(shadowOptions.width, 3);
			shadowElementOpacity = (shadowOptions.opacity || 0.15) / shadowWidth;
			for (i = 1; i <= 3; i++) {

				strokeWidth = (shadowWidth * 2) + 1 - (2 * i);

				// Cut off shadows for stacked column items
				if (cutOff) {
					modifiedPath = this.cutOffPath(path.value, strokeWidth + 0.5);
				}

				markup = ['<shape isShadow="true" strokeweight="', strokeWidth,
					'" filled="false" path="', modifiedPath,
					'" coordsize="10 10" style="', element.style.cssText, '" />'];

				shadow = createElement(renderer.prepVML(markup),
					null, {
						left: pInt(elemStyle.left) + pick(shadowOptions.offsetX, 1),
						top: pInt(elemStyle.top) + pick(shadowOptions.offsetY, 1)
					}
				);
				if (cutOff) {
					shadow.cutOff = strokeWidth + 1;
				}

				// apply the opacity
				markup = ['<stroke color="', shadowOptions.color || 'black', '" opacity="', shadowElementOpacity * i, '"/>'];
				createElement(renderer.prepVML(markup), null, null, shadow);


				// insert it
				if (group) {
					group.element.appendChild(shadow);
				} else {
					element.parentNode.insertBefore(shadow, element);
				}

				// record it
				shadows.push(shadow);

			}

			this.shadows = shadows;
		}
		return this;

	}
205025
function(node, from, remove, step, delay, isEnabled)
	{
		step = step || 40;
		delay = delay || 30;
		
		var opacity = from || 100;
		
		mxUtils.setOpacity(node, opacity);
		
		if (isEnabled || isEnabled == null)
		{
			var f = function()
			{
			    opacity = Math.max(opacity-step, 0);
				mxUtils.setOpacity(node, opacity);
				
				if (opacity > 0)
				{
					window.setTimeout(f, delay);
				}
				else
				{
					node.style.visibility = 'hidden';
					
					if (remove && node.parentNode)
					{
						node.parentNode.removeChild(node);
					}
				}
			};
			window.setTimeout(f, delay);
		}
		else
		{
			node.style.visibility = 'hidden';
			
			if (remove && node.parentNode)
			{
				node.parentNode.removeChild(node);
			}
		}
	}
794301
function (apply, group) {
		var shadows = [],
			i,
			element = this.element,
			renderer = this.renderer,
			shadow,
			elemStyle = element.style,
			markup,
			path = element.path;

		// some times empty paths are not strings
		if (path && typeof path.value !== 'string') {
			path = 'x';
		}

		if (apply) {
			for (i = 1; i <= 3; i++) {
				markup = ['<shape isShadow="true" strokeweight="', (7 - 2 * i),
					'" filled="false" path="', path,
					'" coordsize="100,100" style="', element.style.cssText, '" />'];
				shadow = createElement(renderer.prepVML(markup),
					null, {
						left: pInt(elemStyle.left) + 1,
						top: pInt(elemStyle.top) + 1
					}
				);

				// apply the opacity
				markup = ['<stroke color="black" opacity="', (0.05 * i), '"/>'];
				createElement(renderer.prepVML(markup), null, null, shadow);


				// insert it
				if (group) {
					group.element.appendChild(shadow);
				} else {
					element.parentNode.insertBefore(shadow, element);
				}

				// record it
				shadows.push(shadow);

			}

			this.shadows = shadows;
		}
		return this;

	}
11613
function(template) {
      if (template) {
        // make a shadow root
        var root = this.createShadowRoot();
        // stamp template
        // which includes parsing and applying MDV bindings before being
        // inserted (to avoid {{}} in attribute values)
        // e.g. to prevent <img src="images/{{icon}}"> from generating a 404.
        var dom = this.instanceTemplate(template);
        // append to shadow dom
        root.appendChild(dom);
        // perform post-construction initialization tasks on shadow root
        this.shadowRootReady(root, template);
        // return the created shadow root
        return root;
      }
    }
754859
function updateReferences(images, options, sprites, css) {
	return new Promise(function (resolve) {
		css.walkComments(function (comment) {
			var rule, image, backgroundImage, backgroundPosition, backgroundSize;
			// Manipulate only token comments
			if (isToken(comment)) {
				// Match from the path with the tokens comments
				image = _.find(images, {path: comment.text});
				if (image) {
					// 2x check even dimensions.
					if (image.ratio === 2 && (image.coordinates.width % 2 !== 0 || image.coordinates.height % 2 !== 0)) {
						throw log(options.logLevel, 'lv1', ['Lazysprite:', colors.red(path.relative(process.cwd(), image.path)), '`2x` image should have' +
						' even dimensions.']);
					}

					// 3x check dimensions.
					if (image.ratio === 3 && (image.coordinates.width % 3 !== 0 || image.coordinates.height % 3 !== 0)) {
						throw log(options.logLevel, 'lv1', ['Lazysprite:', colors.red(path.relative(process.cwd(), image.path)), '`3x` image should have' +
						' correct dimensions.']);
					}

					// Generate correct ref to the sprite
					image.spriteRef = path.relative(image.stylesheetRelative, image.spritePath);
					image.spriteRef = image.spriteRef.split(path.sep).join('/');

					backgroundImage = postcss.decl({
						prop: 'background-image',
						value: getBackgroundImageUrl(image)
					});

					backgroundPosition = postcss.decl({
						prop: 'background-position',
						value: getBackgroundPosition(image)
					});

					// Replace the comment and append necessary properties.
					comment.replaceWith(backgroundImage);

					// Output the dimensions (only with 1x)
					if (options.outputDimensions && image.ratio === 1) {
						['height', 'width'].forEach(function (prop) {
							backgroundImage.after(
								postcss.decl({
									prop: prop,
									value: (image.ratio > 1 ? image.coordinates[prop] / image.ratio : image.coordinates[prop]) + 'px'
								})
							);
						});
					}

					backgroundImage.after(backgroundPosition);

					if (image.ratio > 1) {
						backgroundSize = postcss.decl({
							prop: 'background-size',
							value: getBackgroundSize(image)
						});

						backgroundPosition.after(backgroundSize);
					}
				}
			}
		});

		resolve([images, options, sprites, css]);
	});
}
132213
function (id) {
            var scope = this._scopes[id],
                shadowIndex;
            if (!scope) {
                return;
            }

            this.removeFromScopeOrder(id);
            shadowIndex = _.findIndex(this._defaults._shadowScopeOrder, function (entry) {
                return entry.id === id;
            });
            this._defaults._shadowScopeOrder.splice(shadowIndex, 1);
            delete this._scopes[id];
        }
572410
private void updateShadow() {
		float radius = shadowEnabled ? shadowRadius : 0;
		//paint.setShadowLayer(radius, shadowDx, shadowDy, shadowColor);
		paintBorder.setShadowLayer(radius, shadowDx, shadowDy, shadowColor);
		paintSelectorBorder.setShadowLayer(radius, shadowDx, shadowDy, shadowColor);
	}
1298446
function Tokenizer(inp, options){
	this.inp = inp||'';
	// replace all other line terminators with \n (leave \r\n in tact though). we should probably remove the shadowInp when finished...
	// only replace \r if it is not followed by a \n else \r\n would become \n\n causing a double newline where it is just a single
	this.shadowInp = (inp||'').replace(Tokenizer.regexNormalizeNewlines, '\n');
	this.pos = 0;
	this.line = 0;
	this.column = 0;
	this.cache = {};

	this.errorStack = [];

	this.wtree = [];
	this.btree = [];

//	this.regexWhiteSpace = Tokenizer.regexWhiteSpace;
	this.regexLineTerminator = Tokenizer.regexLineTerminator; // used in fallback
	this.regexAsciiIdentifier = Tokenizer.regexAsciiIdentifier;
	this.hashAsciiIdentifier = Tokenizer.hashAsciiIdentifier;
//	this.regexHex = Tokenizer.regexHex;
	this.hashHex = Tokenizer.hashHex
	this.regexUnicodeEscape = Tokenizer.regexUnicodeEscape;
	this.regexIdentifierStop = Tokenizer.regexIdentifierStop;
	this.hashIdentifierStop = Tokenizer.hashIdentifierStop;
//	this.regexPunctuators = Tokenizer.regexPunctuators;
	this.regexNumber = Tokenizer.regexNumber;
	this.regexNewline = Tokenizer.regexNewline;

	this.regexBig = Tokenizer.regexBig;
	this.regexBigAlt = Tokenizer.regexBigAlt;

    // stuff for parsing tag literals
    this.regexTagName = Tokenizer.regexTagName;
    this.regexTagAttributes = Tokenizer.regexTagAttributes;
    this.regexTagUnarySuffix = Tokenizer.regexTagUnarySuffix;
    this.regexTagBinarySuffix = Tokenizer.regexTagBinarySuffix;
    this.regexTagBody = Tokenizer.regexTagBody;
    this.regexTagOpenOrClose = Tokenizer.regexTagOpenOrClose;
    this.regexTagClose = Tokenizer.regexTagClose;
	this.regexRemoveEscape = Tokenizer.regexRemoveEscape;

	this.tokenCount = 0;
	this.tokenCountNoWhite = 0;

	this.Unicode = window.Unicode;

	// if the Parser throws an error. it will set this property to the next match
	// at the time of the error (which was not what it was expecting at that point) 
	// and pass on an "error" match. the error should be scooped on the stack and 
	// this property should be returned, without looking at the input...
	this.errorEscape = null;

	// support tag literals
	this.tagLiterals = false || (options && options.tagLiterals);
}