private Node parseLiteral(boolean allowQuantifier) {
		Node result = null;
		char c = input.charAt(offset);
		
		switch (c) {
			case '.': {
				result = new Wildcard(this);
				offset++;
				break;
			}
			case '\\': {
				char e = input.charAt(offset + 1);
				
				switch (e) {
					case 'w': {
						result = new PredefinedRange(this, PredefinedRange.WORD);
						break;
					}
					case 'd': {
						result = new PredefinedRange(this, PredefinedRange.DIGIT);
						break;
					}
					case 's': {
						result = new PredefinedRange(this, PredefinedRange.WHITESPACE);
						break;
					}
					case 't': {
						result = new Literal(this, '\t');
						break;
					}
					default: {
						result = new Literal(this, e);
						break;
					}
				}

				offset += 2;
				break;
			}
			case '^': {
				throwError("Usage of line start character is forbidden");
				break;
			}
			case '$': {
				throwError("Usage of line end character is forbidden");
				break;
			}
			default: {
				result = new Literal(this, c);
				offset++;
				break;
			}
		}
		
		if (allowQuantifier) {
			parseQuantifier(result);
		}
		return result;
	}