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]

A generic VRML node

class ErrorReporter[source]

Bases: ErrorListener

ANTLR listener for reporting parse errors

class Evaluator(nodeClasses)[source]

Bases: 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