This repo contains code to mirror other repos. It also contains the code that is getting mirrored.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

150 line
4.0 KiB

  1. # Examples formattet this way:
  2. # "name": ("grammar", "demo-input")
  3. examples = {
  4. # --- hello.lark ---
  5. "hello.lark": ("""
  6. start: WORD "," WORD "!"
  7. %import common.WORD // imports from terminal library
  8. %ignore " " // Disregard spaces in text
  9. """, "Hello, World!"),
  10. # --- calc.lark ---
  11. "calc.lark": ("""
  12. ?start: sum
  13. | NAME "=" sum -> assign_var
  14. ?sum: product
  15. | sum "+" product -> add
  16. | sum "-" product -> sub
  17. ?product: atom
  18. | product "*" atom -> mul
  19. | product "/" atom -> div
  20. ?atom: NUMBER -> number
  21. | "-" atom -> neg
  22. | NAME -> var
  23. | "(" sum ")"
  24. %import common.CNAME -> NAME
  25. %import common.NUMBER
  26. %import common.WS_INLINE
  27. %ignore WS_INLINE""",
  28. "1 + 2 * 3 + 4"),
  29. # --- json.lark ---
  30. "json.lark": ("""
  31. ?start: value
  32. ?value: object
  33. | array
  34. | string
  35. | SIGNED_NUMBER -> number
  36. | "true" -> true
  37. | "false" -> false
  38. | "null" -> null
  39. array : "[" [value ("," value)*] "]"
  40. object : "{" [pair ("," pair)*] "}"
  41. pair : string ":" value
  42. string : ESCAPED_STRING
  43. %import common.ESCAPED_STRING
  44. %import common.SIGNED_NUMBER
  45. %import common.WS
  46. %ignore WS""",
  47. """
  48. [
  49. {
  50. "_id": "5edb875cf3d764da55602437",
  51. "index": 0,
  52. "guid": "3dae2206-5d4d-41fe-b81d-dc8cdba7acaa",
  53. "isActive": false,
  54. "balance": "$2,872.54",
  55. "picture": "http://placehold.it/32x32",
  56. "age": 24,
  57. "eyeColor": "blue",
  58. "name": "Theresa Vargas",
  59. "gender": "female",
  60. "company": "GEEKOL",
  61. "email": "theresavargas@geekol.com",
  62. "phone": "+1 (930) 450-3445",
  63. "address": "418 Herbert Street, Sexton, Florida, 1375",
  64. "about": "Id minim deserunt laborum enim. Veniam commodo incididunt amet aute esse duis veniam occaecat nulla esse aute et deserunt eiusmod. Anim elit ullamco minim magna sint laboris. Est consequat quis deserunt excepteur in magna pariatur laborum quis eu. Ex quis tempor elit qui qui et culpa sunt sit esse mollit cupidatat. Fugiat cillum deserunt enim minim irure reprehenderit est. Voluptate nisi quis amet quis incididunt pariatur nostrud Lorem consectetur adipisicing voluptate.\\r\\n",
  65. "registered": "2016-11-19T01:02:42 -01:00",
  66. "latitude": -25.65267,
  67. "longitude": 104.19531,
  68. "tags": [
  69. "eiusmod",
  70. "reprehenderit",
  71. "anim",
  72. "sunt",
  73. "esse",
  74. "proident",
  75. "esse"
  76. ],
  77. "friends": [
  78. {
  79. "id": 0,
  80. "name": "Roth Herrera"
  81. },
  82. {
  83. "id": 1,
  84. "name": "Callie Christian"
  85. },
  86. {
  87. "id": 2,
  88. "name": "Gracie Whitfield"
  89. }
  90. ],
  91. "greeting": "Hello, Theresa Vargas! You have 6 unread messages.",
  92. "favoriteFruit": "banana"
  93. },
  94. {
  95. "_id": "5edb875c845eb08161a83e64",
  96. "index": 1,
  97. "guid": "a8ada2c1-e2c7-40d3-96b4-52c93baff7f0",
  98. "isActive": false,
  99. "balance": "$2,717.04",
  100. "picture": "http://placehold.it/32x32",
  101. "age": 23,
  102. "eyeColor": "green",
  103. "name": "Lily Ross",
  104. "gender": "female",
  105. "company": "RODEOMAD",
  106. "email": "lilyross@rodeomad.com",
  107. "phone": "+1 (941) 465-3561",
  108. "address": "525 Beekman Place, Blodgett, Marshall Islands, 3173",
  109. "about": "Aliquip duis proident excepteur eiusmod in quis officia consequat culpa eu et ut. Occaecat reprehenderit tempor mollit do eu magna qui et magna exercitation aliqua. Incididunt exercitation dolor proident eiusmod minim occaecat. Sunt et minim mollit et veniam sint ex. Duis ullamco elit aute eu excepteur reprehenderit officia.\\r\\n",
  110. "registered": "2019-11-02T04:06:42 -01:00",
  111. "latitude": 17.031701,
  112. "longitude": -42.657106,
  113. "tags": [
  114. "id",
  115. "non",
  116. "culpa",
  117. "reprehenderit",
  118. "esse",
  119. "elit",
  120. "sit"
  121. ],
  122. "friends": [
  123. {
  124. "id": 0,
  125. "name": "Ursula Maldonado"
  126. },
  127. {
  128. "id": 1,
  129. "name": "Traci Huff"
  130. },
  131. {
  132. "id": 2,
  133. "name": "Taylor Holt"
  134. }
  135. ],
  136. "greeting": "Hello, Lily Ross! You have 3 unread messages.",
  137. "favoriteFruit": "strawberry"
  138. }
  139. ]""")
  140. }