pyrser/grammar.py
def parse_file(self, filename: str, entry: str=None) -> parsing.Node:
        """Parse filename using the grammar"""
        self.from_string = False
        import os.path
        with open(filename, 'r') as f:
            self.parsed_stream(f.read(), os.path.abspath(filename))
        if entry is None:
            entry = self.entry
        if entry is None:
            raise ValueError("No entry rule name defined for {}".format(
                self.__class__.__name__))
        return self._do_parse(entry)
def parse_file(self, filename: str, entry: str=None) -> parsing.Node:
        self.from_string = False
        import os.path
        with open(filename, 'r') as f:
            self.parsed_stream(f.read(), os.path.abspath(filename))
        if entry is None:
            entry = self.entry
        if entry is None:
            raise ValueError("No entry rule name defined for {}".format(
                self.__class__.__name__))
        return self._do_parse(entry)
def parse_file ( self , filename : str , entry : str = None ) -> parsing . Node : self . from_string = False import os . path with open ( filename , 'r' ) as f : self . parsed_stream ( f . read ( ) , os . path . abspath ( filename ) ) if entry is None : entry = self . entry if entry is None : raise ValueError ( "No entry rule name defined for {}" . format ( self . __class__ . __name__ ) ) return self . _do_parse ( entry )
Parse filename using the grammar
Parse filename using the grammar