alaCarte Maps
Renderer for OpenStreetMap tiles
eval_grammar.hpp
Go to the documentation of this file.
1 
21 #pragma once
22 #ifndef _EVAL_GRAMMAR_HPP
23 #define _EVAL_GRAMMAR_HPP
24 
25 
26 #include "mapcss_def.hpp"
27 #include "server/eval/eval.hpp"
28 #include "server/eval/stnode.hpp"
29 
30 
31 
32 namespace eval {
33 
38 struct EvalGrammer : public qi::grammar<GrammarIterator, STNode::node_ptr(), chs::space_type>
39 {
43  typedef chs::space_type Skipper;
44 
45 
46  EvalGrammer();
47 
48 
50  qi::rule<ItType, string()> rule_string;
51 
53  qi::rule<ItType, STNode::node_ptr(), Skipper> rule_func_expr;
55  qi::rule<ItType, STNode::node_ptr(), Skipper> rule_lvl4_expr;
57  qi::rule<ItType, STNode::node_ptr(), Skipper> rule_lvl3_expr;
59  qi::rule<ItType, STNode::node_ptr(), Skipper> rule_lvl2_expr;
61  qi::rule<ItType, STNode::node_ptr(), Skipper> rule_lvl1_expr;
62 };
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 }
73 
74 
75 
76 
77 #endif
Grammar used to parse eval expressions.
qi::rule< ItType, STNode::node_ptr(), Skipper > rule_lvl2_expr
rule for lvl 2 operations
qi::rule< ItType, string()> rule_string
rule for a simple string
GrammarIterator ItType
Type of the iterator used to parse the grammar.
classic::position_iterator2< StringIterator > GrammarIterator
Iterator wrapping the file iterator and to be used in all grammars.
Definition: mapcss_def.hpp:148
qi::rule< ItType, STNode::node_ptr(), Skipper > rule_func_expr
rule for function expressions
qi::rule< ItType, STNode::node_ptr(), Skipper > rule_lvl1_expr
rule for lvl 1 operations
This file is part of alaCarte.
chs::space_type Skipper
Type of the skipper used by this grammar.
qi::rule< ItType, STNode::node_ptr(), Skipper > rule_lvl4_expr
rule for lvl 4 operations
qi::rule< ItType, STNode::node_ptr(), Skipper > rule_lvl3_expr
rule for lvl 3 operations
EvalGrammer()
Creates an eval grammar.