summaryrefslogtreecommitdiff
path: root/qmic.h
AgeCommit message (Collapse)Author
2021-10-04parser: properly support 64-bit numbersAlex Elder
The language supports specifying 64-bit unsigned values, but the num field of the token structure is not guaranteed to be 64 bits wide. Change its type to be unsigned long long, and change the code that parses numbers to use strtoull() so we can actually accept a 64-bit value. This is also true of the value field of the token type. Change it to unsigned long long as well (and format it as unsigned). Check the return value of strtoull(), and if the result is out of range, report an error. Signed-off-by: Alex Elder <elder@linaro.org> Message-Id: <20211001232338.769309-23-elder@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2021-10-04parser: use stronger typing in the symbol structureAlex Elder
Refine the definition of the symbol structure with an anonymous union to make it a little clearer whether a token describes a message or a type. In symbol_add(), be more explicit about the type of additional arguments expected to be seen. Add a name to the enumerated type representing the defined "type" type values (U8, STRUCT, etc.). And change the type of the type field in the symbol structure to have that enumerated type. Specifically, if the symbol being added is a message, the argument that follows should be one of the message types (request, response, or indication). And if the symbol being added is a type, the next argument is expected to be one of the "type" types. This makes it a little easier to understand what the code is doing. Signed-off-by: Alex Elder <elder@linaro.org> Message-Id: <20211001232338.769309-20-elder@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-01-31kernel: Introduce kernel-style generatorBjorn Andersson
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-01-30accessor: Move accessor generators to one fileBjorn Andersson
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-01-30parser: Tidy up parser after moveBjorn Andersson
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-01-30parser: Move struct parser to parser.cBjorn Andersson
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-01-30parser: Move message parsing to parser.cBjorn Andersson
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-01-30qmic: Move simple type array to common fileBjorn Andersson
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-01-30qmic: Adopt common list implementationBjorn Andersson
Use the list implementation from other projects instead of rolling custom list operations throughout the codebase. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-01-30qmi: Annotate yyerror noreturnBjorn Andersson
The yyerror() doesn't return, so let the compiler know this, in order to silence warnings about potentially uninitialized variables. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-02-07qmic: Support specifying request, response or indication typeBjorn Andersson
Allow specifying message type for the tlv support functions to verify and create the right type of qmi header. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-02-07qmic: Initial basic implementationBjorn Andersson
This initial implementation is capable of generating encoder and decoder accessors for messages with basic integers, strings, arrays and structs. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>