diff --git a/src/main/antlr3/org/JesusFreke/smali/smaliLexer.g b/src/main/antlr3/org/JesusFreke/smali/smaliLexer.g index b311db2d..1fea9304 100644 --- a/src/main/antlr3/org/JesusFreke/smali/smaliLexer.g +++ b/src/main/antlr3/org/JesusFreke/smali/smaliLexer.g @@ -923,9 +923,7 @@ fragment TYPE_FIELD_METHOD_LITERAL_EMITCHILDREN MEMBER_NAME_EMIT ( METHOD_PROTOTYPE_EMITCHILDREN | COLON_EMIT NONVOID_TYPE_DESCRIPTOR_EMITCHILD))? - //TODO: allow void and primitive type here? - | PRIMITIVE_TYPE_EMIT - | VOID_TYPE_EMIT; + | PRIMITIVE_TYPE_EMIT; fragment ENUM_EMIT : ENUM {emit($ENUM, ENUM);}; diff --git a/src/main/antlr3/org/JesusFreke/smali/smaliParser.g b/src/main/antlr3/org/JesusFreke/smali/smaliParser.g index 62e84914..74af65b7 100644 --- a/src/main/antlr3/org/JesusFreke/smali/smaliParser.g +++ b/src/main/antlr3/org/JesusFreke/smali/smaliParser.g @@ -176,13 +176,11 @@ smali_file EOF { if (!$smali_file::hasClassSpec) { - //TODO: throw correct exception type - throw new RuntimeException("The file must contain a .class directive"); + throw new SemanticException(input, "The file must contain a .class directive"); } if (!$smali_file::hasSuperSpec) { - //TODO: throw correct exception type - throw new RuntimeException("The file must contain a .super directive"); + throw new SemanticException(input, "The file must contain a .super directive"); } } -> ^(I_CLASS_DEF diff --git a/src/main/antlr3/org/JesusFreke/smali/smaliTreeWalker.g b/src/main/antlr3/org/JesusFreke/smali/smaliTreeWalker.g index 853cb53e..654f9d90 100644 --- a/src/main/antlr3/org/JesusFreke/smali/smaliTreeWalker.g +++ b/src/main/antlr3/org/JesusFreke/smali/smaliTreeWalker.g @@ -1061,7 +1061,6 @@ register_list[int totalMethodRegisters, int methodParameterRegisters] returns[by : ^(I_REGISTER_LIST (REGISTER { - //TODO: shouldn't this be == 6? if ($registerCount == 5) { throw new SemanticException(input, "A list of registers can only have a maximum of 5 registers. Use the /range alternate opcode instead."); }