From 8db0ab3c511e1bed09e040908406891978338c49 Mon Sep 17 00:00:00 2001 From: amarjeetkapoor1 Date: Tue, 14 Jun 2016 19:59:07 +0530 Subject: [PATCH] comment parser interfaced although not oworking --- src/annotation.cc | 8 ++++++++ src/comment_parser.y | 10 +++++++--- src/parser.y | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/annotation.cc b/src/annotation.cc index 451a1447..743fc546 100644 --- a/src/annotation.cc +++ b/src/annotation.cc @@ -29,6 +29,8 @@ #include "expression.h" #include "context.h" #include "evalcontext.h" + +extern AssignmentList * parser(const char *text); #include #include using namespace boost::assign; // bring 'operator+=()' into scope @@ -44,6 +46,12 @@ Annotation::~Annotation() const Annotation * Annotation::create(const std::string name, const AssignmentList assignments) { + AssignmentList *assignment; + if (name == "DParameter") { + assignment=parser("[12:34]"); + return create("Parameter",*assignment); + } + AssignmentList args; if (name == "Description") { args += Assignment("text"); diff --git a/src/comment_parser.y b/src/comment_parser.y index dc7101f9..db555c5b 100644 --- a/src/comment_parser.y +++ b/src/comment_parser.y @@ -9,6 +9,7 @@ void yyerror(char *); int yylex(void); AssignmentList *argument; + extern const char *parser_input_buffer; %} %union { char *text; @@ -19,6 +20,7 @@ }; + %token NUM %token WORD %type expr @@ -107,7 +109,9 @@ void yyerror(char *s) { cout<