Comments (2)
from goparsec.
The only way I found how to report errors is:
scanner := p.NewScanner([]byte(str))
result, next := parser(scanner)
if !next.Endof() {
return fmt.Errorf("failed to parse '%s' char number %d", str, next.GetCursor())
}
from goparsec.
Related Issues (20)
- Implement Atom() parser similar to Token().
- Remove TokenWS() and add TokenStrict(). HOT 1
- Update SimpleScanner to track line-numbers.
- Rename TokenStrict to TokenExact.
- Benchmark with similar parser libraries.
- Allow Nodify functions to decide a match.
- Feature Request: Expose ability to set whitespace pattern for SimpleScanner.SkipWS() HOT 6
- AST Terminals and Non-Terminals.
- AST Query. HOT 1
- AST: Implement End, NoEnd, String parser that confirm to Queryable.
- AST Method: GetValue() to get back the parsed text from syntax-tree.
- AST method: Dotstring() in graphviz's dot file format for visual syntax-tree.
- AST method: Prettyprint() for debugging syntax tree.
- AST: enable console logging in debug mode.
- Thoughts on an assertion library? HOT 1
- Minor: Comments are wrong in JSON example
- NewScanner with SetWsPattern does not skip whitespace when used with And
- And(x, Maybe(And(y, z))) is broken
- Project status; Panic in parsec.String() with unterminated string HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goparsec.