Fixed all of the syntax problems. Dealing with 3 bizarre linking problems now.
[fridhskrift.git] / lexer / group.cpp
blobad71fc16692cffc1cb1f7fc75dd85d72057c94d4
1 #include <fridh/lexer.hpp>
3 namespace fridh
5 bool get_lexeme_group(lexeme_type::type input, lexeme_group::type & output)
7 using namespace lexeme_type;
9 switch(input)
11 case name:
13 case boolean:
14 case signed_integer:
15 case unsigned_integer:
16 case floating_point_value:
17 case string:
18 output = lexeme_group::argument;
19 return true;
21 case addition:
22 case subtraction:
23 case multiplication:
24 case division:
25 case modulo:
26 case exponentiation:
28 case less_than:
29 case less_than_or_equal:
30 case greater_than:
31 case greater_than_or_equal:
32 case not_equal:
33 case equal:
35 case logical_and:
36 case logical_or:
38 case shift_left:
39 case shift_right:
41 case binary_and:
42 case binary_or:
43 case binary_xor:
45 output = lexeme_group::binary_operator;
46 return true;
48 case logical_not:
50 case binary_not:
52 case increment:
53 case decrement:
55 output = lexeme_group::unary_operator;
56 return true;
58 default:
59 return false;