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

All Samples(10)  |  Call(6)  |  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
            # 4.10
            syntacticPrimary = AlternativeParser(
                [
                    optionalSequence,
                    repeatedSequence,
            # 4.8
            syntacticFactor = AlternativeParser(
                [
                    SequenceParser(
                        [integer, LiteralParser(Tok.Repetition), syntacticPrimary],
            # 4.6 and 4.7
            syntacticTerm = AlternativeParser(
                [
                    SequenceParser(
                        [

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 testAlternativeParser(self):
        self.p = AlternativeParser([LiteralParser(42), LiteralParser(43)], match=self.match.object)
        self.match.expect(42).andReturn(43)
        self.expectSuccess([42], 43)
 

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 = AlternativeParser([
            SequenceParser([LiteralParser(42), LiteralParser(43)]),
            SequenceParser([LiteralParser(44), LiteralParser(45)]),
            SequenceParser([LiteralParser(46), LiteralParser(47)])
    def setUp(self):
        self.p = AlternativeParser([
            SequenceParser([LiteralParser(42), LiteralParser(43)]),
            SequenceParser([LiteralParser(42), LiteralParser(44), LiteralParser(45)]),
            LiteralParser(42)

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