1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

Go tests with parse error have much smaller trees when we halt on error

This commit is contained in:
Timothy Clem 2017-05-03 14:12:43 -07:00
parent 31c01c0092
commit 6e6d3e1432
37 changed files with 290 additions and 779 deletions

View File

@ -1,38 +1,6 @@
{+(ParseError
(Program
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(FunctionCall
(Identifier))))
(Function
(Identifier)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(Identifier)
(Identifier)
(ParameterDecl
(Identifier)
(Identifier)))
(Identifier))
(Function
(Identifier)
(Args)
(Args
(Identifier)
(Identifier)))
(Function
(Identifier)
(Args)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(ParameterDecl
(Identifier)
(Identifier))))))+}
(Module
(Identifier))
(Identifier)
(Args)
(Identifier))+}

View File

@ -1,38 +1,6 @@
{+(ParseError
(Program
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(FunctionCall
(Identifier))))
(Function
(Identifier)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(Identifier)
(Identifier)
(ParameterDecl
(Identifier)
(Identifier)))
(Identifier))
(Function
(Identifier)
(Args)
(Args
(Identifier)
(Identifier)))
(Function
(Identifier)
(Args)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(ParameterDecl
(Identifier)
(Identifier))))))+}
(Module
(Identifier))
(Identifier)
(Args)
(Identifier))+}

View File

@ -1,38 +1,6 @@
{-(ParseError
(Program
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(FunctionCall
(Identifier))))
(Function
(Identifier)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(Identifier)
(Identifier)
(ParameterDecl
(Identifier)
(Identifier)))
(Identifier))
(Function
(Identifier)
(Args)
(Args
(Identifier)
(Identifier)))
(Function
(Identifier)
(Args)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(ParameterDecl
(Identifier)
(Identifier))))))-}
(Module
(Identifier))
(Identifier)
(Args)
(Identifier))-}

View File

@ -1,38 +1,6 @@
{-(ParseError
(Program
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(FunctionCall
(Identifier))))
(Function
(Identifier)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(Identifier)
(Identifier)
(ParameterDecl
(Identifier)
(Identifier)))
(Identifier))
(Function
(Identifier)
(Args)
(Args
(Identifier)
(Identifier)))
(Function
(Identifier)
(Args)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(ParameterDecl
(Identifier)
(Identifier))))))-}
(Module
(Identifier))
(Identifier)
(Args)
(Identifier))-}

View File

@ -1,42 +1,7 @@
(ParseError
(Program
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(FunctionCall
{ (Identifier)
->(Identifier) })))
(Function
{ (Identifier)
->(Identifier) }
(Args
(ParameterDecl
(Identifier)
(Identifier))
(Identifier)
(Identifier)
(ParameterDecl
(Identifier)
(Identifier)))
(Identifier))
(Function
{ (Identifier)
->(Identifier) }
(Args)
(Args
(Identifier)
(Identifier)))
(Function
{ (Identifier)
->(Identifier) }
(Args)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(ParameterDecl
(Identifier)
(Identifier))))))
(Module
(Identifier))
(Identifier)
(Args)
{ (Identifier)
->(Identifier) })

View File

@ -1,42 +1,7 @@
(ParseError
(Program
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(FunctionCall
{ (Identifier)
->(Identifier) })))
(Function
{ (Identifier)
->(Identifier) }
(Args
(ParameterDecl
(Identifier)
(Identifier))
(Identifier)
(Identifier)
(ParameterDecl
(Identifier)
(Identifier)))
(Identifier))
(Function
{ (Identifier)
->(Identifier) }
(Args)
(Args
(Identifier)
(Identifier)))
(Function
{ (Identifier)
->(Identifier) }
(Args)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(ParameterDecl
(Identifier)
(Identifier))))))
(Module
(Identifier))
(Identifier)
(Args)
{ (Identifier)
->(Identifier) })

View File

@ -1,38 +1,6 @@
(ParseError
(Program
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(FunctionCall
(Identifier))))
(Function
(Identifier)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(Identifier)
(Identifier)
(ParameterDecl
(Identifier)
(Identifier)))
(Identifier))
(Function
(Identifier)
(Args)
(Args
(Identifier)
(Identifier)))
(Function
(Identifier)
(Args)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(ParameterDecl
(Identifier)
(Identifier))))))
(Module
(Identifier))
(Identifier)
(Args)
(Identifier))

View File

@ -1,38 +1,6 @@
(ParseError
(Program
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(FunctionCall
(Identifier))))
(Function
(Identifier)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(Identifier)
(Identifier)
(ParameterDecl
(Identifier)
(Identifier)))
(Identifier))
(Function
(Identifier)
(Args)
(Args
(Identifier)
(Identifier)))
(Function
(Identifier)
(Args)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(ParameterDecl
(Identifier)
(Identifier))))))
(Module
(Identifier))
(Identifier)
(Args)
(Identifier))

View File

@ -1,24 +1,15 @@
{+(Program
{+(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeDecl
(Identifier)
(Args)
(Other "type_declaration"
(TypeDecl
(Identifier)
(FunctionTy
(Args
(Identifier))
(Identifier)))
(TypeDecl
(Identifier)
(FunctionTy
(Args
(Identifier)
(Identifier))
(Args
(ParameterDecl
(ChannelTy
(ParseError)
(Identifier)))))))))+}
(FunctionTy
(Args
(Identifier))
(Identifier)))
(Identifier)
(Args
(Identifier)
(Identifier)))+}

View File

@ -1,24 +1,15 @@
{-(Program
{-(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeDecl
(Identifier)
(Args)
(Other "type_declaration"
(TypeDecl
(Identifier)
(FunctionTy
(Args
(Identifier))
(Identifier)))
(TypeDecl
(Identifier)
(FunctionTy
(Args
(Identifier)
(Identifier))
(Args
(ParameterDecl
(ChannelTy
(ParseError)
(Identifier)))))))))-}
(FunctionTy
(Args
(Identifier))
(Identifier)))
(Identifier)
(Args
(Identifier)
(Identifier)))-}

View File

@ -1,4 +1,4 @@
(Program
{ (Program
(Module
(Identifier))
(Function
@ -6,26 +6,31 @@
(Args)
(Other "type_declaration"
(TypeDecl
{ (Identifier)
->(Identifier) }
(Identifier)
(FunctionTy
(Args
{ (Identifier)
->(Identifier) })
{ (Identifier)
->(Identifier) }))
(Identifier))
(Identifier)))
(TypeDecl
{ (Identifier)
->(Identifier) }
(Identifier)
(FunctionTy
(Args
{-(Identifier)-}
(Identifier)
{+(Identifier)+})
(Identifier))
(Args
{+(ParameterDecl
(ChannelTy
(ParseError)
(Identifier)))+}
{-(Identifier)-}
{-(Identifier)-}))))))
(Identifier)
(Identifier)))))))->(ParseError
(Module
(Identifier))
(Identifier)
(Args)
(TypeDecl
(Identifier)
(FunctionTy
(Args
(Identifier))
(Identifier)))
(Identifier)
(Args
(Identifier)
(Identifier))) }

View File

@ -1,4 +1,18 @@
(Program
{ (ParseError
(Module
(Identifier))
(Identifier)
(Args)
(TypeDecl
(Identifier)
(FunctionTy
(Args
(Identifier))
(Identifier)))
(Identifier)
(Args
(Identifier)
(Identifier)))->(Program
(Module
(Identifier))
(Function
@ -6,26 +20,17 @@
(Args)
(Other "type_declaration"
(TypeDecl
{ (Identifier)
->(Identifier) }
(Identifier)
(FunctionTy
(Args
{ (Identifier)
->(Identifier) })
{ (Identifier)
->(Identifier) }))
(Identifier))
(Identifier)))
(TypeDecl
{ (Identifier)
->(Identifier) }
(Identifier)
(FunctionTy
(Args
{-(Identifier)-}
(Identifier)
{+(Identifier)+})
(Identifier))
(Args
{+(Identifier)+}
{+(Identifier)+}
{-(ParameterDecl
(ChannelTy
(ParseError)
(Identifier)))-}))))))
(Identifier)
(Identifier))))))) }

View File

@ -1,24 +1,15 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeDecl
(Identifier)
(Args)
(Other "type_declaration"
(TypeDecl
(Identifier)
(FunctionTy
(Args
(Identifier))
(Identifier)))
(TypeDecl
(Identifier)
(FunctionTy
(Args
(Identifier)
(Identifier))
(Args
(ParameterDecl
(ChannelTy
(ParseError)
(Identifier)))))))))
(FunctionTy
(Args
(Identifier))
(Identifier)))
(Identifier)
(Args
(Identifier)
(Identifier)))

View File

@ -1,14 +1,8 @@
{+(Program
{+(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeConversion
(Identifier)
(StringLiteral)
(ParseError
(StringLiteral)
(Import
(Identifier)
(StringLiteral))))))+}
(Identifier)
(Args)
(Identifier)
(StringLiteral)
(StringLiteral))+}

View File

@ -1,14 +1,8 @@
{+(Program
{+(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeConversion
(Identifier)
(StringLiteral)
(ParseError
(StringLiteral)
(Import
(Identifier)
(StringLiteral))))))+}
(Identifier)
(Args)
(Identifier)
(StringLiteral)
(StringLiteral))+}

View File

@ -1,14 +1,8 @@
{-(Program
{-(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeConversion
(Identifier)
(StringLiteral)
(ParseError
(StringLiteral)
(Import
(Identifier)
(StringLiteral))))))-}
(Identifier)
(Args)
(Identifier)
(StringLiteral)
(StringLiteral))-}

View File

@ -1,14 +1,8 @@
{-(Program
{-(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeConversion
(Identifier)
(StringLiteral)
(ParseError
(StringLiteral)
(Import
(Identifier)
(StringLiteral))))))-}
(Identifier)
(Args)
(Identifier)
(StringLiteral)
(StringLiteral))-}

View File

@ -1,17 +1,10 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeConversion
(Identifier)
{ (StringLiteral)
->(StringLiteral) }
(ParseError
{ (StringLiteral)
->(StringLiteral) }
(Import
(Identifier)
{ (StringLiteral)
->(StringLiteral) })))))
(Identifier)
(Args)
(Identifier)
{ (StringLiteral)
->(StringLiteral) }
{ (StringLiteral)
->(StringLiteral) })

View File

@ -1,17 +1,10 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeConversion
(Identifier)
{ (StringLiteral)
->(StringLiteral) }
(ParseError
{ (StringLiteral)
->(StringLiteral) }
(Import
(Identifier)
{ (StringLiteral)
->(StringLiteral) })))))
(Identifier)
(Args)
(Identifier)
{ (StringLiteral)
->(StringLiteral) }
{ (StringLiteral)
->(StringLiteral) })

View File

@ -1,14 +1,8 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeConversion
(Identifier)
(StringLiteral)
(ParseError
(StringLiteral)
(Import
(Identifier)
(StringLiteral))))))
(Identifier)
(Args)
(Identifier)
(StringLiteral)
(StringLiteral))

View File

@ -1,14 +1,8 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeConversion
(Identifier)
(StringLiteral)
(ParseError
(StringLiteral)
(Import
(Identifier)
(StringLiteral))))))
(Identifier)
(Args)
(Identifier)
(StringLiteral)
(StringLiteral))

View File

@ -1,20 +1,11 @@
{+(Program
{+(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(Other "const_declaration"
(ParseError
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier)))
(Assignment
(Other "expression_list"
(NumberLiteral)
(Identifier))
(Other "expression_list"
(NumberLiteral)))))))+}
(Identifier)
(Args)
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier))))+}

View File

@ -1,20 +1,11 @@
{+(Program
{+(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(Other "const_declaration"
(ParseError
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier)))
(Assignment
(Other "expression_list"
(NumberLiteral)
(Identifier))
(Other "expression_list"
(NumberLiteral)))))))+}
(Identifier)
(Args)
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier))))+}

View File

@ -1,20 +1,11 @@
{-(Program
{-(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(Other "const_declaration"
(ParseError
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier)))
(Assignment
(Other "expression_list"
(NumberLiteral)
(Identifier))
(Other "expression_list"
(NumberLiteral)))))))-}
(Identifier)
(Args)
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier))))-}

View File

@ -1,20 +1,11 @@
{-(Program
{-(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(Other "const_declaration"
(ParseError
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier)))
(Assignment
(Other "expression_list"
(NumberLiteral)
(Identifier))
(Other "expression_list"
(NumberLiteral)))))))-}
(Identifier)
(Args)
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier))))-}

View File

@ -1,23 +1,12 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(Other "const_declaration"
(ParseError
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
{ (NumberLiteral)
->(NumberLiteral) }
(Identifier)))
(Assignment
(Other "expression_list"
{ (NumberLiteral)
->(NumberLiteral) }
(Identifier))
(Other "expression_list"
{ (NumberLiteral)
->(NumberLiteral) }))))))
(Identifier)
(Args)
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
{ (NumberLiteral)
->(NumberLiteral) }
(Identifier))))

View File

@ -1,23 +1,12 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(Other "const_declaration"
(ParseError
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
{ (NumberLiteral)
->(NumberLiteral) }
(Identifier)))
(Assignment
(Other "expression_list"
{ (NumberLiteral)
->(NumberLiteral) }
(Identifier))
(Other "expression_list"
{ (NumberLiteral)
->(NumberLiteral) }))))))
(Identifier)
(Args)
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
{ (NumberLiteral)
->(NumberLiteral) }
(Identifier))))

View File

@ -1,20 +1,11 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(Other "const_declaration"
(ParseError
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier)))
(Assignment
(Other "expression_list"
(NumberLiteral)
(Identifier))
(Other "expression_list"
(NumberLiteral)))))))
(Identifier)
(Args)
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier))))

View File

@ -1,20 +1,11 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(Other "const_declaration"
(ParseError
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier)))
(Assignment
(Other "expression_list"
(NumberLiteral)
(Identifier))
(Other "expression_list"
(NumberLiteral)))))))
(Identifier)
(Args)
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier))))

View File

@ -1,17 +1,7 @@
{+(Program
{+(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(Identifier))
(StringLiteral)
(ParseError
(Identifier))
(StringLiteral)
(Identifier)
(ParseError
(Import
(Identifier)
(StringLiteral)))))+}
(Identifier)
(Args)
(Identifier)
(StringLiteral))+}

View File

@ -1,17 +1,7 @@
{+(Program
{+(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(Identifier))
(StringLiteral)
(ParseError
(Identifier))
(StringLiteral)
(Identifier)
(ParseError
(Import
(Identifier)
(StringLiteral)))))+}
(Identifier)
(Args)
(Identifier)
(StringLiteral))+}

View File

@ -1,17 +1,7 @@
{-(Program
{-(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(Identifier))
(StringLiteral)
(ParseError
(Identifier))
(StringLiteral)
(Identifier)
(ParseError
(Import
(Identifier)
(StringLiteral)))))-}
(Identifier)
(Args)
(Identifier)
(StringLiteral))-}

View File

@ -1,17 +1,7 @@
{-(Program
{-(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(Identifier))
(StringLiteral)
(ParseError
(Identifier))
(StringLiteral)
(Identifier)
(ParseError
(Import
(Identifier)
(StringLiteral)))))-}
(Identifier)
(Args)
(Identifier)
(StringLiteral))-}

View File

@ -1,20 +1,8 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(Identifier))
{ (StringLiteral)
->(StringLiteral) }
(ParseError
(Identifier))
{ (StringLiteral)
->(StringLiteral) }
(Identifier)
(ParseError
(Import
(Identifier)
{ (StringLiteral)
->(StringLiteral) }))))
(Identifier)
(Args)
(Identifier)
{ (StringLiteral)
->(StringLiteral) })

View File

@ -1,20 +1,8 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(Identifier))
{ (StringLiteral)
->(StringLiteral) }
(ParseError
(Identifier))
{ (StringLiteral)
->(StringLiteral) }
(Identifier)
(ParseError
(Import
(Identifier)
{ (StringLiteral)
->(StringLiteral) }))))
(Identifier)
(Args)
(Identifier)
{ (StringLiteral)
->(StringLiteral) })

View File

@ -1,17 +1,7 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(Identifier))
(StringLiteral)
(ParseError
(Identifier))
(StringLiteral)
(Identifier)
(ParseError
(Import
(Identifier)
(StringLiteral)))))
(Identifier)
(Args)
(Identifier)
(StringLiteral))

View File

@ -1,17 +1,7 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(Identifier))
(StringLiteral)
(ParseError
(Identifier))
(StringLiteral)
(Identifier)
(ParseError
(Import
(Identifier)
(StringLiteral)))))
(Identifier)
(Args)
(Identifier)
(StringLiteral))