public BasicStructure2 parse(BasicStructure1 structure1) {
		
		ArrayList<Integer> types = structure1.getTypes();
		ArrayList<String> tokens = structure1.getTokens();
		
		ArrayList<Integer> types1 = new ArrayList<Integer>();
		ArrayList<String> tokens1 = new ArrayList<String>();
		
		int type;
		String token;
		boolean startline = true;

		List<Expression> exprs = new ArrayList<Expression>();
		int ei = 0;

		Map<Integer, Integer> linenumbers = new HashMap<Integer, Integer>();

		for(int i = 0; i < types.size(); i++) {

			type = types.get(i);
			token = tokens.get(i);

			if (startline && (type == TYPE_NUMBER)) {
				
				linenumbers.put(Integer.valueOf(token), ei);
				
			} else if (type == TYPE_NEXT_OPERATOR || type == TYPE_NEXT_LINE) {

				if (types1.size() > 0) {
					Expression e = new Expression(ei, get1(types1), get2(tokens1));
					exprs.add(e);
					tokens1.clear();
					types1.clear();
					ei++;
				}

				if (type == TYPE_NEXT_LINE) {
					if (exprs.size() > 0) {
						Expression e = exprs.get(exprs.size() - 1);
						e.setLast();
					}
					startline = true;
				} else {
					startline = false;
				}

			} else {
				
				types1.add(type);
				tokens1.add(token);
				startline = false;
				
			}
		}

		if (types1.size() > 0) {
			Expression e = new Expression(ei, get1(types1), get2(tokens1));
			exprs.add(e);
			tokens1.clear();
			types1.clear();
			//ei++;
		}

		BasicStructure2 structure2 = new BasicStructure2(exprs, linenumbers);
		return structure2;
	}