#pragma implementation

#include "SourceLine.h"

int SourceLine::n_ext(const Str & x) {
	int i = x.val();
	
	if ( i > 0 && i < 17 ) {
		return i - 1;
	} else if ( x=="a" ) {
		return 4;
	} else if ( x=="b" ) {
		return 1;
	} else if ( x=="x" ) {
		return 2;
	} else if ( x=="w" ) {
		return 15;
	} else if ( x=="as") {
		return 3;
	} else {
		return -1;
	}
}

int SourceLine::a_ext(const Str & x) {
	if ( x=="p" ) {
		return 0;
	} else if ( x=="wp" ) {
		return 1;
	} else if ( x=="xs" ) {
		return 2;
	} else if ( x=="x" || x=="3" ) {
		return 3;
	} else if ( x=="s" ) {
		return 4;
	} else if ( x=="m" ) {
		return 5;
	} else if ( x=="b" || x=="2" ) {
		return 6;
	} else if ( x=="w" || x=="15" ) {
		return 7;
	} else if ( x=="ao" ) {
		return -2;
	} else {
		return -1;
	}
}


syntax highlighted by Code2HTML, v. 0.9.1