Skip to content

Implement ECMA262 RegExp builtin object and RegExp engine #27

Closed
@LaszloLango

Description

@LaszloLango

Related ECMA2626 section: http://www.ecma-international.org/ecma-262/5.1/#sec-15.10.3

  • Regexp Builtin components
    • Register the RegExp built-in object.
    • RegExp(..)
      • RegExp(pattern)
      • RegExp(pattern, flag)
      • RegExp(RegExp)
    • new RegExp(..)
      • RegExp(pattern)
      • RegExp(pattern, flag)
      • RegExp(RegExp)
    • RegExp.prototype
    • RegExp.prototype.constructor
    • RegExp.prototype.exec(..)
    • RegExp.prototype.test(..)
    • RegExp.prototype.toString(..)
    • RegExp.source
    • RegExp.global
    • RegExp.ignoreCase
    • RegExp.multiline
    • RegExp.lastIndex
  • Implement RegExp bytecode storage
    • Requirements
      • Resize automatically when it is needed
      • Append and insert uint32 and uint8
      • Read uint32 and uint8
      • Advance in bytecode while reading
      • Dump container (for debug)
  • Compile RegExp bytecode
    • Compile RegExp pattern to an internal bytecode to be able to run it efficiently.
      • Disjunction
      • Alternative
      • Assertion
      • Atom
      • Quantifier
  • Execute RegExp
    • Read the compiled bytecode and try to match.
      • Disjunction
      • Alternative
      • Assertion
      • Atom
        • PatternCharacter
        • .
        • \ AtomEscape
        • CharacterClass
      • Quantifier
      • Handle flags (depends on Unicode support #49)
        • Global
        • IgnoreCase
        • Multiline
      • Set lastIndex property
      • Set properties of the returned array object
  • Parse RegularExpressionLiterals and create a RegExp object.

Metadata

Metadata

Assignees

Labels

developmentFeature implementationecma builtinsRelated to ECMA built-in routinesparserRelated to the JavaScript parser

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions