How to use the tatsu.parsing.tatsumasu function in TatSu

To help you get started, we’ve selected a few TatSu examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github neogeny / TatSu / examples / javascript / sandbojs / parser / js_parser.py View on Github external
    @tatsumasu()
    def _IDENTIFIER_(self):  # noqa
        self._pattern('[\\w$](?:[\\w\\d]|\\\\u[\\dA-Fa-f]{4})*')
github neogeny / TatSu / examples / calc / v2 / calc_parser.py View on Github external
    @tatsumasu()
    def _start_(self):
        self._expression_()
        self._check_eof()
github neogeny / TatSu / tatsu / bootstrap.py View on Github external
    @tatsumasu()
    def _term_(self):  # noqa
        with self._choice():
            with self._option():
                self._void_()
            with self._option():
                self._gather_()
            with self._option():
                self._join_()
            with self._option():
                self._left_join_()
            with self._option():
                self._right_join_()
            with self._option():
                self._group_()
            with self._option():
                self._empty_closure_()
github neogeny / TatSu / tatsu / bootstrap.py View on Github external
    @tatsumasu()
    def _kwparams_(self):  # noqa

        def sep0():
            self._token(',')

        def block0():
            self._pair_()
        self._positive_gather(block0, sep0)
github nitros12 / A-Compiler / wewv2_compiler / parser / parser.py View on Github external
    @tatsumasu()
    def _logical_(self):  # noqa
        with self._choice():
            with self._option():
                self._bitwise_()
            with self._option():
                self._boolean_()
            with self._option():
                self._comparison_()
            self._error('no available options')
github neogeny / TatSu / tatsu / bootstrap.py View on Github external
    @tatsumasu()
    def _string_(self):  # noqa
        self._STRING_()
github neogeny / TatSu / examples / javascript / sandbojs / parser / js_parser.py View on Github external
    @tatsumasu()
    def _iteration_statement_(self):  # noqa
        with self._choice():
            with self._option():
                self._token('do')
                self._statement_()
                self._token('while')
                self._token('(')
                self._expression_sequence_()
                self._token(')')
                self._eos_()
            with self._option():
                self._token('while')
                self._token('(')
                self._expression_sequence_()
                self._token(')')
                self._statement_()
github neogeny / TatSu / examples / javascript / sandbojs / parser / js_parser.py View on Github external
    @tatsumasu()
    def _default_clause_(self):  # noqa
        self._token('default')
        self._token(':')
        with self._optional():
            self._statement_list_()
github gvanrossum / pegen / tatsu / parse.py View on Github external
    @tatsumasu()
    def _BYTES_LITERAL_(self):  # noqa
        self._pattern("[bB][rR]?")
        with self._group():
            with self._choice():
                with self._option():
                    self._SHORT_BYTES_()
                with self._option():
                    self._LONG_BYTES_()
                self._error("no available options")
github gvanrossum / pegen / tatsu / parse.py View on Github external
    @tatsumasu()
    def _param_(self):  # noqa
        with self._choice():
            with self._option():
                self._NAME_()
            with self._option():
                self._token("*")
                self._NAME_()
            self._error("no available options")