P4C
The P4 Compiler
Loading...
Searching...
No Matches
simplifyParsers.h
1/*
2 * Copyright 2016 VMware, Inc.
3 * SPDX-FileCopyrightText: 2016 VMware, Inc.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
8#ifndef FRONTENDS_P4_SIMPLIFYPARSERS_H_
9#define FRONTENDS_P4_SIMPLIFYPARSERS_H_
10
11#include "ir/ir.h"
12
13namespace P4 {
14
27class SimplifyParsers : public Transform {
28 public:
29 SimplifyParsers() { setName("SimplifyParsers"); }
30
31 const IR::Node *preorder(IR::P4Parser *parser) override;
32 const IR::Node *preorder(IR::P4Control *control) override {
33 prune();
34 return control;
35 }
36};
37
38} // namespace P4
39
40#endif /* FRONTENDS_P4_SIMPLIFYPARSERS_H_ */
Definition node.h:53
Definition visitor.h:442
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:13