scenic.simulators.webots.world_parser

Parser for WBT files using ANTLR.

The ANTLR parser itself, consisting of the WBTLexer.py, WBTParser.py, and WBTVisitor.py files, is autogenerated from WBT.g4.

Summary of Module Members

Functions

findNodeTypesIn

Find all nodes of the given types in a world

parse

Parse a world from a WBT file

Classes

ErrorReporter

ANTLR listener for reporting parse errors

Evaluator

Constructs an object representing the given value from the parse tree

Node

A generic VRML node

Member Details

class Node(nodeType, attrs)[source]

Bases: object

A generic VRML node

class ErrorReporter[source]

Bases: antlr4.error.ErrorListener.ErrorListener

ANTLR listener for reporting parse errors

class Evaluator(nodeClasses)[source]

Bases: scenic.simulators.webots.WBTVisitor.WBTVisitor

Constructs an object representing the given value from the parse tree

parse(path)[source]

Parse a world from a WBT file

findNodeTypesIn(types, world, nodeClasses={})[source]

Find all nodes of the given types in a world