Sync with 5.1.0
[deliverable/titan.core.git] / common / pattern.hh
1 ///////////////////////////////////////////////////////////////////////////////
2 // Copyright (c) 2000-2014 Ericsson Telecom AB
3 // All rights reserved. This program and the accompanying materials
4 // are made available under the terms of the Eclipse Public License v1.0
5 // which accompanies this distribution, and is available at
6 // http://www.eclipse.org/legal/epl-v10.html
7 ///////////////////////////////////////////////////////////////////////////////
8 #ifndef _common_pattern_HH
9 #define _common_pattern_HH
10
11 #ifndef __GNUC__
12 /** If a C compiler other than GCC is used the macro below will substitute all
13 * GCC-specific non-standard attributes with an empty string. */
14 #ifndef __attribute__
15 #define __attribute__(arg)
16 #endif
17 #endif
18
19 /** This is the interface for pattern. This function converts a TTCN-3
20 * charstring pattern to a POSIX Extended Regular Expression (ERE).
21 * If error occurs, returns a NULL-pointer. It uses the
22 * TTCN_pattern_error() and TTCN_pattern_warning() functions to
23 * report errors/warnings. */
24 extern char* TTCN_pattern_to_regexp(const char* p_pattern);
25
26 extern char* TTCN_pattern_to_regexp_uni(const char* p_pattern,
27 int** groups = 0);
28
29 /* defined elsewhere (can be different in compiler/runtime) */
30
31 extern void TTCN_pattern_error(const char *fmt_str, ...)
32 __attribute__ ((__format__ (__printf__, 1, 2)));
33 extern void TTCN_pattern_warning(const char *fmt_str, ...)
34 __attribute__ ((__format__ (__printf__, 1, 2)));
35
36 #endif /* _common_pattern_HH */
This page took 0.063981 seconds and 5 git commands to generate.