Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(11)  |  Call(7)  |  Derive(0)  |  Import(4)

src/m/i/MiniParse-0.2.0/MiniParse/Meta/Grammars/HandWrittenEbnf/Parser.py   MiniParse(Download)
# You should have received a copy of the GNU Lesser General Public License along with MiniParse.  If not, see <http://www.gnu.org/licenses/>.
 
from MiniParse import LiteralParser, SequenceParser, AlternativeParser, OptionalParser, RepeatedParser, parse
 
import Tokens as Tok
                    syntacticTerm,
                    RepeatedParser(
                        SequenceParser(
                            [LiteralParser(Tok.Concatenate), syntacticTerm],
                            lambda s, d: d
                    singleDefinition,
                    RepeatedParser(
                        SequenceParser(
                            [LiteralParser(Tok.DefinitionSeparator), singleDefinition],
                            lambda s, d: d
 
            # 4.2
            syntax = RepeatedParser(syntaxRule, builder.makeSyntax)
 
        self.internal = Internal

src/m/i/MiniParse-0.2.0/MiniParse/Core/tests/CustomizedValue.py   MiniParse(Download)
import MockMockMock
 
from MiniParse import LiteralParser, SequenceParser, AlternativeParser, OptionalParser, RepeatedParser
from Framework import ParserTestCase
 
    def testRepetition(self):
        self.p = RepeatedParser(LiteralParser(42), match=self.match.object)
        self.match.expect([42, 42]).andReturn(43)
        self.expectSuccess([42, 42], 43)
 

src/m/i/MiniParse-0.2.0/MiniParse/Core/tests/MinimalArithmetic.py   MiniParse(Download)
import unittest
 
from MiniParse import OptionalParser, SequenceParser, AlternativeParser, LiteralParser, RepeatedParser
 
from Framework import ParserTestCase
        term = SequenceParser([
            factor,
            RepeatedParser(SequenceParser([
                LiteralParser("*"),
                factor
        expr = SequenceParser([
            term,
            RepeatedParser(SequenceParser([
                LiteralParser("+"),
                term

src/m/i/MiniParse-0.2.0/MiniParse/Core/tests/StockParsers.py   MiniParse(Download)
import unittest
 
from MiniParse import LiteralParser, SequenceParser, AlternativeParser, OptionalParser, RepeatedParser
from Framework import ParserTestCase
 
    def setUp(self):
        self.p = RepeatedParser(LiteralParser(42))
 
    def testSuccess0(self):
        self.expectSuccess([], [])