Spicy
epsilon.h
1 // Copyright (c) 2020-2021 by the Zeek Project. See LICENSE for details.
2 
3 #pragma once
4 
5 #include <string>
6 #include <utility>
7 
8 #include <spicy/compiler/detail/codegen/production.h>
9 
11 
14 public:
15  Epsilon(Location l = location::None) : ProductionBase("<epsilon>", std::move(l)) {}
16 
17  bool nullable() const { return true; }
18  bool eodOk() const { return nullable(); }
19  bool atomic() const { return true; }
20  std::optional<spicy::Type> type() const { return {}; }
21  std::string render() const { return "()"; }
22 };
23 
24 } // namespace spicy::detail::codegen::production
Definition: production.h:170
Definition: grammar.h:15
Definition: production.h:23
Definition: location.h:18
ProductionBase(std::string symbol, Location l=location::None)
Definition: production.h:181