aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-01-15Update primary bootstrapHans Bolinder
2015-01-15Merge branch 'hb/dialyzer/suppress_warning/OTP-10280'Hans Bolinder
* hb/dialyzer/suppress_warning/OTP-10280: dialyzer: Introduce module local suppression of warnings
2015-01-15Merge branch 'maint'Bruce Yinhe
2015-01-15Merge branch 'richcarl/syntax_tools-fix-bad-error-format' into maintBruce Yinhe
OTP-12406 * richcarl/syntax_tools-fix-bad-error-format: fix bad format of error in epp_dodger:parse_file/3
2015-01-15Merge branch 'maint'Bruce Yinhe
2015-01-15Merge branch 'mikpe/hipe-arm-interworking' into maintBruce Yinhe
OTP-12405 * mikpe/hipe-arm-interworking: hipe: fix ARM/Thumb interworking
2015-01-15Merge branch 'maint'Marcus Arendt
2015-01-15Merge branch 'arekinath/openbsd-build/OTP-12404' into maintMarcus Arendt
* arekinath/openbsd-build/OTP-12404: Fix compile breakage on OpenBSD
2015-01-14dialyzer: Introduce module local suppression of warningsHans Bolinder
The -dialyzer() attribute can be used for suppressing warnings in a module by specifying functions or warning options. It can also be used for requesting warnings in a module.
2015-01-14Merge branch 'andreaTP/added-aes-ecb-to-crypto/OTP-12403'Marcus Arendt
* andreaTP/added-aes-ecb-to-crypto/OTP-12403: aligned implementation following last specs finally fixed docs fixed incorrect tag proposal of documentation fixes and tests add aes ecb to crypto library
2015-01-14Merge branch 'maint'Marcus Arendt
2015-01-14Merge branch 'marcus/rabbe-doc-typos/OTP-12399' into maintMarcus Arendt
* marcus/rabbe-doc-typos/OTP-12399: fix doc typos found by Rabbe Fogelholm
2015-01-14Merge branch 'maint'Marcus Arendt
2015-01-14Merge branch 'dotsimon/sctp_paddrinfo_state' into maintMarcus Arendt
* dotsimon/sctp_paddrinfo_state: Fix inet:getopts involving #sctp_paddrinfo{}
2015-01-14Merge branch 'maint'Marcus Arendt
2015-01-14Merge branch 'nox/http_uri-fragment/OTP-12398' into maintMarcus Arendt
* nox/http_uri-fragment/OTP-12398: Properly parse URI fragments
2015-01-14Merge branch 'maint'Dan Gudmundsson
* maint: wx: Fix connect when terminating
2015-01-14Merge branch 'dgud/wx/connect-when-terminating/OTP-12374' into maintDan Gudmundsson
* dgud/wx/connect-when-terminating/OTP-12374: wx: Fix connect when terminating
2015-01-14wx: Fix connect when terminatingDan Gudmundsson
The ddbe8a821ad commit was embarrassingly broken.
2015-01-13Merge branch 'maint'Marcus Arendt
2015-01-13Merge branch 'essen/irregardless' into maintMarcus Arendt
* essen/irregardless: Fix "irregardless" -> "regardless"
2015-01-13Merge branch 'maint'Dan Gudmundsson
* maint: debugger: Fix debugger save options on mac wx: Do not crash server when going down
2015-01-13Merge branch 'dgud/debugger/save-state-mac/OTP-12378' into maintDan Gudmundsson
* dgud/debugger/save-state-mac/OTP-12378: debugger: Fix debugger save options on mac
2015-01-13Merge branch 'dgud/wx/connect-when-terminating/OTP-12374' into maintDan Gudmundsson
* dgud/wx/connect-when-terminating/OTP-12374: wx: Do not crash server when going down
2015-01-13fix doc typos found by Rabbe FogelholmMarcus Arendt
2015-01-12Merge branch 'bjorn/asn1/rfc-5912/OTP-12395'Björn Gustavsson
* bjorn/asn1/rfc-5912/OTP-12395: (79 commits) Remove the old unused yecc-based parser Improve error handling for illegal object definitions Reimplement storeindb/2 to avoid excessive process communication Remove useless fields in #state{} Remove vestiges of obsolete {TypeName,Value} notation Remove old error handling Modernize the remaining cases Further improve error handling for instatiation of parameterized types asn1ct_tok: Clean up Add a test case for EXTENSIBILITY IMPLIED asn1ct_parser2: Remove expensive lookahead_assignment/1 function asn1ct_parser2: Clean up error handling and reporting asn1ct, asn1ct_parser2: Refactor the upper levels of error handling asn1ct_parser2: Eliminate all uses of old-style 'catch' asn1ct_parser2: Clean up parse_or/3 and parse_or_tag/3 asn1ct_parser2: Correct extraction of line number from token asn1ct_parser2: Throw an {asn1_error,...} for *all* parse errors asn1ct_parser2: Simplify parse_Type/1 asn1ct_parser2: Remove unsuccessful parsing of ValueSetFromObjects Move checking of UNIQUE & DEFAULT error to asn1ct_check ...
2015-01-12Remove the old unused yecc-based parserBjörn Gustavsson
2015-01-12Improve error handling for illegal object definitionsBjörn Gustavsson
2015-01-12Reimplement storeindb/2 to avoid excessive process communicationBjörn Gustavsson
As currently implemented, there is one call to asn1db:dbget() and asn1db:dbput() for each type/value definitions in an ASN.1 specification. If we check for duplicate definitions locally, we can send all definitions in a single call.
2015-01-12Remove useless fields in #state{}Björn Gustavsson
Three fields ('type','value', and 'vname') are almost unused. They are set, but almost never read. Eliminate the last remaining uses and the fields themselves.
2015-01-12Remove vestiges of obsolete {TypeName,Value} notationBjörn Gustavsson
2015-01-12Remove old error handlingDan Gudmundsson
And while we are at it cleanup and rewrite code to use try catch.
2015-01-12Modernize the remaining casesDan Gudmundsson
2015-01-12Further improve error handling for instatiation of parameterized typesDan Gudmundsson
2015-01-12asn1ct_tok: Clean upBjörn Gustavsson
2015-01-12Add a test case for EXTENSIBILITY IMPLIEDBjörn Gustavsson
2015-01-12asn1ct_parser2: Remove expensive lookahead_assignment/1 functionBjörn Gustavsson
In the parsing of a value assignment, such as: value INTEGER ::= 42 there is call to a function called lookahead_assignment/1 that will ensure that the sequence of tokens that follows the value is a valid assignment. The problem is that if the next assignment is a value assignment, that too will look ahead to the next assignment. That means that the complexity will be quadratic if there are many value assignments following each other. The reason for the test in the first place is unclear; my guess is that it was an attempt to provide better error reporting.
2015-01-12asn1ct_parser2: Clean up error handling and reportingBjörn Gustavsson
Errors were reported using a throw like this: throw({asn1_error,{get_line(hd(Tokens)),get(asn1_module), [got,get_token(hd(Tokens)),expected,typereference]}}). The attempt to tell the user what was expected was often mis-leading. It is time-consuming and non-trival to provide correct information of what is expected. Therefore, we will not even try. Instead we will spend more effort to report the token where the error was discovered. We will replace each throw with a function call: parse_error(Tokens). Also add the syntax_SUITE test suite to test error reporting and to cover all error reporting code. Remove the old c_syntax/1 test case. Also remove all out-commented code.
2015-01-12asn1ct, asn1ct_parser2: Refactor the upper levels of error handlingBjörn Gustavsson
Responsibilities for parse error handling were split between asn1ct and asn1ct_parser2 in a confusing way. Let asn1ct_parser2 return structured_error tuples in the same way as the check pass.
2015-01-12asn1ct_parser2: Eliminate all uses of old-style 'catch'Björn Gustavsson
Most uses of 'catch' are not necessary. For example, parse_or/2 is typically called like this: case catch parse_or(Tokens, Flist) of {'EXIT',Reason} -> exit(Reason); {asn1_error,_}=AsnErr -> throw(AsnErr); Result -> Result end. Since {asn1_error,_} is always thrown (never returned) and a successful is always returned (never thrown), the 'case' and the 'catch' are not necessary. The code can be simplified too: parse_or(Tokens, Flist) In a few cases, we will need to replace the 'catch' with 'try'...'catch'.
2015-01-12asn1ct_parser2: Clean up parse_or/3 and parse_or_tag/3Björn Gustavsson
Use try...catch instead of catch.
2015-01-12asn1ct_parser2: Correct extraction of line number from tokenBjörn Gustavsson
The first position in a token tuple is always an atom, the second the line number. The code tested the third position.
2015-01-12asn1ct_parser2: Throw an {asn1_error,...} for *all* parse errorsBjörn Gustavsson
In a future commit, we want to tighten what we catch. Therefore, legitimate parsing errors should always throw a controlled exception, instead of arbitrarily crashing.
2015-01-12asn1ct_parser2: Simplify parse_Type/1Björn Gustavsson
The parse_Type/1 calls various type parse functions. Most of those functions return a #type record, but not all of them. If a #type{} record is not returned, parse_Type/1 will wrap the return value in a We can simplify the code in parse_Type/1 if we make sure that the type parsing functions called by parse_Type/1 always return a #type{} record.
2015-01-12asn1ct_parser2: Remove unsuccessful parsing of ValueSetFromObjectsBjörn Gustavsson
The TypeFromObject and ValueSetFromObjects grammar productions cannot be distinguished by the parser without the help of type information (which the parser does not have). Since the parser attempts to parse TypeFromObject before ValueSetFromObjects, the parsing of ValueSetFromObjects will always fail.
2015-01-12Move checking of UNIQUE & DEFAULT error to asn1ct_checkBjörn Gustavsson
To keep the error reporting code in asn1ct_parser2 simple, we only want to handle pure syntactic errors. Therefore, move the check that UNIQUE and DEFAULT are not applied to the same field to asn1ct_check.
2015-01-12Makefile: Add missing dependency for asn1ct_gen_checkBjörn Gustavsson
asn1ct_gen_check.erl was added in 7df687d6.
2015-01-12Strengthen the test of selection typesBjörn Gustavsson
"SET OF id < Type" was not tested. Also make sure that all of assigned values are correct.
2015-01-12Remove code duplicationDan Gudmundsson
2015-01-12Remove unnecessary internal errorsBjörn Gustavsson