Browse Source

Merge branch 'test_latex'

filepath_with_space
Oliverpool 9 years ago
parent
commit
54e64ee2db
  1. 2
      patacrep/latex/lexer.py
  2. 5
      patacrep/latex/syntax.py
  3. 0
      test/test_song/00.csg
  4. 0
      test/test_song/00.csg.source
  5. 0
      test/test_song/00.tsg
  6. 0
      test/test_song/01.csg
  7. 0
      test/test_song/01.csg.source
  8. 0
      test/test_song/01.tsg
  9. 0
      test/test_song/02.csg
  10. 0
      test/test_song/02.csg.source
  11. 0
      test/test_song/02.tsg
  12. 0
      test/test_song/03.csg
  13. 0
      test/test_song/03.csg.source
  14. 0
      test/test_song/03.tsg
  15. 0
      test/test_song/04.csg
  16. 0
      test/test_song/04.csg.source
  17. 0
      test/test_song/04.tsg
  18. 0
      test/test_song/05.csg
  19. 0
      test/test_song/05.csg.source
  20. 0
      test/test_song/05.tsg
  21. 0
      test/test_song/06.csg
  22. 0
      test/test_song/06.csg.source
  23. 0
      test/test_song/06.tsg
  24. 0
      test/test_song/07.csg
  25. 0
      test/test_song/07.csg.source
  26. 0
      test/test_song/07.tsg
  27. 0
      test/test_song/08.csg
  28. 0
      test/test_song/08.csg.source
  29. 0
      test/test_song/08.tsg
  30. 0
      test/test_song/09.csg
  31. 0
      test/test_song/09.csg.source
  32. 0
      test/test_song/09.tsg
  33. 0
      test/test_song/10.csg
  34. 0
      test/test_song/10.csg.source
  35. 0
      test/test_song/10.tsg
  36. 0
      test/test_song/11.csg
  37. 0
      test/test_song/11.csg.source
  38. 0
      test/test_song/11.tsg
  39. 0
      test/test_song/12.csg
  40. 0
      test/test_song/12.csg.source
  41. 0
      test/test_song/12.tsg
  42. 0
      test/test_song/13.csg
  43. 0
      test/test_song/13.csg.source
  44. 0
      test/test_song/13.tsg
  45. 0
      test/test_song/21.csg
  46. 0
      test/test_song/21.csg.source
  47. 0
      test/test_song/21.tsg
  48. 0
      test/test_song/22.csg
  49. 0
      test/test_song/22.csg.source
  50. 0
      test/test_song/22.tsg
  51. 0
      test/test_song/23.csg
  52. 0
      test/test_song/23.csg.source
  53. 0
      test/test_song/23.tsg
  54. 0
      test/test_song/24.csg
  55. 0
      test/test_song/24.csg.source
  56. 0
      test/test_song/24.tsg
  57. 0
      test/test_song/25.csg
  58. 0
      test/test_song/25.csg.source
  59. 0
      test/test_song/25.tsg
  60. 0
      test/test_song/26.csg
  61. 0
      test/test_song/26.csg.source
  62. 0
      test/test_song/26.tsg
  63. 0
      test/test_song/27.csg
  64. 0
      test/test_song/27.csg.source
  65. 0
      test/test_song/27.tsg
  66. 0
      test/test_song/28.csg
  67. 0
      test/test_song/28.csg.source
  68. 0
      test/test_song/28.tsg
  69. 0
      test/test_song/29.csg
  70. 0
      test/test_song/29.csg.source
  71. 0
      test/test_song/29.tsg
  72. 0
      test/test_song/__init__.py
  73. 0
      test/test_song/author_names.csg
  74. 0
      test/test_song/author_names.csg.source
  75. 0
      test/test_song/author_names.tsg
  76. 0
      test/test_song/chords.csg
  77. 0
      test/test_song/chords.csg.source
  78. 0
      test/test_song/chords.tsg
  79. 0
      test/test_song/customchords.csg
  80. 0
      test/test_song/customchords.csg.source
  81. 0
      test/test_song/customchords.tsg
  82. 0
      test/test_song/datadir/img/traditionnel.png
  83. 0
      test/test_song/datadir/scores/greensleeves.ly
  84. 0
      test/test_song/errors/invalid_content.csg.source
  85. 0
      test/test_song/greensleeves.csg
  86. 0
      test/test_song/greensleeves.csg.source
  87. 0
      test/test_song/greensleeves.tsg
  88. 1
      test/test_song/greensleeves_latex.crlf.tsg
  89. 2
      test/test_song/greensleeves_latex.crlf.tsg.source
  90. 1
      test/test_song/greensleeves_latex.tsg
  91. 68
      test/test_song/greensleeves_latex.tsg.source
  92. 0
      test/test_song/invalid_chord.csg
  93. 0
      test/test_song/invalid_chord.csg.source
  94. 0
      test/test_song/invalid_chord.tsg
  95. 0
      test/test_song/invalid_customchord.csg
  96. 0
      test/test_song/invalid_customchord.csg.source
  97. 0
      test/test_song/invalid_customchord.tsg
  98. 0
      test/test_song/invalid_directive.csg
  99. 0
      test/test_song/invalid_directive.csg.source
  100. 0
      test/test_song/invalid_directive.tsg

2
patacrep/latex/lexer.py

@ -60,7 +60,7 @@ class SimpleLexer:
# Define a rule so we can track line numbers
@staticmethod
def t_endofline(token):
r'\n+'
r'(\r?\n)+'
token.lexer.lineno += len(token.value)
@staticmethod

5
patacrep/latex/syntax.py

@ -130,8 +130,11 @@ class LatexParser(Parser):
def p_dictionary(symbols):
"""dictionary : identifier EQUAL braces dictionary_next
| identifier EQUAL error dictionary_next
| empty
"""
if isinstance(symbols[3], ast.Expression):
if len(symbols) == 2:
symbols[0] = {}
elif isinstance(symbols[3], ast.Expression):
symbols[0] = {}
symbols[0][symbols[1]] = symbols[3]
symbols[0].update(symbols[4])

0
test/test_chordpro/00.csg → test/test_song/00.csg

0
test/test_chordpro/00.csg.source → test/test_song/00.csg.source

0
test/test_chordpro/00.tsg → test/test_song/00.tsg

0
test/test_chordpro/01.csg → test/test_song/01.csg

0
test/test_chordpro/01.csg.source → test/test_song/01.csg.source

0
test/test_chordpro/01.tsg → test/test_song/01.tsg

0
test/test_chordpro/02.csg → test/test_song/02.csg

0
test/test_chordpro/02.csg.source → test/test_song/02.csg.source

0
test/test_chordpro/02.tsg → test/test_song/02.tsg

0
test/test_chordpro/03.csg → test/test_song/03.csg

0
test/test_chordpro/03.csg.source → test/test_song/03.csg.source

0
test/test_chordpro/03.tsg → test/test_song/03.tsg

0
test/test_chordpro/04.csg → test/test_song/04.csg

0
test/test_chordpro/04.csg.source → test/test_song/04.csg.source

0
test/test_chordpro/04.tsg → test/test_song/04.tsg

0
test/test_chordpro/05.csg → test/test_song/05.csg

0
test/test_chordpro/05.csg.source → test/test_song/05.csg.source

0
test/test_chordpro/05.tsg → test/test_song/05.tsg

0
test/test_chordpro/06.csg → test/test_song/06.csg

0
test/test_chordpro/06.csg.source → test/test_song/06.csg.source

0
test/test_chordpro/06.tsg → test/test_song/06.tsg

0
test/test_chordpro/07.csg → test/test_song/07.csg

0
test/test_chordpro/07.csg.source → test/test_song/07.csg.source

0
test/test_chordpro/07.tsg → test/test_song/07.tsg

0
test/test_chordpro/08.csg → test/test_song/08.csg

0
test/test_chordpro/08.csg.source → test/test_song/08.csg.source

0
test/test_chordpro/08.tsg → test/test_song/08.tsg

0
test/test_chordpro/09.csg → test/test_song/09.csg

0
test/test_chordpro/09.csg.source → test/test_song/09.csg.source

0
test/test_chordpro/09.tsg → test/test_song/09.tsg

0
test/test_chordpro/10.csg → test/test_song/10.csg

0
test/test_chordpro/10.csg.source → test/test_song/10.csg.source

0
test/test_chordpro/10.tsg → test/test_song/10.tsg

0
test/test_chordpro/11.csg → test/test_song/11.csg

0
test/test_chordpro/11.csg.source → test/test_song/11.csg.source

0
test/test_chordpro/11.tsg → test/test_song/11.tsg

0
test/test_chordpro/12.csg → test/test_song/12.csg

0
test/test_chordpro/12.csg.source → test/test_song/12.csg.source

0
test/test_chordpro/12.tsg → test/test_song/12.tsg

0
test/test_chordpro/13.csg → test/test_song/13.csg

0
test/test_chordpro/13.csg.source → test/test_song/13.csg.source

0
test/test_chordpro/13.tsg → test/test_song/13.tsg

0
test/test_chordpro/21.csg → test/test_song/21.csg

0
test/test_chordpro/21.csg.source → test/test_song/21.csg.source

0
test/test_chordpro/21.tsg → test/test_song/21.tsg

0
test/test_chordpro/22.csg → test/test_song/22.csg

0
test/test_chordpro/22.csg.source → test/test_song/22.csg.source

0
test/test_chordpro/22.tsg → test/test_song/22.tsg

0
test/test_chordpro/23.csg → test/test_song/23.csg

0
test/test_chordpro/23.csg.source → test/test_song/23.csg.source

0
test/test_chordpro/23.tsg → test/test_song/23.tsg

0
test/test_chordpro/24.csg → test/test_song/24.csg

0
test/test_chordpro/24.csg.source → test/test_song/24.csg.source

0
test/test_chordpro/24.tsg → test/test_song/24.tsg

0
test/test_chordpro/25.csg → test/test_song/25.csg

0
test/test_chordpro/25.csg.source → test/test_song/25.csg.source

0
test/test_chordpro/25.tsg → test/test_song/25.tsg

0
test/test_chordpro/26.csg → test/test_song/26.csg

0
test/test_chordpro/26.csg.source → test/test_song/26.csg.source

0
test/test_chordpro/26.tsg → test/test_song/26.tsg

0
test/test_chordpro/27.csg → test/test_song/27.csg

0
test/test_chordpro/27.csg.source → test/test_song/27.csg.source

0
test/test_chordpro/27.tsg → test/test_song/27.tsg

0
test/test_chordpro/28.csg → test/test_song/28.csg

0
test/test_chordpro/28.csg.source → test/test_song/28.csg.source

0
test/test_chordpro/28.tsg → test/test_song/28.tsg

0
test/test_chordpro/29.csg → test/test_song/29.csg

0
test/test_chordpro/29.csg.source → test/test_song/29.csg.source

0
test/test_chordpro/29.tsg → test/test_song/29.tsg

0
test/test_chordpro/__init__.py → test/test_song/__init__.py

0
test/test_chordpro/author_names.csg → test/test_song/author_names.csg

0
test/test_chordpro/author_names.csg.source → test/test_song/author_names.csg.source

0
test/test_chordpro/author_names.tsg → test/test_song/author_names.tsg

0
test/test_chordpro/chords.csg → test/test_song/chords.csg

0
test/test_chordpro/chords.csg.source → test/test_song/chords.csg.source

0
test/test_chordpro/chords.tsg → test/test_song/chords.tsg

0
test/test_chordpro/customchords.csg → test/test_song/customchords.csg

0
test/test_chordpro/customchords.csg.source → test/test_song/customchords.csg.source

0
test/test_chordpro/customchords.tsg → test/test_song/customchords.tsg

0
test/test_chordpro/datadir/img/traditionnel.png → test/test_song/datadir/img/traditionnel.png

0
test/test_chordpro/datadir/scores/greensleeves.ly → test/test_song/datadir/scores/greensleeves.ly

0
test/test_chordpro/errors/invalid_content.csg.source → test/test_song/errors/invalid_content.csg.source

0
test/test_chordpro/greensleeves.csg → test/test_song/greensleeves.csg

0
test/test_chordpro/greensleeves.csg.source → test/test_song/greensleeves.csg.source

0
test/test_chordpro/greensleeves.tsg → test/test_song/greensleeves.tsg

1
test/test_song/greensleeves_latex.crlf.tsg

@ -0,0 +1 @@
\import{@TEST_FOLDER@/}{greensleeves_latex.crlf.tsg.source}

2
test/test_song/greensleeves_latex.crlf.tsg.source

@ -0,0 +1,2 @@
# This content will be overwritten with `greensleeves_latex.tsg.source` content
# with windows line endings (CRLF) - for testing purposes

1
test/test_song/greensleeves_latex.tsg

@ -0,0 +1 @@
\import{@TEST_FOLDER@/}{greensleeves_latex.tsg.source}

68
test/test_song/greensleeves_latex.tsg.source

@ -0,0 +1,68 @@
\selectlanguage{english}
\songcolumns{2}
\beginsong{Greensleeves\\
Un autre sous-titre\\
Un sous titre}[
by={
Traditionnel },
album={Angleterre},
cover={img/traditionnel},
]
\cover
\lilypond{scores/greensleeves.ly}
\begin{verse}
A\[Am]las, my love, ye \[G]do me wrong
To \[Am]cast me oft dis\[E]curteously
And \[Am]I have loved \[G]you so long
De\[Am]lighting \[E]in your \[Am]companie
\end{verse}
\begin{chorus}
\[C]Green\[B]sleeves was \[G]all my joy
\[Am]Greensleeves was \[E]my delight
\[C]Greensleeves was my \[G]heart of gold
And \[Am]who but \[E]Ladie \[Am]Greensleeves
\end{chorus}
\begin{verse}
I \[Am]have been ready \[G]at your hand
To \[Am]grant what ever \[E]you would crave
I \[Am]have both waged \[G]life and land
Your \[Am]love and \[E]good will \[Am]for to have
\end{verse}
\begin{verse}
I \[Am]bought thee kerchers \[G]to thy head
That \[Am]were wrought fine and \[E]gallantly
I \[Am]kept thee both at \[G]boord and bed
Which \[Am]cost my \[E]purse well \[Am]favouredly
\end{verse}
\begin{verse}
I \[Am]bought thee peticotes \[G]of the best
The \[Am]cloth so fine as \[E]fine might be
I \[Am]gave thee jewels \[G]for thy chest
And \[Am]all this \[E]cost I \[Am]spent on thee
\end{verse}
\begin{verse}
Thy \[Am]smock of silke, both \[G]faire and white
With \[Am]gold embrodered \[E]gorgeously
Thy \[Am]peticote of \[G]sendall right
And \[Am]this I \[E]bought thee \[Am]gladly
\end{verse}
\endsong

0
test/test_chordpro/invalid_chord.csg → test/test_song/invalid_chord.csg

0
test/test_chordpro/invalid_chord.csg.source → test/test_song/invalid_chord.csg.source

0
test/test_chordpro/invalid_chord.tsg → test/test_song/invalid_chord.tsg

0
test/test_chordpro/invalid_customchord.csg → test/test_song/invalid_customchord.csg

0
test/test_chordpro/invalid_customchord.csg.source → test/test_song/invalid_customchord.csg.source

0
test/test_chordpro/invalid_customchord.tsg → test/test_song/invalid_customchord.tsg

0
test/test_chordpro/invalid_directive.csg → test/test_song/invalid_directive.csg

0
test/test_chordpro/invalid_directive.csg.source → test/test_song/invalid_directive.csg.source

0
test/test_chordpro/invalid_directive.tsg → test/test_song/invalid_directive.tsg

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save