Add a placeholder for doing parser-recovery tests
This commit is contained in:
parent
ebb28c3ae6
commit
b0a467eda2
|
@ -3,7 +3,7 @@
|
|||
//! FatalError, Error>.
|
||||
|
||||
use super::*;
|
||||
use ::result_extended::{error, fatal, ok, return_error, return_fatal, Result};
|
||||
use ::result_extended::{error, fatal, ok, return_fatal, Result};
|
||||
use std::collections::HashMap;
|
||||
|
||||
pub struct DB(HashMap<String, i8>);
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
//! Let's figure out a recovery mechanism in terms of a parser. For this example I'm going to
|
||||
//! assume an SGF parser in which a player's rank is specified in some non-standard, but still
|
||||
//! somewhat comprehensible, way.
|
||||
//!
|
||||
//! Correct: 5d
|
||||
//! Incorrect, but recoverable: 5 Dan
|
||||
//!
|
||||
//! In strict mode, the incorrect one would be rejected. In permissive mode, the incorrect one
|
||||
//! would be corrected. I don't know that this actually makes any sense in this context, though.
|
Loading…
Reference in New Issue