Project

General

Profile

Revision 9

Added by Willibald K. over 8 years ago

remove support for Qualitative Action Systems, rename UlyssesType to Type

View differences:

OoaCADPVisitor.java
44 44
import org.momut.ooas.ast.statements.Block;
45 45
import org.momut.ooas.ast.types.FunctionType;
46 46
import org.momut.ooas.ast.types.OoActionSystemType;
47
import org.momut.ooas.ast.types.UlyssesType;
47
import org.momut.ooas.ast.types.Type;
48 48
import org.momut.ooas.ast.types.FunctionType.FunctionTypeEnum;
49 49
import org.momut.ooas.codegen.OoasCodeEmitter;
50 50
import org.momut.ooas.parser.ParserState;
......
484 484
	}
485 485

  
486 486

  
487
	public static String DumpType(UlyssesType atype)
487
	public static String DumpType(Type atype)
488 488
	{
489 489
		final CadpType newtype = new CadpType();
490 490
		atype.Accept(newtype);
......
768 768
				{
769 769
					param.append("    struct {"); param.append(System.lineSeparator());
770 770
					int parnum = 0;
771
					for (final UlyssesType parameter: ((FunctionType)namedAction.type()).parameter())
771
					for (final Type parameter: ((FunctionType)namedAction.type()).parameter())
772 772
					{
773 773
						param.append(String.format("        %1$s PARAM_%2$s;", DumpType(parameter), parnum));
774 774
						param.append(System.lineSeparator());
......
977 977
				m_output.AppendLine(String.format("    case %1$s:", num));
978 978
				m_output.Append("      return ");
979 979
				int paramnr = 0;
980
				for (final UlyssesType param: ((FunctionType)action.type()).parameter())
980
				for (final Type param: ((FunctionType)action.type()).parameter())
981 981
				{
982 982
					if (paramnr != 0)
983 983
						m_output.AppendLine(" && ");
......
1032 1032
			{
1033 1033
				m_output.AppendLine(String.format("    case %1$s:", num));
1034 1034
//				int paramnr = 0;
1035
				for (@SuppressWarnings("unused") final UlyssesType param: ((FunctionType)action.type()).parameter())
1035
				for (@SuppressWarnings("unused") final Type param: ((FunctionType)action.type()).parameter())
1036 1036
				{
1037 1037
					m_output.AppendLine(
1038 1038
							String.format("      CAESAR_SIZE = sizeof (CAESAR_L->CAESAR_UNION.CAESAR_PROFILE_%1$s);", num));
......
1129 1129
				int paramnum = 0;
1130 1130
				for (final ParameterIdentifier paramname : action.parameter())
1131 1131
				{
1132
					final UlyssesType param = paramname.type();
1132
					final Type param = paramname.type();
1133 1133
					CadpType.EmitType(param);
1134 1134
					m_output.AppendLine(String.format("      fprintf(CAESAR_FILE,\"%1$s: \");", paramname.tokenText()));
1135 1135
					m_output.AppendLine(String.format("      %1$s%4$s(CAESAR_FILE, CAESAR_L->CAESAR_UNION.CAESAR_PROFILE_%2$s.PARAM_%3$s);",
......
1201 1201
	{
1202 1202
		final StringBuilder paramStr = new StringBuilder("CAESAR_TYPE_STATE CAESAR_S1");
1203 1203
		int i = 0;
1204
		for (final UlyssesType param : fun.parameter())
1204
		for (final Type param : fun.parameter())
1205 1205
		{
1206 1206
			//CadpType.EmitType(param);
1207 1207
			paramStr.append(", ");

Also available in: Unified diff