Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
c22f9931
Commit
c22f9931
authored
Feb 05, 2016
by
Max Khon
Committed by
Vasil Velichkov
Sep 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bison 3 no longer supports YYPARSE_PARAM and YYPARSE_PARAM_TYPE.
parent
ad8ee0c8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
libasn1parser/asn1p_y.y
libasn1parser/asn1p_y.y
+12
-12
No files found.
libasn1parser/asn1p_y.y
View file @
c22f9931
%parse-param { void **param }
%{
%{
#include <stdlib.h>
#include <stdlib.h>
...
@@ -9,8 +11,6 @@
...
@@ -9,8 +11,6 @@
#include "asn1parser.h"
#include "asn1parser.h"
#define YYPARSE_PARAM param
#define YYPARSE_PARAM_TYPE void **
#define YYERROR_VERBOSE
#define YYERROR_VERBOSE
#define YYDEBUG 1
#define YYDEBUG 1
#define YYFPRINTF prefixed_fprintf
#define YYFPRINTF prefixed_fprintf
...
@@ -38,8 +38,7 @@ prefixed_fprintf(FILE *f, const char *fmt, ...) {
...
@@ -38,8 +38,7 @@ prefixed_fprintf(FILE *f, const char *fmt, ...) {
}
}
int yylex(void);
int yylex(void);
static int yyerror(const char *msg);
int yyerror(void **param, const char *msg);
#ifdef YYBYACC
#ifdef YYBYACC
int yyparse(void **param); /* byacc does not produce a prototype */
int yyparse(void **param); /* byacc does not produce a prototype */
#endif
#endif
...
@@ -70,7 +69,7 @@ static asn1p_module_t *currentModule;
...
@@ -70,7 +69,7 @@ static asn1p_module_t *currentModule;
#define checkmem(ptr) do { \
#define checkmem(ptr) do { \
if(!(ptr)) \
if(!(ptr)) \
return yyerror(
"Memory failure");
\
return yyerror(
param, "Memory failure");
\
} while(0)
} while(0)
#define CONSTRAINT_INSERT(root, constr_type, arg1, arg2) do { \
#define CONSTRAINT_INSERT(root, constr_type, arg1, arg2) do { \
...
@@ -660,7 +659,7 @@ Assignment:
...
@@ -660,7 +659,7 @@ Assignment:
* Erroneous attemps
* Erroneous attemps
*/
*/
| BasicString {
| BasicString {
return yyerror(
return yyerror(
param,
"Attempt to redefine a standard basic string type, "
"Attempt to redefine a standard basic string type, "
"please comment out or remove this type redefinition.");
"please comment out or remove this type redefinition.");
}
}
...
@@ -678,7 +677,7 @@ optImports:
...
@@ -678,7 +677,7 @@ optImports:
ImportsDefinition:
ImportsDefinition:
TOK_IMPORTS optImportsBundleSet ';' {
TOK_IMPORTS optImportsBundleSet ';' {
if(!saved_aid && 0)
if(!saved_aid && 0)
return yyerror("Unterminated IMPORTS FROM, "
return yyerror(
param,
"Unterminated IMPORTS FROM, "
"expected semicolon ';'");
"expected semicolon ';'");
saved_aid = 0;
saved_aid = 0;
$$ = $2;
$$ = $2;
...
@@ -687,7 +686,7 @@ ImportsDefinition:
...
@@ -687,7 +686,7 @@ ImportsDefinition:
* Some error cases.
* Some error cases.
*/
*/
| TOK_IMPORTS TOK_FROM /* ... */ {
| TOK_IMPORTS TOK_FROM /* ... */ {
return yyerror("Empty IMPORTS list");
return yyerror(
param,
"Empty IMPORTS list");
}
}
;
;
...
@@ -2313,11 +2312,11 @@ Enumerations:
...
@@ -2313,11 +2312,11 @@ Enumerations:
asn1p_expr_t *first_memb = TQ_FIRST(&($$->members));
asn1p_expr_t *first_memb = TQ_FIRST(&($$->members));
if(first_memb) {
if(first_memb) {
if(first_memb->expr_type == A1TC_EXTENSIBLE) {
if(first_memb->expr_type == A1TC_EXTENSIBLE) {
return yyerror(
return yyerror(
param,
"The ENUMERATION cannot start with extension (...).");
"The ENUMERATION cannot start with extension (...).");
}
}
} else {
} else {
return yyerror(
return yyerror(
param,
"The ENUMERATION list cannot be empty.");
"The ENUMERATION list cannot be empty.");
}
}
}
}
...
@@ -2625,8 +2624,9 @@ _fixup_anonymous_identifier(asn1p_expr_t *expr) {
...
@@ -2625,8 +2624,9 @@ _fixup_anonymous_identifier(asn1p_expr_t *expr) {
expr->Identifier);
expr->Identifier);
}
}
static int
int
yyerror(const char *msg) {
yyerror(void **param, const char *msg) {
(void)param;
extern char *asn1p_text;
extern char *asn1p_text;
fprintf(stderr,
fprintf(stderr,
"ASN.1 grammar parse error "
"ASN.1 grammar parse error "
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment