aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2006-03-14 15:53:59 +0000
committerLev Walkin <vlm@lionet.info>2006-03-14 15:53:59 +0000
commitaa7f53085e23979eef19c9fca2c9e35b67e84b0f (patch)
tree9b66e065a966b503d8d6e95d0e525fd0f2563938
parentcb4cd5b22ac44b4605bdecf51220316ff71605cc (diff)
*** empty log message ***
-rw-r--r--libasn1fix/Makefile.am4
-rw-r--r--libasn1fix/Makefile.in55
-rw-r--r--libasn1fix/asn1fix.c5
-rw-r--r--libasn1fix/asn1fix_class.c14
-rw-r--r--libasn1fix/asn1fix_class.h6
-rw-r--r--libasn1fix/asn1fix_cws.c1
-rw-r--r--libasn1fix/asn1fix_cws.h20
7 files changed, 32 insertions, 73 deletions
diff --git a/libasn1fix/Makefile.am b/libasn1fix/Makefile.am
index 21b1b830..65316be6 100644
--- a/libasn1fix/Makefile.am
+++ b/libasn1fix/Makefile.am
@@ -3,9 +3,6 @@ AM_CFLAGS = @ADD_CFLAGS@
AM_CPPFLAGS = \
-I$(top_srcdir)/libasn1parser
-AM_YFLAGS = -p asn1fix_cws_ -d
-AM_LFLAGS = -sp -Cem -Pasn1fix_cws_ -olex.yy.c
-
noinst_LTLIBRARIES = libasn1fix.la
libasn1fix_la_LDFLAGS = -all-static
@@ -29,7 +26,6 @@ libasn1fix_la_SOURCES = \
asn1fix_class.c asn1fix_class.h \
asn1fix_tags.c asn1fix_tags.h \
asn1fix_enum.c asn1fix_enum.h \
- asn1fix_cws_y.y asn1fix_cws_l.l \
asn1fix_cws.c asn1fix_cws.h \
asn1fix_constraint_compat.c
diff --git a/libasn1fix/Makefile.in b/libasn1fix/Makefile.in
index 61a4d842..a259a343 100644
--- a/libasn1fix/Makefile.in
+++ b/libasn1fix/Makefile.in
@@ -39,8 +39,7 @@ POST_UNINSTALL = :
host_triplet = @host@
check_PROGRAMS = check_fixer$(EXEEXT)
subdir = libasn1fix
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- asn1fix_cws_l.c asn1fix_cws_y.c asn1fix_cws_y.h
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -56,7 +55,7 @@ am_libasn1fix_la_OBJECTS = asn1fix.lo asn1fix_misc.lo asn1fix_value.lo \
asn1fix_integer.lo asn1fix_crange.lo asn1fix_dereft.lo \
asn1fix_derefv.lo asn1fix_export.lo asn1fix_param.lo \
asn1fix_class.lo asn1fix_tags.lo asn1fix_enum.lo \
- asn1fix_cws_y.lo asn1fix_cws_l.lo asn1fix_constraint_compat.lo
+ asn1fix_cws.lo asn1fix_constraint_compat.lo
libasn1fix_la_OBJECTS = $(am_libasn1fix_la_OBJECTS)
check_fixer_SOURCES = check_fixer.c
check_fixer_OBJECTS = check_fixer.$(OBJEXT)
@@ -73,8 +72,7 @@ am__depfiles_maybe = depfiles
@AMDEP_TRUE@ ./$(DEPDIR)/asn1fix_constraint_compat.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/asn1fix_crange.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/asn1fix_cstring.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/asn1fix_cws_l.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/asn1fix_cws_y.Plo \
+@AMDEP_TRUE@ ./$(DEPDIR)/asn1fix_cws.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/asn1fix_dereft.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/asn1fix_derefv.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/asn1fix_enum.Plo \
@@ -94,11 +92,6 @@ LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
-LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
-LTLEXCOMPILE = $(LIBTOOL) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS)
-YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
-LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \
- $(AM_YFLAGS)
SOURCES = $(libasn1fix_la_SOURCES) check_fixer.c
DIST_SOURCES = $(libasn1fix_la_SOURCES) check_fixer.c
ETAGS = etags
@@ -217,8 +210,6 @@ AM_CFLAGS = @ADD_CFLAGS@
AM_CPPFLAGS = \
-I$(top_srcdir)/libasn1parser
-AM_YFLAGS = -p asn1fix_cws_ -d
-AM_LFLAGS = -sp -Cem -Pasn1fix_cws_ -olex.yy.c
noinst_LTLIBRARIES = libasn1fix.la
libasn1fix_la_LDFLAGS = -all-static
libasn1fix_la_SOURCES = \
@@ -241,7 +232,7 @@ libasn1fix_la_SOURCES = \
asn1fix_class.c asn1fix_class.h \
asn1fix_tags.c asn1fix_tags.h \
asn1fix_enum.c asn1fix_enum.h \
- asn1fix_cws_y.y asn1fix_cws_l.l \
+ asn1fix_cws.c asn1fix_cws.h \
asn1fix_constraint_compat.c
check_fixer_LDADD = $(noinst_LTLIBRARIES) \
@@ -253,7 +244,7 @@ TESTS = ${top_srcdir}/tests/*.asn1
all: all-am
.SUFFIXES:
-.SUFFIXES: .c .l .lo .o .obj .y
+.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -292,11 +283,6 @@ clean-noinstLTLIBRARIES:
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
-asn1fix_cws_y.h: asn1fix_cws_y.c
- @if test ! -f $@; then \
- rm -f asn1fix_cws_y.c; \
- $(MAKE) asn1fix_cws_y.c; \
- else :; fi
libasn1fix.la: $(libasn1fix_la_OBJECTS) $(libasn1fix_la_DEPENDENCIES)
$(LINK) $(libasn1fix_la_LDFLAGS) $(libasn1fix_la_OBJECTS) $(libasn1fix_la_LIBADD) $(LIBS)
@@ -325,8 +311,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asn1fix_constraint_compat.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asn1fix_crange.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asn1fix_cstring.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asn1fix_cws_l.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asn1fix_cws_y.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asn1fix_cws.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asn1fix_dereft.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asn1fix_derefv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asn1fix_enum.Plo@am__quote@
@@ -363,31 +348,6 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-.l.c:
- $(LEXCOMPILE) $<
- sed '/^#/ s|$(LEX_OUTPUT_ROOT)\.c|$@|' $(LEX_OUTPUT_ROOT).c >$@
- rm -f $(LEX_OUTPUT_ROOT).c
-
-.y.c:
- $(YACCCOMPILE) $<
- if test -f y.tab.h; then \
- to=`echo "$*_H" | sed \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
- -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; \
- sed "/^#/ s/Y_TAB_H/$$to/g" y.tab.h >$*.ht; \
- rm -f y.tab.h; \
- if cmp -s $*.ht $*.h; then \
- rm -f $*.ht ;\
- else \
- mv $*.ht $*.h; \
- fi; \
- fi
- if test -f y.output; then \
- mv y.output $*.output; \
- fi
- sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@t && mv $@t $@
- rm -f y.tab.c
-
mostlyclean-libtool:
-rm -f *.lo
@@ -576,9 +536,6 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
- -rm -f asn1fix_cws_y.c
- -rm -f asn1fix_cws_y.h
- -rm -f asn1fix_cws_l.c
clean: clean-am
clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
diff --git a/libasn1fix/asn1fix.c b/libasn1fix/asn1fix.c
index 44dbf0eb..dbe18c21 100644
--- a/libasn1fix/asn1fix.c
+++ b/libasn1fix/asn1fix.c
@@ -223,6 +223,11 @@ asn1f_fix_module__phase_1(arg_t *arg) {
RET2RVAL(ret, rvalue);
/*
+ * Parse WITH SYNTAX in CLASSes.
+ */
+ ret = asn1f_parse_class_with_syntax(arg);
+
+ /*
* Resolve references in constraints.
*/
ret = asn1f_recurse_expr(arg, asn1f_resolve_constraints);
diff --git a/libasn1fix/asn1fix_class.c b/libasn1fix/asn1fix_class.c
index 11acd8b4..bb24a16c 100644
--- a/libasn1fix/asn1fix_class.c
+++ b/libasn1fix/asn1fix_class.c
@@ -64,3 +64,17 @@ asn1f_class_access(arg_t *arg, asn1p_module_t *mod, asn1p_ref_t *ref) {
return NULL;
}
+
+
+int
+asn1f_parse_class_with_syntax(arg_t *arg) {
+ asn1p_expr_t *expr = arg->expr;
+
+ if(expr->expr_type != A1TC_CLASSDEF
+ || expr->with_syntax == NULL)
+ return 0;
+
+ DEBUG("Class %s: checking WITH SYNTAX", expr->Identifier);
+
+ return 0;
+}
diff --git a/libasn1fix/asn1fix_class.h b/libasn1fix/asn1fix_class.h
index 763e48cf..b8a6e78f 100644
--- a/libasn1fix/asn1fix_class.h
+++ b/libasn1fix/asn1fix_class.h
@@ -12,4 +12,10 @@ asn1p_expr_t *asn1f_class_access(arg_t *, asn1p_module_t *mod, asn1p_ref_t *);
asn1p_expr_t *asn1f_class_access2(asn1p_t *asn, asn1p_module_t *mod,
asn1p_expr_t *expr, asn1p_ref_t *);
+/*
+ * CLASS may contain the "WITH SYNTAX" clause, in which case we are
+ * going to parse it.
+ */
+int asn1f_parse_class_with_syntax(arg_t *arg);
+
#endif /* _ASN1FIX_CLASS_H_ */
diff --git a/libasn1fix/asn1fix_cws.c b/libasn1fix/asn1fix_cws.c
index 2a629e92..6a8abf9f 100644
--- a/libasn1fix/asn1fix_cws.c
+++ b/libasn1fix/asn1fix_cws.c
@@ -1 +1,2 @@
#include "asn1fix_internal.h"
+#include "asn1fix_cws.h"
diff --git a/libasn1fix/asn1fix_cws.h b/libasn1fix/asn1fix_cws.h
index a134e532..75f78307 100644
--- a/libasn1fix/asn1fix_cws.h
+++ b/libasn1fix/asn1fix_cws.h
@@ -1,24 +1,4 @@
#ifndef _ASN1FIX_CLASS_WITH_SYNTAX_H_
#define _ASN1FIX_CLASS_WITH_SYNTAX_H_
-/*
- * This structure describes the "WITH SYNTAX" clause of a CLASS.
- */
-typedef struct asn1f_cws_syntax_list_s {
- struct asn1f_cws_spec **cwspecs;
- int cwcount; /* Number of pieces of CWS information */
-} asn1f_cws_syntax_list_t;
-
-struct asn1f_cws_spec {
- enum {
- CWS_LITERAL,
- CWS_FIELD,
- CWS_OPTIONALGROUP
- } type;
- union {
- char *token; /* For CWSB_LITERAL & CWSB_FIELD */
- asn1f_cws_syntax_list_t *syntax;
- } content;
-};
-
#endif /* _ASN1FIX_CLASS_WITH_SYNTAX_H_ */