Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
oga
oga
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 9
    • Issues 9
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Yorick Peterse
  • ogaoga
  • Issues
  • #20

Closed
Open
Opened May 14, 2014 by Yorick Peterse@yorickpeterse
  • Report abuse
  • New issue
Report abuse New issue

Syntax Error Handling

Oga should be capable of dealing with invalid XML/HTML up to a certain extend. To deal with this an input correction system would have to be implemented at the lowest level possible.

Initially I thought about implementing this between the lexer and the parser. The problem however is is that tokens from the lexer are emitted one by one instead as a whole. As a result of this you can not keep track of what context you're currently in without hindering performance. An alternative solution is to do this on parser (Racc) level.

Regardless of where it takes place this system should be capable of correcting most common mistakes. However, I don't want to sacrifice too much for the sake of forgiving invalid input. In other words, there has to be a balance between forgivingness and correctness.

Related issues

Assignee
Assign to
1.0.0
Milestone
1.0.0
Assign milestone
Time tracking
None
Due date
No due date
3
Labels
Feature HTML XML
Assign labels
  • View project labels
Reference: yorickpeterse/oga#20