Skip to content

Commit

Permalink
Fixes to bugs with multiline comments in macros. Uploading of the tes…
Browse files Browse the repository at this point in the history
…t_case.
  • Loading branch information
Enthalpy-AC committed Jan 2, 2016
1 parent 407bf9c commit 349170b
Show file tree
Hide file tree
Showing 5 changed files with 323 additions and 2 deletions.
4 changes: 2 additions & 2 deletions macro_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ def parse_file(directory, macro_test):
if parser.config_dict["autoquote"]:
line = re.sub("‘|’|“|”", quote_replace, line)
if line.startswith("/*") and parser.next_method != parser.in_comment:
parser.return_to = parser.in_macro
return parser.in_comment(line)
parser.return_to = parser.next_method
parser.next_method = parser.in_comment(line)
elif line.startswith("//"):
pass
else:
Expand Down
195 changes: 195 additions & 0 deletions test_case/frame_data.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
/* Trial 74165 lets you see what this looks like. */
to_black
color, lime:
June 13, 10:00 AM
District Courthouse
Courtroom No. 3

gallery_murmur
popup, no witness

gavel

place, aj judge
jb.n
music, court:
Court is now in session for the trial of Trucy Wright. Are the defense and prosecution ready?

set_court
wpo.n:
The prosecution is ready, Your Honor.

me.Dn:
The defense is ready, Your Honor.

me.Dann
mono:
(Barring the fact that I never finished my talk with the defendant.)

place, aj judge
jb.n:
Very good.

jb.n:
Mr. Edgeworth, is that you?

set_court
me.Dn:
Yes, Your Honor.

place, aj judge
jb.yes:
It is good to see you again.

jb.n:
You looked like a promising defense attorney when I presided over one of your cases.

jb:
I was very disappointed not to have heard anything aboot you atferwards.

jb:
I am glad to see you are still an attorney.

set_court
me.Dcon:
Thank you, Your Honor.

me.Dann
mono:
(I remember this judge. He presided over the other case where I posed as a defense attorney.)

me.Dann
mono
revEv
judge_brother:
(He is the only judge I could find who did not know I am a prosecutor.)

wpo.ner
sound, anger:
[#s]What about me?!

place, aj judge
jb.m:
Calm down, Mr. Payne. I'm not sure how I feel about prosecutors with such low self-esttem.

set_court
wpo.n:
It's not my fault if you forget about me.

me.Dann
mono:
(This judge does have a regrettable uncertainty.)

place, aj judge
jb.n:
The prosecution may give its opening statement.

set_court
wpo.n
music, opening:
On June the 12th, the defendant went to the Bank of the People dressed in black, with a ski mask.

merge
wpo:
She pulled out a

key:
gun

null:
and demanded a sum of $200,000 or else...

sound, slap
wpo.con:
Bam! She would fire. After getting the money, she ran off.

me.Dann
mono:
(From that description, this doesn’t look like a case with much in the way of evidence.)

place, aj judge
jb.n
sound, key:
Did the bank have any security staff?

set_court
wpo.n:
Yes.
The guard will testify later.

place, aj judge
jb.th:
Hmm...

jb.n
music:
The court would like to hear more about what happened.

jb:
Does the prosecution have a witness prepared to testify on the matter?

set_court
wpo.n:
Yes, Your Honor.

place, aj judge
jb.yes:
Good. The court would like to hear from this witness.

set_court
wpo.n:
The prosecution calls Detective Gumshoe to the stand.

to_black
wait, 1500

gum_court
wpo.n
music, court:
The witness will state his name and profession.

dg.con:
Dick Gumshoe. I work homicide at the precinct.

place, aj judge
jb.sho
sound, sho:
A homicide detective testifying about a robbery?!

jb.no:
I'm not sure how I feel about that.

gum_court
dg.s
wait, 1250:

dg.side:
After my last case, the chief decided that I needed to take a break from homicide for a bit.

dg:
I was transferred to robbery for two weeks.

me.Dann
mono:
(Ah, the inept Detective Gumshoe. I have the misfortune of working with him very frequently.)

me.Dann
mono:
(He misses the obvious and is incapable of deduction...)

me.Dann
mono:
(...but his dedication and loyalty to me are incredible. That's why he hasn't exposed me.)

place, aj counsel
pwo.An:
Knowing Gumshoe, this testmony won't be much of a problem.

me:
I'm more concerned about making it through this testimony without losing my composure.

gavel

place, aj judge
jb.n:
The witness may begin his testimony.
46 changes: 46 additions & 0 deletions test_case/macro_data.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/* Trial 74165 lets you see what this looks like. */
to_black {
music
place
}

gallery_murmur {
place, aj court loud
sound, gallery
wait, 3000
}

gavel {
place, gavel 1
sound, gavel
wait, 1000
}

mono {
color, skyblue
sync, n
}

key {
color, orange
sound, key
merge
}

set_court {
place, aj bench
set_sprite, me, n
cPos, left
set_sprite, wpo, n
cPos, right
}

gum_court {
set_court
set_sprite, dg, n
cPos, center
}

CONFIG {
startup: before
}
78 changes: 78 additions & 0 deletions test_case/object_data.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/* Trial 74165 lets you see what this looks like. */
Profile {
hidden: true
base: edgeworth
description: Age: 32
: Gender: Male
: Myself. I am one of the best prosecutors in the nation, although I am acting as as a defense attorney for my friend, Phoenix Wright.
}

Profile {
hidden: true
base: payneold
description: Age: 60
: Gender: Male
: The "prosecutor" for this case. He is actually a janitor eager to play prosecutor, and the only person I could find on short notice.
}

Profile {
hidden: true
base: gumshoe
description: Age: 38
: Gender: Male
: A homicide detective at the local precinct. Despite this, he is in charge of the robbery investigation. He is inept, yet loyal.
}

Profile {
hidden: true
base: phoenixold
description: Age: 32
: Gender: Male
: My friend and a former defense attorney before his disbarment. I am defending his adoptive daughter, Trucy, on his request.
}

Profile judge_brother {
long: Judge Chambers
hidden: true
base: judgebrother
description: Age: ??
: Gender: Male
: Judge Arthur Chambers, the brother of the judge who usually presides over my trials. He thinks I am a defense attorney.
}

Popup no witness {
name: Court overview no witness
path: http://i1059.photobucket.com/albums/t432/Enthalpy49/Proxy Specific Images/NotaGhost_zpsea9f7d3c.gif
}

Sound gallery {
base: gallery speaking
}

Sound gavel {
base: gavel
}

Sound key {
base: huh
}

Sound slap {
base: slap
}

Sound sho {
base: shocked
}

Sound anger {
base: anger
}

Music court {
base: aai208
}

Music opening {
base: aai108
}
2 changes: 2 additions & 0 deletions test_case/testData.txt

Large diffs are not rendered by default.

0 comments on commit 349170b

Please sign in to comment.