mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 20:51:16 +00:00
Moved the input stream, together with line/column info, into its own class, which allowed some other stuff just to pass the stream, and not have to be a member of Scanner.
This commit is contained in:
16
main.cpp
16
main.cpp
@@ -3,22 +3,6 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
YAML::RegEx alpha = YAML::RegEx('a', 'z') || YAML::RegEx('A', 'Z');
|
||||
alpha.Matches("a");
|
||||
alpha.Matches("d");
|
||||
alpha.Matches("F");
|
||||
alpha.Matches("0");
|
||||
alpha.Matches("5");
|
||||
alpha.Matches(" ");
|
||||
|
||||
YAML::RegEx blank = YAML::RegEx(' ') || YAML::RegEx('\t');
|
||||
YAML::RegEx docstart = YAML::RegEx("---") + (blank || YAML::RegEx(EOF) || YAML::RegEx());
|
||||
docstart.Matches("--- ");
|
||||
docstart.Matches("... ");
|
||||
docstart.Matches("----");
|
||||
docstart.Matches("---\t");
|
||||
docstart.Matches("---");
|
||||
|
||||
YAML::Document doc("test.yaml");
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user