Expressive Compile-time Parsers
parsers • Reflection • Examples: functions, types, treesParser In a compiler: tokens -> parser -> syntax tree In a web browser: text -> JSON parser -> JS object parse(text or tokens) -> value or errorParser parse_string(text, pos) || parse_int(text, pos) parse_string_or_int -> parse_string | parse_int Simplified syntax:Parser Generators Create a parser from a grammar. Popular parsing algorithms used in generators in a way that communicates its purpose. Relies on both the syntax of the programming language and the quality of naming conventions.Syntax Evolution C++ 98: C++ 11: static const int arr[] = {1,2,30 码力 | 134 页 | 1.73 MB | 5 月前3MACRO-FREE TESTING WITH C++20
Terse syntax -> assertions.cpp:1:FAILED [1 == 2] 4 / 14ASSERTIONS - ASSERTIONS - HTTPS://GODBOLT.ORG/Z/JAFK8W HTTPS://GODBOLT.ORG/Z/JAFK8W 1_i == 2; // Terse syntax -> Expect syntax -> assertions.cpp:1:FAILED [2 == 1] 4 / 14ASSERTIONS - ASSERTIONS - HTTPS://GODBOLT.ORG/Z/JAFK8W HTTPS://GODBOLT.ORG/Z/JAFK8W 1_i == 2; // Terse syntax -> expect(2 == 1_i); // Expect syntax -> assertions.cpp:1:FAILED [2 == 1] expect(that % 1 == 2); // Matchers syntax -> assertions.cpp:1:FAILED [1 == 2] 4 / 14ASSERTIONS0 码力 | 53 页 | 1.98 MB | 5 月前3Conan 1.46 Documentation
. . . . . . . . . . . . . . . . . . . 870 23 Conan migration guide to 2.0 873 23.1 Update the syntax of your Conanfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 873 23.2 integrations with CMake, like the cmake_find_package generators, that will use the find_package() CMake syntax (see CMake section). 7. Now we are ready to build and run our MD5 app: (win) $ cmake .. -G "Visual method will create a conan_toolchain.cmake file that maps the Conan settings and options to CMake syntax. • The build() method uses the CMake wrapper to call CMake commands, it is a thin layer that will0 码力 | 893 页 | 7.46 MB | 1 年前3Conan 1.56 Documentation
[-pr:h=host_ ˓→profile] conan graph info This is the substitute of the old “conan info”. The syntax is very similar to conan install and conan create $ conan graph info . [--name=mylib] [--version=1 integrations with CMake, like the cmake_find_package generators, that will use the find_package() CMake syntax (see CMake section). 7. Now we are ready to build and run our MD5 app: (win) $ cmake .. -G "Visual method will create a conan_toolchain.cmake file that maps the Conan settings and options to CMake syntax. • The build() method uses the CMake wrapper to call CMake commands, it is a thin layer that will0 码力 | 963 页 | 7.67 MB | 1 年前3Conan 1.55 Documentation
[-pr:h=host_ ˓→profile] conan graph info This is the substitute of the old “conan info”. The syntax is very similar to conan install and conan create $ conan graph info . [--name=mylib] [--version=1 integrations with CMake, like the cmake_find_package generators, that will use the find_package() CMake syntax (see CMake section). 7. Now we are ready to build and run our MD5 app: (win) $ cmake .. -G "Visual method will create a conan_toolchain.cmake file that maps the Conan settings and options to CMake syntax. • The build() method uses the CMake wrapper to call CMake commands, it is a thin layer that will0 码力 | 963 页 | 7.67 MB | 1 年前3Conan 1.53 Documentation
[-pr:h=host_ ˓→profile] conan graph info This is the substitute of the old “conan info”. The syntax is very similar to conan install and conan create $ conan graph info . [--name=mylib] [--version=1 integrations with CMake, like the cmake_find_package generators, that will use the find_package() CMake syntax (see CMake section). 7. Now we are ready to build and run our MD5 app: (win) $ cmake .. -G "Visual method will create a conan_toolchain.cmake file that maps the Conan settings and options to CMake syntax. • The build() method uses the CMake wrapper to call CMake commands, it is a thin layer that will0 码力 | 953 页 | 7.64 MB | 1 年前3Conan 1.54 Documentation
[-pr:h=host_ ˓→profile] conan graph info This is the substitute of the old “conan info”. The syntax is very similar to conan install and conan create $ conan graph info . [--name=mylib] [--version=1 integrations with CMake, like the cmake_find_package generators, that will use the find_package() CMake syntax (see CMake section). 7. Now we are ready to build and run our MD5 app: (win) $ cmake .. -G "Visual method will create a conan_toolchain.cmake file that maps the Conan settings and options to CMake syntax. • The build() method uses the CMake wrapper to call CMake commands, it is a thin layer that will0 码力 | 953 页 | 7.65 MB | 1 年前3Conan 1.51 Documentation
[-pr:h=host_ ˓→profile] conan graph info This is the substitute of the old “conan info”. The syntax is very similar to conan install and conan create $ conan graph info . [--name=mylib] [--version=1 integrations with CMake, like the cmake_find_package generators, that will use the find_package() CMake syntax (see CMake section). 7. Now we are ready to build and run our MD5 app: (win) $ cmake .. -G "Visual method will create a conan_toolchain.cmake file that maps the Conan settings and options to CMake syntax. • The build() method uses the CMake wrapper to call CMake commands, it is a thin layer that will0 码力 | 933 页 | 7.58 MB | 1 年前3Conan 1.52 Documentation
Documentation, Release 1.52.0 conan graph info This is the substitute of the old “conan info”. The syntax is very similar to conan install and conan create $ conan graph info . [--name=mylib] [--version=1 integrations with CMake, like the cmake_find_package generators, that will use the find_package() CMake syntax (see CMake section). 7. Now we are ready to build and run our MD5 app: (win) $ cmake .. -G "Visual method will create a conan_toolchain.cmake file that maps the Conan settings and options to CMake syntax. • The build() method uses the CMake wrapper to call CMake commands, it is a thin layer that will0 码力 | 943 页 | 7.62 MB | 1 年前3Conan 1.47 Documentation
integrations with CMake, like the cmake_find_package generators, that will use the find_package() CMake syntax (see CMake section). 7. Now we are ready to build and run our MD5 app: (win) $ cmake .. -G "Visual method will create a conan_toolchain.cmake file that maps the Conan settings and options to CMake syntax. • The build() method uses the CMake wrapper to call CMake commands, it is a thin layer that will is important as it describes the package contents in a generic way with a pretty straight- forward syntax that can later be translated to a suitable format. The advantage of having this information here0 码力 | 907 页 | 7.50 MB | 1 年前3
共 144 条
- 1
- 2
- 3
- 4
- 5
- 6
- 15