AntlrParser

io.joern.rubysrc2cpg.astcreation.AntlrParser
class AntlrParser(filename: String)

A consumable wrapper for the RubyParser class used to parse the given file and be disposed thereafter. This includes a "hacky" recovery of the parser when unsupported constructs are encountered by simply not parsing those lines.

Value parameters

filename

the file path to the file to be parsed.

parsingTimeoutMs

grammar dependent, during development we may see input that would cause the parser to hang. To induce completion we need a timeout.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def parse(): Try[ProgramContext]

Concrete fields

val parser: RubyParser