diff --git a/re2/filtered_re2.cc b/re2/filtered_re2.cc index a025cc57c9b781fba8956f2f5aa80175e08c22ad..0f0f35e6a4bbe2deded5447497419f56989c6dc8 100644 --- a/re2/filtered_re2.cc +++ b/re2/filtered_re2.cc @@ -1,6 +1,17 @@ -// Copyright 2009 The RE2 Authors. All Rights Reserved. -// Use of this source code is governed by a BSD-stylePrefilter -// license that can be found in the LICENSE file. +/****************************************************************************** + * Copyright (c) USTC(Suzhou) & Huawei Technologies Co., Ltd. 2022. All rights reserved. + * re2-rust licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR + * PURPOSE. + * See the Mulan PSL v2 for more details. + * Author: mengning, liuzhitao, yangwentong + * Create: 2022-06-21 + * Description: Interface implementation in filtered_re2.h. + ******************************************************************************/ #include #include #include diff --git a/re2/re2.cc b/re2/re2.cc index b406a77655fa2ffe89467246ea990c098dc8a452..4734a3cf93addc9041a9668fd34ab5f26c805709 100644 --- a/re2/re2.cc +++ b/re2/re2.cc @@ -1,11 +1,17 @@ -// Copyright 2003-2009 The RE2 Authors. All Rights Reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Regular expression interface RE2. -// -// Originally the PCRE C++ wrapper, but adapted to use -// the new automata-based regular expression engines. +/****************************************************************************** + * Copyright (c) USTC(Suzhou) & Huawei Technologies Co., Ltd. 2022. All rights reserved. + * re2-rust licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR + * PURPOSE. + * See the Mulan PSL v2 for more details. + * Author: mengning, liuzhitao, yangwentong + * Create: 2022-06-21 + * Description: Interface implementation in re2.h. + ******************************************************************************/ #include "re2/re2.h" #include diff --git a/re2/regex_internal.h b/re2/regex_internal.h index a05c1e6ed856d007d7269c7c7e3e1b9bd23477ef..b79231cacddd2eb7f0c25e658d63c34b90d11948 100644 --- a/re2/regex_internal.h +++ b/re2/regex_internal.h @@ -1,3 +1,18 @@ +/****************************************************************************** + * Copyright (c) USTC(Suzhou) & Huawei Technologies Co., Ltd. 2022. All rights reserved. + * re2-rust licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR + * PURPOSE. + * See the Mulan PSL v2 for more details. + * Author: mengning, liuzhitao, yangwentong + * Create: 2022-06-21 + * Description: . + ******************************************************************************/ + // #include "re2/sparse_array.h" #include "regex-capi/include/rure.h" namespace re2 { diff --git a/re2/set.cc b/re2/set.cc index a1c30fa3021f867fb9673ed5f47e3c1c783efe13..96ad1fc4a5d2403dbedd499f1616316f97acac70 100644 --- a/re2/set.cc +++ b/re2/set.cc @@ -1,6 +1,17 @@ -// Copyright 2010 The RE2 Authors. All Rights Reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. +/****************************************************************************** + * Copyright (c) USTC(Suzhou) & Huawei Technologies Co., Ltd. 2022. All rights reserved. + * re2-rust licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR + * PURPOSE. + * See the Mulan PSL v2 for more details. + * Author: mengning, liuzhitao, yangwentong + * Create: 2022-06-21 + * Description: Interface implementation in set.h. + ******************************************************************************/ #include "re2/set.h" diff --git a/regex-capi/include/rure.h b/regex-capi/include/rure.h index f51df71d3b6d505d7fa255a0faf0aba321d65394..286421ebcc900b03bcaeccd6aad77a96fabce726 100644 --- a/regex-capi/include/rure.h +++ b/regex-capi/include/rure.h @@ -1,3 +1,18 @@ +/****************************************************************************** + * Copyright (c) USTC(Suzhou) & Huawei Technologies Co., Ltd. 2022. All rights reserved. + * re2-rust licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR + * PURPOSE. + * See the Mulan PSL v2 for more details. + * Author: mengning, liuzhitao, yangwentong + * Create: 2022-06-21 + * Description: Rure.h is a C API. + ******************************************************************************/ + #pragma once #include diff --git a/regex-capi/src/rure.rs b/regex-capi/src/rure.rs index 4e81fdfcf64521e7aa352c30517a573d78ca73e2..84f93e9b30d2ebd01046033cd7d0b600241b3855 100644 --- a/regex-capi/src/rure.rs +++ b/regex-capi/src/rure.rs @@ -1,3 +1,17 @@ +/****************************************************************************** + * Copyright (c) USTC(Suzhou) & Huawei Technologies Co., Ltd. 2022. All rights reserved. + * re2-rust licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR + * PURPOSE. + * See the Mulan PSL v2 for more details. + * Author: mengning, liuzhitao, yangwentong + * Create: 2022-06-21 + * Description: Rure is a C API to Rust's regex library. + ******************************************************************************/ use std::collections::HashMap; use std::ffi::{CStr, CString}; use std::ops::Deref;