Browse Source

[4088] Some trivial fixes

Francis Dupont 9 years ago
parent
commit
7a4fd5ace0
4 changed files with 13 additions and 12 deletions
  1. 2 1
      configure.ac
  2. 2 2
      src/lib/eval/Makefile.am
  3. 8 8
      src/lib/eval/eval.dox
  4. 1 1
      src/lib/eval/eval_context.h

+ 2 - 1
configure.ac

@@ -1299,9 +1299,10 @@ EOF
 
 
     if test $? -ne 0 ; then
     if test $? -ne 0 ; then
         $YACC -V
         $YACC -V
+        $RM -f bisontest.y bisontest.cc
         AC_MSG_ERROR("Error with $YACC. Possibly incorrect version? Required at least 3.0.0.")
         AC_MSG_ERROR("Error with $YACC. Possibly incorrect version? Required at least 3.0.0.")
     fi
     fi
-    rm -f bisontest.y bisontest.cc
+    $RM -f bisontest.y bisontest.cc
 fi
 fi
 
 
 AC_ARG_ENABLE(generate_docs, [AC_HELP_STRING([--enable-generate-docs],
 AC_ARG_ENABLE(generate_docs, [AC_HELP_STRING([--enable-generate-docs],

+ 2 - 2
src/lib/eval/Makefile.am

@@ -68,7 +68,7 @@ parser: lexer.cc location.hh position.hh stack.hh parser.cc parser.h
 
 
 # --- Flex/Bison stuff below --------------------------------------------------
 # --- Flex/Bison stuff below --------------------------------------------------
 location.hh position.hh stack.hh parser.cc parser.h: parser.yy
 location.hh position.hh stack.hh parser.cc parser.h: parser.yy
-	$(YACC) --defines=parser.h -oparser.cc parser.yy
+	$(YACC) --defines=parser.h -o parser.cc parser.yy
 
 
 lexer.cc: lexer.ll
 lexer.cc: lexer.ll
-	$(LEX) -olexer.cc lexer.ll
+	$(LEX) -o lexer.cc lexer.ll

+ 8 - 8
src/lib/eval/eval.dox

@@ -28,7 +28,7 @@
   Internally, the parser code is generated by flex and bison. Those two
   Internally, the parser code is generated by flex and bison. Those two
   tools convert lexer.ll and parser.yy files into a number of .cc and .hh files.
   tools convert lexer.ll and parser.yy files into a number of .cc and .hh files.
   To avoid adding flex and bison as dependencies, the result of the
   To avoid adding flex and bison as dependencies, the result of the
-  generation is checked into the github repo and is distributted in the
+  generation is checked into the github repository and is distributed in the
   tarballs.
   tarballs.
 
 
   @section dhcpEvalLexer Lexer generation using flex
   @section dhcpEvalLexer Lexer generation using flex
@@ -37,14 +37,14 @@
   data into a series of tokens. It contains a small number of directives,
   data into a series of tokens. It contains a small number of directives,
   but the majority of the code consists of a definition of tokens. These
   but the majority of the code consists of a definition of tokens. These
   are regular expressions that define various tokens, e.g. strings,
   are regular expressions that define various tokens, e.g. strings,
-  numbers, parentheses etc. Once the expression is matched, the associated
-  code is called. In majority of the cases a generator method from
+  numbers, parentheses, etc. Once the expression is matched, the associated
+  action is executed. In majority of the cases a generator method from
   @ref isc::eval::EvalParser is called. It returns newly created
   @ref isc::eval::EvalParser is called. It returns newly created
   bison tokens. The purpose of the lexer is to generate a stream
   bison tokens. The purpose of the lexer is to generate a stream
   of tokens that are consumed by the parser.
   of tokens that are consumed by the parser.
 
 
   lexer.cc and lexer.hh files must not be edited. In case there is a need
   lexer.cc and lexer.hh files must not be edited. In case there is a need
-  to introduce changes, lexer.ll must be updated and the .cc .hh files
+  to introduce changes, lexer.ll must be updated and the .cc and .hh files
   regenerated.
   regenerated.
 
 
   @section dhcpEvalParser Parser generation using bison
   @section dhcpEvalParser Parser generation using bison
@@ -81,9 +81,9 @@ This code determines that the grammar starts from expression (line 1).
 The actual definition of expression (lines 3-5) may either be a
 The actual definition of expression (lines 3-5) may either be a
 single token or an expression token equals token. Token is further
 single token or an expression token equals token. Token is further
 defined in lines 7-15: it may either be a string (lines 8-11) or option
 defined in lines 7-15: it may either be a string (lines 8-11) or option
-(lines 12-15). When the actual case is defined, respective C++ code
-is called. For example, TokenString class is instantiated with
-appropriate values and put onto the expression stack.
+(lines 12-15). When the actual case is defined, respective C++ action
+is executed. For example, TokenString class is instantiated with
+appropriate values and put onto the expression vector.
 
 
 @section dhcpEvalMakefile Generating parser files
 @section dhcpEvalMakefile Generating parser files
 
 
@@ -110,7 +110,7 @@ appropriate values and put onto the expression stack.
  Since the flex/bison tools are not necessary for a regular compilation,
  Since the flex/bison tools are not necessary for a regular compilation,
  there are checks conducted during configure, but lack of flex or
  there are checks conducted during configure, but lack of flex or
  bison tools does not stop the configure process. There is a flag
  bison tools does not stop the configure process. There is a flag
- --enable-generate-parser that tells configure script that the
+ \--enable-generate-parser that tells configure script that the
  parser will be generated. With this flag, the checks for flex/bison
  parser will be generated. With this flag, the checks for flex/bison
  are mandatory. Any missing or too old flex/bison will cause an
  are mandatory. Any missing or too old flex/bison will cause an
  error.
  error.

+ 1 - 1
src/lib/eval/eval_context.h

@@ -87,4 +87,4 @@ public:
     bool trace_parsing_;
     bool trace_parsing_;
   
   
 };
 };
-#endif // ! EVALCONTEXT_HH
+#endif // ! EVALCONTEXT_H