Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yaml-cpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
yaml-cpp
Commits
31f7db5a
Commit
31f7db5a
authored
Jun 26, 2008
by
Jesse Beder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More simple scalar scanning.
parent
a3961d04
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
159 additions
and
204 deletions
+159
-204
document.cpp
+2
-1
exceptions.h
+1
-0
scanner.cpp
+149
-197
scanner.h
+6
-5
token.h
+1
-1
No files found.
document.cpp
View file @
31f7db5a
...
@@ -36,8 +36,9 @@ namespace YAML
...
@@ -36,8 +36,9 @@ namespace YAML
try
{
try
{
scanner
.
Scan
();
scanner
.
Scan
();
}
catch
(
const
UnknownToke
n
&
e
)
{
}
catch
(
const
Exceptio
n
&
e
)
{
}
}
getchar
();
// if(!scanner)
// if(!scanner)
// return;
// return;
...
...
exceptions.h
View file @
31f7db5a
...
@@ -11,4 +11,5 @@ namespace YAML
...
@@ -11,4 +11,5 @@ namespace YAML
class
IllegalMapKey
:
public
Exception
{};
class
IllegalMapKey
:
public
Exception
{};
class
IllegalMapValue
:
public
Exception
{};
class
IllegalMapValue
:
public
Exception
{};
class
IllegalScalar
:
public
Exception
{};
class
IllegalScalar
:
public
Exception
{};
class
IllegalTabInScalar
:
public
Exception
{};
}
}
scanner.cpp
View file @
31f7db5a
This diff is collapsed.
Click to expand it.
scanner.h
View file @
31f7db5a
...
@@ -43,13 +43,14 @@ namespace YAML
...
@@ -43,13 +43,14 @@ namespace YAML
private
:
private
:
char
GetChar
();
char
GetChar
();
void
Eat
(
int
n
=
1
);
std
::
string
Peek
(
int
n
);
void
EatLineBreak
();
void
EatLineBreak
();
void
EatDocumentStart
();
void
EatDocumentEnd
();
bool
IsWhitespaceToBeEaten
();
bool
IsWhitespaceToBeEaten
(
char
ch
);
bool
IsLineBreak
();
bool
IsLineBreak
(
char
ch
);
bool
IsBlank
();
bool
IsBlank
(
char
ch
);
bool
IsDocumentStart
();
bool
IsDocumentStart
();
bool
IsDocumentEnd
();
bool
IsDocumentEnd
();
bool
IsBlockEntry
();
bool
IsBlockEntry
();
...
...
token.h
View file @
31f7db5a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
namespace
YAML
namespace
YAML
{
{
class
Token
{};
class
Token
{
public
:
virtual
~
Token
()
{}
};
class
StreamStartToken
:
public
Token
{};
class
StreamStartToken
:
public
Token
{};
class
StreamEndToken
:
public
Token
{};
class
StreamEndToken
:
public
Token
{};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment