text:
180 F. 2d 160 - Ross v. United States
180 F2d 160 Ross v. United States
ROSS et al.
Robert N. Gorman, Cincinnati, Ohio, Joseph Keenan, Washington, D. C., Harry A. Abrams, Cincinnati, Ohio, on the brief, for appellants.
Frank J. Richter, Cincinnati, Ohio, Ray J. O'Donnell, Cincinnati, Ohio, on the brief, for appellee.
Before HICKS, Chief Judge, MARTIN and MILLER, Circuit Judges.
MARTIN, Circuit Judge.
The three appellants were convicted by a jury on several counts of a joint indictment charging violation of section 1731(a) of Title 12,1 United States Code, and also upon a count drawn under section 88 of Title 18,2 United States Code, charging conspiracy to violate section 1731(a) of Title 12. Each defendant was fined $12,500 and sentenced to an aggregate four years in prison. The sentences imposed were within the limits of the statutes.
Section 1731(a) of Title 12, United States Code, provides: "Whoever, for the purpose of obtaining any loan or advance of credit from any person, partnership, association, or corporation with the intent that such loan or advance of credit shall be offered to or accepted by the Federal Housing Administration for insurance, or for the purpose of obtaining any extension or renewal of any loan, advance of credit, or mortgage insured by the said Administration, or the acceptance, release, or substitution of any security on such a loan, advance of credit, or for the purpose of influencing in any way the action of said Administration under this chapter makes, passes, utters, or publishes, or causes to be made, passed, uttered, or published any statement, knowing the same to be false, or alters, forges, or counterfeits, or causes or procures to be altered, forged, or counterfeited, any instrument, paper, or document, or utters, publishes, or passes as true, or causes to be uttered, published, or passed as true, any instrument, paper, or document, knowing it to have been altered, forged, or counterfeited, or willfully over-values any security, asset, or income, shall be punished by a fine of not more than $3,000 or by imprisonment for not more than two years, or both."
We shall not indulge in any extensive factual narrative. The government adduced abundant substantial evidence to support the verdict of the jury on all counts upon which the respective defendants were found guilty. Each of the three defendants testified in his own behalf in contradiction of material adverse testimony. A general description of the method of business operation employed by them would seem to suffice.
Irving Ross, who for several years had been active, first in canvassing prospects and later in making sales, for suppliers of siding for residential houses, went to Portsmouth, Ohio, in April, 1946, and joined in a partnership enterprise with Phil Cohen in the selling of imitation brick siding for residences. Phil Cohen at times used the alias "Phillips" and is the same person whose conviction at Dayton, Ohio, for violation of the same statute here involved, was affirmed by this court on November 30, 1949. See Phil S. Cohen, alias P. H. Phillips, and Leo Escovitch, alias Leo Esco, v. United States of America, 6 Cir., 178 F.2d 588, 591. The partnership in Portsmouth was dissolved when Cohen left for Dayton, Ohio. According to Irving Ross, the manager of the Universal C. I. T. Corporation at Portsmouth told him: "If you sever your connection with Cohen, we'll continue to take your paper."
Shortly after Cohen left Portsmouth, appellants Martin Ross and Milton Gecker showed up there and entered into the siding business with Irving Ross, the three men calling themselves the "Portsmouth Construction Company". Both Martin Ross and Milton Gecker had previously been canvassers and salesmen in the siding business elsewhere. Martin was the brother of Irving Ross.
Appellants made arrangements with the Portsmouth branch manager of the C. I. T. Corporation to finance their business by acquiring at discount their customers' notes, endorsed by Portsmouth Construction Company "without recourse". Appellants secured and used printed forms of "FHA Title I Credit Application" blanks, addressed to Universal C. I. T. Credit Corporation, printed forms of "FHA Title I Borrower's Completion Certificate", and also printed forms of promissory notes "negotiable and payable at the office of Universal C. I. T. Credit Corporation, New York, Chicago, or San Francisco, with exchange."
Armed with these documents, appellants proceeded to consummate their scheme, which from the testimony of government witnesses was obviously fraudulent. One or two of them would approach a poor and ignorant person and induce him to permit appellants to place siding on his modest home by representing that the Portsmouth Construction Company desired to advertise by placing its siding on model homes; and that the siding would cost the customer nothing, inasmuch as he would receive $25 commission for every job which was sold by appellants in consequence of people seeing the favored customer's home with the appellants' siding on it. For example, William Delebar and the McManaways were told that appellants desired to use their homes for demonstration purposes over a period of three years.
Each person approached was told that he must keep secret the fact that he had made the arrangements which would give him the siding free of cost. The government's proof showed that by various misrepresentations, such as the statement that signed forms were needed to keep required records, the appellants induced persons who agreed to have siding put on their homes to sign blank FHA Title I Credit Applications, and blank promissory notes. Subsequently, the application forms were filled in with false information making the homeowner's financial status appear much more favorable than it actually was. The blank notes were filled in with amounts payable, varying from thirty-seven to seventy per cent of the purchase price of the respective homes.
After the Universal C. I. T. Credit Corporation had received the credit information on the FHA application form and had checked it with the local Merchants Credit Bureau, it would discount the note and then assign it to the Commercial Investment Trust, Inc., of New York, which had a contract of insurance for property improvement loans with the Federal Housing Administration. All notes for property improvement, including those involved here, which were discounted by the Portsmouth branch of the Universal C. I. T. Credit Corporation were insured by the Federal Housing Administration.
In late October or early November, 1946, when C. I. T. began to call upon the favored customers to pay the first maturing instalments of their promissory notes, appellants, though they had avowed intended long sojourn in the attractive city of Portsmouth — but lived in hotels — found the city no longer attractive, and left.
Appellants contend that the indictment does not sufficiently state an offense against the laws of the United States. The same contention was rejected in Cohen v. United States, supra, in which the indictment was for violation of the same statute involved in the substantive counts in this case: namely, section 1731 (a), Title 12, U.S.C. Judge Allen said: "The indictment was drawn in the language of the statute, and each count supplies the specific information applicable to the particular transaction described therein. This is in general sufficient. Rule 7(c), Federal Rules of Criminal Procedure, 18 U.S.C.A.; Sutton v. United States, 5 Cir., 157 F.2d 661; Mellor v. United States, 8 Cir., 160 F. 2d 757; Robertson v. United States, 5 Cir., 168 F.2d 294. * * * The various offenses were fully and clearly charged since the counts of the indictment specified the time and place of each transaction, and the uttering and publishing, in each case, of a false credit application and note, particularly described, in violation of the statute." In Pierce v. United States, 6 Cir., 86 F.2d 949, 951, this court quoted from its earlier opinion in Bettman v. United States, 6 Cir., 224 F. 819, 826, as follows: "The certainty required in an indictment is only such as will fairly inform the defendant of the crime intended to be alleged, so as to enable him to prepare for defense and so as to make the judgment a complete defense to a second prosecution for the same offense." As to the substantive offenses charged, the indictment in the instant case meets this required standard. So, also, does the conspiracy count, which, in pleading the twelfth overt act, charges that the false and fraudulent statements were uttered, published and passed to the Universal C. I. T. Credit Corporation. We find no merit in the argument that counts two and eleven were duplicitous. See Cohen v. United States, supra; Troutman v. United States, 10 Cir., 100 F.2d 628.
The further contention is made by appellants that they merely assisted borrowers in procuring loans, and that section 1731(a) has application only to borrowers. But the statute is not susceptible to this narrow interpretation, for it applies in express language in the alternative to anyone who "for the purpose of influencing in any way the action" of the Federal Housing Administration under the Act is guilty of the actions condemned, and provides punishment therefor.
The appellants' argument has been rejected by the Court of Appeals for the Fifth Circuit in Hartwell v. United States, 107 F.2d 359, 361, where Judge Hutcheson said with respect to the statute: "But, we think it plain, that the act must be considered as a whole and in the light of the purposes and objectives it was designed to achieve, and that so considered to place upon it, a construction which would limit its scope to borrowers alone, is an unreasonable narrowing of its scope and effect." In the Cohen case, our court pointed out that the essence of the crime is the uttering and publishing of false documents with intent to influence the Federal Housing Administration. Cf. Reass v. United States, 4 Cir., 99 F.2d 752.
The insistence of appellants that they should have had a verdict directed in their favor is not well grounded. They urge that there was no proof that the applications were made with the intent that the loans should be offered to the Federal Housing Administration. As in the Cohen case, appellants furnished the signers of the documents FHA forms upon which was prominently displayed, on the top line: "F HA Title I Credit Application". As stated in the opinion in that case, the jury was privileged to infer existence of intent that loans should be sought from the Federal Housing Administration, and that the particular applications and notes were used to influence the action of that governmental agency. This being true, there was no error in the refusal of the district judge to charge, as requested by appellants, that in order to convict it must be found that appellants had "actual knowledge that said credit application would be offered by the Universal C. I. T. Credit Corporation to or accepted by the Federal Housing Administration for insurance and that the action of said Federal Housing Administration would be influenced thereby"; or that if the jury should find that "the Federal Housing Administration was not influenced in granting said loans by said credit applications, but relied upon and were influenced by the C. I. T. Credit Corporation approval", the appellants should be found not guilty.
Complaint is made that the court permitted introduction of prejudicial evidence not properly receivable. After careful consideration, we find no reversible error in the rulings of the trial court on the admission of evidence. Some of it received may, strictly speaking, have been irrelevant, but this is not unusual in the trial of a case which consumed the time and required the detail which this one did. In our judgment, no incompetent evidence of a prejudicial sort was permitted to be put before the jury. We think, however, that the government's exhibit number seven, showing that losses on some of the defaulted notes involved were paid by the United States under its obligation as insurer, should have been excluded as being too remote. The gist of the offense with which appellants were charged is the uttering and publishing of false statements with intent to influence the Federal Housing Administration in the insurance of loans.
We think the trial court erred in failing to follow the express mandate of Rule 30 of the Rules of Criminal Procedure, 18 U.S.C.A. At the conclusion of the evidence, attorneys for the defendants seasonably tendered numerous requested special instructions to the jury. The district judge stated that he would not grant any of the special requests, as such, but would try to give them in his general charge; that the instructions were correct except "in a couple of instances"; and that he would "cover the correct law governing the case" in his general charge, upon the conclusion of which he would ask if there were any omissions and have them pointed out. The attorney for appellants noted exception under the Rules of Criminal Procedure, stating that counsel were entitled to know the ruling of the court on each of the requests before the argument to the jury. In this, he was correct. Rule 30 of the Rules of Criminal Procedure (which is similar to Civil Procedure Rule 51, 28 U.S.C.A.) provides: "At the close of the evidence or at such earlier time during the trial as the court reasonably directs, any party may file written requests that the court instruct the jury on the law as set forth in the requests. At the same time copies of such requests shall be furnished to adverse parties. The court shall inform counsel of its proposed action upon the requests prior to their arguments to the jury, but the court shall instruct the jury after the arguments are completed. No party may assign as error any portion of the charge or omission therefrom unless he objects thereto before the jury retires to consider its verdict, stating distinctly the matter to which he objects and the grounds of his objection. Opportunity shall be given to make the objection out of the hearing of the jury." [Italics supplied.] The notes to the rules, as prepared under the direction of the Advisory Committee, state that it seemed appropriate that on a point such as instructions to juries there should be no difference in procedure between civil and criminal cases. The obvious object of the rule in point is to require the judge to inform the trial lawyers in a fair way what the charge is going to be, so that they may intelligently argue the case to the jury.
We have already stated that two of the special requests which the court did not give were incorrect in law, but the trial judge did not identify these incorrect requested instructions before the case was argued to the jury. Indeed, as to one, he indicated that the substance of it would be given. The deleterious effect of the failure of the judge to follow the rule is emphasized by the fact that, although he intended to do so, he actually failed to charge all the correct general propositions requested in writing by appellants. It is not implied that the court must give in haec verba the language of a special request which he indicates will be given; but he should at least charge the full substance of it.
Appellants contend that the trial court failed properly to correct its obvious error in charging the jury, as follows: "You the jury, will therefore investigate, weigh and piece together all of the evidence brought before you here on behalf of the government and submitted to you for your consideration, and from this evidence, you will determine whether or not the defendants or any of them did thus enter into an unlawful conspiracy." [Italics supplied.] The error was accentuated by the subsequent instruction: "You should consider whether any of those testifying on behalf of the United States are actuated by any motive other than to tell the truth, are actuated by any other motive than to see that the law is upheld, and generally, you should consider all of the circumstances surrounding the testimony of the witnesses and determine the credibility of each and every witness fairly and impartially and when you reach a conclusion as to what credit should be given to witnesses, then give that credit." [Italics supplied.]
The court should have charged the jurors that they must consider all the evidence in the case in determining the guilt or innocence of the accused, and should not have limited the last quoted instruction to the government's witnesses. After exception had been duly taken, the court stated: "All right. We will accept the correction that the jury will consider all of the evidence"; and added, later: "The jury heard the suggestion by Judge Gorman. The court will accept that suggestion."
Appellants insist that it was not adequate instruction merely to say that the brief statements of the attorney for the defendants in taking exceptions were accepted, but that it was "the duty of the court to correct its own error." We think the contention is well grounded. After having committed the original fundamental error, the court should not have dealt so lightly with the subject matter. We think that, it being the duty of the court to charge the jury correctly, restatement of the proposition in clear, explicit, and correct language was demanded, so that no confusion could possibly be left in the minds of the jurors that they should consider not only the testimony of the government's witnesses, but also that of the defendants and the witnesses whom they put upon the stand.
Appellants argue with vigor that, not only the conduct of the district attorney, but also that of the judge demanded the granting of their several motions for a mistrial. It is asserted that the judge indicated to the jury his feeling that the defendants were guilty. After carefully considering the several incidents pointed out, we are of opinion that reversible error was not committed by the judge in his comments and attitude during the trial. We think it well, however, to observe that a trial judge should constantly bear in mind the wise and practical words of Chief Justice Fuller that "the influence of the trial judge on the jury is necessary and properly of great weight, and that his lightest word or intimation is received with deference, and may prove controlling." Starr v. United States, 153 U.S. 614, 626, 14 S.Ct. 919, 923, 38 L.Ed. 841. In a jury trial, the judge should be most guarded in his comments so as to avoid any possible appearance of holding a personal opinion concerning the facts in issue.
We find impelling reversible error in the conduct of the United States Attorney, which deprived the defendants of the constitutional right to a fair trial. Passing without discussion his spontaneous negative exclamation when a witness, Miss Tuttle, mistakenly identified Martin Ross as Irving Ross, the man who, accompanied by Gecker, came to see her; and omitting mention of several trial episodes wherein the zeal of the district attorney carried him beyond the limits inhibited in Pierce v. United States, 6 Cir., 86 F.2d 949, 952, et seq., we detail only the circumstances of his prejudicial and inflammatory argument to the jury.
At the outset of his closing argument, the appellants were typified as "con men", although there was no evidence of previous illegal activities. Appellants were characterized as "fly-by-nighters, who never stayed long enough in any town to get caught up with", who had plied their trade in Milwaukee, in Detroit, in Tulsa, Oklahoma, in Atlanta, Georgia, and had been "in Chattanooga, Tennessee, trying to ply their trade" — the judge interrupted to correct: "Charlotte, North Carolina." There was no evidence that appellants had been guilty of any illegal activities in any of these cities. The testimony was merely that they had been in the siding business in the places mentioned.
Commenting on the effort of the defense to show that a prosecuting witness, Smith, lied concerning his age in order to enter the Army of the United States, the district attorney exclaimed: "Would you, ladies and gentlemen of the Jury, that we had more liars of that type! That's one place where we find that these three men did not lie. They stayed out of the Army [objection by defendant's attorney] as long as they could." The defense attorney interjected: "That's highly prejudicial, and Mr. O'Donnell knows it." Mr. O'Donnell rejoined, "O. K. That's not a fact." The defense attorney moved for a mistrial, but the court made no comment or ruling.
Later in his argument, the United States Attorney declared: "Now, ladies and gentlemen we are here not because these people have been defrauded, it's because the government of the United States has been defrauded. We the people of the United States, the taxpayers, you and I and Gorman, we have been defrauded by the actions of these men. That's why we are here trying this case." Judge Gorman, defense attorney, objected to the argument, saying, "that isn't the charge in the first place." The Court stated: "The charge is that these men made, published and uttered a false document for the purpose of securing insurance from the Federal Housing Administration which is a subsidiary of the United States Government."
In order to understand clearly the most prejudicial part of the United States Attorney's argument, we must revert briefly to the evidence concerning the change of names of the appellants from "Rosenfeld" to "Ross." Irving Ross had testified on cross-examination that his father's name was "Rosenfelt" and that, in 1946 before he engaged in business in Portsmouth, he had, by court procedure in Milwaukee, legally changed his name to "Ross" because he wanted to adopt an easy name to remember. On cross-examination, Martin Ross admitted that his original name had been "Max Rosenfeld", which he legally changed to "Martin Ross" in Cleveland, Ohio, after he had left Portsmouth. He testified that, in Portsmouth, he used the name of "Martin Ross", because his brother Irving had changed his name to Ross and he then anticipated changing his own.
On his cross-examination of Martin Ross, the district attorney pressed the point that Martin first testified that his brother's name was "Irving Rosenfeld", while it was shown as "Isador Rosenfeld" in the probate court records at Milwaukee. The witness explained that his brother's middle name was "Isador", but that he had known him as "Irving" as long as he could remember. A reading of the record convinces us that the cross-examination by the district attorney concerning this was unfair when, in a rhetorical question, he charged the witness with perjury.
On re-direct examination, Martin Ross was asked how long he had used that name. He answered, "for about 5 or 6 years." Asked how he happened to use it, he responded that, in Detroit, he was using his name, "Max Rosenfeld", when a prospective customer told him that he "didn't want to do business with a Jew."
The United States Attorney used the incident of the changed names to hit below the belt. No semblance of fair play may be found in the portion of his argument which we now quote: "I am not a Latin scholar, but there is a Latin phrase that says `Falsus in uno, falsus in omnibus', Martin Ross lied on the witness stand, deliberately, purposely lied on the witness stand and committed perjury, and he told you that he had. He said his brother's name before he changed it was Irving. And he was going to stick to that until I confronted him with the fact that his brother's name was Isadore. I said, who is Isadore? Well, that was a sad moment in Martin's life when he had to say, there is Isadore over there. How much longer?"
The Court: "You have 10 minutes to go."
The District Attorney: "Ladies and gentlemen, this racial phase that has entered into this case, I deplore. I am sorry that it did. We are here under our oaths, we are bound to mete out justice, regardless of the race, color or creed of any party. That these boys are Jews, certainly in my opinion, and certainly not in the opinion of any other person is any reflection upon them. Why are they ashamed of what they are? Why, something was mentioned about Hitler calling Mr. Roosevelt, Rosenfeld. Well, I believe it was Hitler that changed his name from Schickelgruber. Yes, Hitler was ashamed of his name. Why ladies and gentlemen, these young men are traitors to their race."
To condemn as traitors to their race American citizens of Jewish origin who have changed their names is a superlative appeal to prejudice. The purpose and effect of the closing argument of the United States Attorney just quoted "could only have been to arouse passion and prejudice." See opinion of Chief Justice Stone in Viereck v. United States, 318 U.S. 236, 247, 63 S.Ct. 561, 566, 87 L.Ed. 734.
The oft-quoted language of Mr. Justice Sutherland in Berger v. United States, 295 U.S. 78, 88, 55 S.Ct. 629, 633, 79 L.Ed. 1314, is so impressive and so pertinently applicable here that we conclude this opinion by repeating it: "The United States Attorney is the representative not of an ordinary party to a controversy, but of a sovereignty whose obligation to govern impartially is as compelling as its obligation to govern at all; and whose interest, therefore, in a criminal prosecution is not that it shall win a case, but that justice shall be done. As such, he is in a peculiar and very definite sense the servant of the law, the twofold aim of which is that guilt shall not escape or innocence suffer. He may prosecute with earnestness and vigor — indeed, he should do so. But, while he may strike hard blows, he is not at liberty to strike foul ones."
The judgment as to each appellant is reversed and the case is remanded to the district court for a new trial.
1948 Revised Criminal Code, 18 U.S.C.A. § 1010
1948 Revised Criminal Code, 18 U.S.C.A. § 371


text:
Crime Junkie Podcast: What's The Latest News On Their Plagiarism Scandal?
Many true crime podcast fans have been asking about the latest news surrounding "Crime Junkie" podcast's plagiarism scandal. For those who've missed it, the hosts of the popular true crime podcast Crime Junkie (which used to be #1 on iTunes up until a month ago) were accused in August 2019 by a former journalist and multiple fellow podcasters of using their work in episodes without credit — and then quietly deleting the episodes after being called out (see here for more).
Tonight was 1100 seats filled with Crime Junkies. We love Boston 😍
A post shared by Crime Junkie (@crimejunkiepodcast) on Jun 29, 2019 at 8:31pm PDT
This is one of those cases that we have been following very closely from the beginning. If you're curious how did this whole scandal got started and what the latest developments are, the following summary / timeline will hopefully give you the big picture:
Crime Junkie Podcast Background
The podcast is hosted by Ashley Flowers of Indianapolis and her childhood friend, Brit Prawat.
Flowers, a self-proclaimed "crime junkie" herself, launched the podcast in December 2017 after working with her local Crime Stoppers. According to Deadline, Flowers began her crime reporting by doing a crime segment on a local Indiana radio station and subsequently launched the podcast in December 2017 with the case of missing person Niqui Mccown.
Since its inception, Crime Junkie has rapidly become one of the most popular podcasts and in early August 2019, it ranked #1 on the iTunes podcast charts. The show has a five-star rating on iTunes and around 126,000 reviews.
In August of 2019, several reporters and podcasters accused Flowers of plagiarism. Cathy Frye, a former journalist who worked for 15 years at the Arkansas Democrat-Gazette newspaper, alleged that the March 2019 episode about Kacie Woody relied entirely on her series of articles in the Arkansas Democrat-Gazette, without attribution.
Robin Warder of The Trail Went Cold Podcast alleged the May 2018 episode on Henry McCabe "practically read… verbatim without credit" from his Reddit post. Also, a Reddit user alleged that the March 2019 episode on Kirsten Hatfield copied almost "word for word" from a 2018 episode of On the Case with Paula Zahn.
Crime Junkie Deletes Controversial Episodes
In order to escape the scrutiny, Crime Junkie started by deleting episodes in question: For example, BuzzFeed News reported that "[shortly] after Frye commented on a post on Flowers' personal, but public, Facebook page, saying that she believed Crime Junkie used information from a series of articles she wrote as a source for an episode, but never credited her…the episode was deleted without explanation."
Facebook Statement
After the news of plagiarism charges broke out, the hosts posted a statement on Facebook saying they had deleted the episodes because "their source material could no longer be found or properly cited."
"There is no greater priority for our team, or for me personally, than to ensure the highest levels of accuracy and integrity in our program," the statement read. "Our research process is thorough, rigid, and exhaustive, and those familiar with 'Crime Junkie' are aware that we make clear references to the use of other sources and that comprehensive notes and links to all sources are made available on our show's website."
Democrat-Gazette Warns The Podcast
On August 29, attorneys for the Arkansas Democrat-Gazette sent a cease-and-desist order to Flowers saying in part "This correspondence is to protest your unauthorized use and broadcast of ADG's copyrighted series, Caught in the Web, originally reported and authored by Cathy Frye. ADG owns all the rights, title, and interest in and to its copyrights, including but not limited to the copyrights to the archival stories and photographs published in its daily print publication or through its digital properties."
The podcasters had until Sept. 12 to respond, accordingly to the letter: "If you decline, or fail to take action, ADG may take further action including but not limited to filing a lawsuit for injunctive relief and monetary damages."
Crime Junkie Loses #1 Spot
As of September 14, Crime Junkie ranks at No. 3 on Apple's chart behind New York Times-produced podcast "1619" and The Thing About Pam. Broken: Jeffrey Epstein is currently #4.
newspodcaststrue crime
Skyhorse Publishing Launches New Mystery Imprint "Arcade CrimeWise"
New Sherlock Holmes Adventure on December 16th
South Korean Crime Thriller "The Merciless" Sold To 80+ Markets
"Deck the Halls" from Mary Higgins Clark and Daughter on TV
Previous Best Crime Drama, Mystery And Thriller Shows On Sundance Now: 2019 Edition
Next "Wonderland" Anthology Is An Essential Read For Fans Of Alice's Adventures
Murder In Old Bombay By Nev March: A Tale of Intrigue
Cinematic And Pulse-Pounding: Review of "Don't Look For Me" By Mason Cross

redpajama_set_name: RedPajamaCommonCrawl


Ragen Chastain is a trained researcher, three-time National Champion dancer, marathoner, and soon-to-be IRONMAN who writes and speaks full-time about self-esteem, body image, and health. Ragen is the author of the blogs DancesWithFat and IronFat, and the book Fat: The Owner's Manual. Her writing has been published in internationally and she has been a expert guest on Fox News, Alberta Primetime, HuffPost Live, NPR, and BBC. She is the editor of the multi-volume anthology The Politics of Size – Perspectives from the Fat Acceptance Movement.
Her work is regularly translated into multiple languages (most recently Icelandic!) and her blog has readers on all seven continents. She is the body image and women's health blogger for NBCs iVillage/Today.com and a columnist for Ms. Fit Magazine. Ragen is a feature interviewee in the documentaries "America the Beautiful 2 – The Thin Commandments," released by Warner Brothers in 2011, "A Stage for Size" released in 2013 by USC Films, and "Ragen's More Cabaret" released in 2014 by PBS Independent Lens. A feature film about her life as a dancer is currently in active development.


@bluesqueakpip Wow. I not sure what is left to say after that detailed breakdown. I think you have nailed it.
And I will watch on Monday morning while on the exercise bike, just for a refresh. I have watched this episode many times but always best to re watch before discussing.


text:
Thank you for considering an application
Click on the relevant link below:
For Y2GG:
Apply now - September 2020 start
For Y2GH:
Application not currently open for January 2021.
Have further questions? How to apply | Entry requirements
International Foundation Programme in Business and Management
Entry Year: 2020
2 study options
International Foundation Programme in Business and Management FdCert
FdCert
Y2GG
Full entry requirements
UK/EU fees
£18,100*
*These fees are for the 2019-20 academic year and are provided as a guideline. Fees for 2020-21 have not yet been set.
International Foundation Programme In Business and Management January Start FdCert
Y2GH
Get the skills and experience you need to study an undergraduate degree in business management, marketing or accounting.
This programme provides international and EU students with a direct route to undergraduate study. All modules are taught by our expert academic staff, and you'll have full access to student facilities, including welfare, library, social and sport.
Once you pass the foundation year, you are guaranteed a place on an undergraduate degree in the School of Business and Management at Queen Mary, with pathways to management, marketing or accounting. You can also apply to other UK universities after your foundation year, and you'll get a high level of support with your UCAS application.
You'll gain a solid foundation in the main theories of business and organisational behaviour, as well as developing your skills in analysis, problem solving and decision-making. You'll have the option to learn a foreign language, as well as improving your ability to use academic English effectively at undergraduate level.
Saturday 5 October 2019
Find out what life at Queen Mary is really like.
Start your International Foundation Programme (IFP) in either September or January.
Compulsory
English Language and Study Skills
Introduction to Business and Management
Marketing or Accounting for Business Decisions
Choose one from
Film studies: Introduction to Film Studies; European and American Art Cinema
French: French Language and Culture I; French Language and Culture II
Geography: Introduction to Human Geography; The Human Geography of London
History: 20th century European History I: 1900-1945; 20th century European History II: 1945-1990
International relations and politics: Introduction to Politics; Introduction to International Relations
Japanese: Japanese Language and Culture I; Japanese Language and Culture II
Literature: Introduction to English Literature; Introduction to American Literature
Spanish: Spanish Language and Culture I; Spanish Language and Culture II
Please note that all modules are subject to change.
The Business Management programme is unique in the wide scope of modules available in second and third years. I founded a society, 'Queen Mary Business and Enterprise Society', with my acquired knowledge and skills.
Edward Melikyan, Business Management (2019)
You'll receive approximately 15 to 28 hours of weekly contact time, in the form of lectures and seminars. You will be encouraged to contribute to seminars through pair work, group work, discussion, presentation and case studies.
You'll also need to carry out a further two to three hours of independent study per module.
Assessment includes a combination of class tests, coursework, and a final exam. Coursework includes a written report, a portfolio and a presentation.
The School offers excellent on-campus resources to aid your studies, including:
a purpose-built media suite designed to support student entrepreneurship
the Queen Mary library
online resources to help you develop your academic English, specially developed for Queen Mary students.
International Foundation Programme in Business and Management - FdCert
a good High School leaving certificate
a reference from a teacher
a personal statement indicating your preferred pathway.
For full details of requirements for individual countries, see the International Foundation Programme entry requirements.
International Foundation Programme In Business and Management January Start - FdCert
Non-UK students
We accept a wide range of European and international qualifications in addition to A-levels, the International Baccalaureate and BTEC qualifications. Please visit International Admissions for full details.
Find out more about our English language entry requirements, including the types of test we accept and the scores needed for entry to the programme.
You may also be able to meet the English language requirement for your programme by joining a summer pre-sessional programme before starting your degree.
See our general undergraduate entry requirements.
Once you have met the conditions of your offer, you will need to pay a deposit of £2,000 towards your tuition fees. This deposit will help in applying for your Tier 4 (General) student visa.
Find out more about deposits and read our refund policy.
If your fees are being paid by a government sponsor we do not require a deposit; however, we will need a formal letter from your sponsor confirming the arrangement.
Support from Queen Mary
We offer specialist support on all financial and welfare issues through our Advice and Counselling Service, which you can access as soon as you have applied for a place at Queen Mary.
Take a look at our Student Advice Guides which cover ways to finance your degree, including:
additional sources of funding
planning your budget and cutting costs
part-time and vacation work
money for lone parents.
The International Foundation Programme (IFP) in Business and Management offers a route to undergraduate degrees across both disciplines.
Recent graduates have gone on to gain degrees in:
All Queen Mary students have access to the Careers and Enterprise Centre, who can offer:
specialist advice on choosing a career path
support with finding work experience, internships and graduate jobs
feedback on CVs, cover letters and application forms
interview coaching.
Learn more about career support and development at Queen Mary.
The School of Languages, Linguistics and Film is friendly and collaborative, bringing a vibrant range of disciplines together. We teach and research on subjects from practical filmmaking to postmodern literature, and from experimental neurolinguistics to Brazilian Portuguese.
This year, Russian and French students have produced plays in their language, linguistics students have presented their research at conferences and film students have directed, shot and edited many short films.
Our work engages the local community through workshops, research projects and public events. We are visited by poets, novelists and outside experts, and we make the most of our location, forging strong links with London's cultural institutions.
In the 2017 National Student Survey, French and Hispanic Studies received overall satisfaction ratings of 100 per cent – top in the UK. Satisfaction among linguistics students was at 92 per cent. German was ranked first in London and Hispanic Studies and Russian in the top five by the Complete University Guide 2018.
School of Languages, Linguistics and Film
Email: foundationprogrammes@qmul.ac.uk
Why Queen Mary


text:
Ashish Bhandari Dubai Resident Discusses Types of Private Jets
Nowadays, flying private is becoming more accessible and affordable. Call it a bizjet or a private jet, it remains to be a fruitful investment, with more people taking advantage of its numerous benefits. However, selecting which private jet to buy will require you to do in-depth industry research. "To make things simpler, you must first analyze the top 7 most popular types of private jets, says Ashish Bhandari from Dubai".
1. Very Light Jets (VLJ)- This classification was first initiated in 2006, costing between $1 to 2.50 million, much cheaper than the current existing jets & considered as entry level jets. They are the smallest kind in the market and their most notable feature is that they are compatible with shorter runways, allowing you to explore more destinations. They are cheaper to run / maintain & have a seating capacity of 4 to 5 passengers (plus crew) and a range between 700 – 1,200 nautical miles. Examples are Phenom 100, Cirrus Vision Jet, Honda Jet & Eclipse 550. They offer an alternative to piston and turbo prop aircraft. These jets are very popular amongst owner pilots. They can reach cruise speeds of up to 410 mph.
2. Light Jets – Making it more ideal for business travelers, these have a better capacity for 6 to 8 passengers and offer better legroom along with a nominal lavatory area. Small light jets are ideal for a two to three-hour journey with an average speed of 450 to 500 miles per hour. The cabins don't offer that great headroom; however, they provide a rear section for luggage. The range varies from 1,100 to 2,000 nautical miles. Examples are Learjet 40 XR & Hawker Premier 1A.
3. Super Light Jets – Super Light Jets are longer than Very Light and Small Light Jets, ranging up to 2,500 nautical miles. They are a step up in terms of range, size & comfort. Despite being spacious and large, these jets can land in less crowded airports. Power outlets and refreshment centers are often spotted in Super Light Jets and they offer a fully enclosed lavatory. They can reach cruise speeds of up to 510 mph. Examples are Embraer Phenom 300 & Gulfstream G100.
4. Midsize Cabin Jets – Running at a range of 3,000 nautical miles and above, they are ideal for transcontinental trips and can accommodate 8 to 10 passengers. The mid-size class of aircraft offers more comfort and amenities than light and even super-light jets, such as ample luggage compartments, fold out divans, an on-board lavatory, and most have stand-up cabins. Midsize cabin jets should be the ideal choice for fulfilling the basic requirements considering all parameters. Examples are Hawker 850 XP / 900 XP, Cessna Citation Excel & Bombardier Challenger 350. They can reach cruise speeds in excess of 530 mph
5. Super-Midsize Cabin Jets – They share a lot of traits with the large Heavy Jets. With a spectacular range of 3,000 – 4,000 nautical miles, super midsize cabin jets have that amazing balance between the comfort and efficiency of the jet. Features include on-board Wi-Fi, a roomier cabin, and improved avionics for a quieter and more comfortable flight overall. Examples include Cessna Citation X & Bombardier Challenger 605. Some of these can reach cruising speed just short of the sound barrier at Mach 0.92
6. Heavy Jets / Ultra Long Range Heavy Jets – With luxurious seating capabilities, heavy jets make long flights much more comfortable. These jets are furnished with a full-sized galley that provides a standard for refreshments. They have an average range above 5,000 nautical miles and some jets can accommodate up to 20 passengers. Ultra-Long-Range Heavy Jets are considered to be the ultimate class symbol, providing generous cabin space with different areas dedicated to entertainment facilities, enclosed bathrooms, sleeping areas, and relaxation. Ultra-long-range heavy jets are the optimum choice for long-haul travelers, with a seating capacity of 14-17 passengers. Examples include Bombardier Global 5000. They cruise at speeds in excess of 530 mph.
7. Executive Liners – Often referred to as bizliners, executive airliners are usually commercial airline aircraft that have been converted into luxury apartments. Executive amenities like dining areas, conference rooms, overhead storage compartments, walk-in cupboards, and full-service galleys manned by flight attendants, make them the most expensive private jets in the market. The hourly cost to rent these can be in excess of USD 60,000 per hour. They can seat anywhere from 20 to 50 passengers. Examples include Airbus A319. Their range is above 6000 miles & they cruise typically at 500-560 miles an hour.
Ashish Bhandari (Dubai) says, "Selecting a Private jet before buying becomes way easier once you select the type of jet according to your needs and requirements. Capacity is the most important factor before choosing a private jet and it's basic to determining the number of passengers traveling. Apart from this, other aspects such as features, amenities, the economy of travel, the range of your jet, etc. are relevant".
Private jets are all about choice, we hope this blog helps you make the right one.
Ashish Bhandari,
Ashish Bhandari is a passionate Aviator & an Ex- Banker based in Dubai. He currently serves as an Advisor to Aviator EMF and has advised on various strategic investments in India and beyond. He is also a Shareholder at EZ Capital Group.
Menafn, Content Marketing, IPS, Reportedtimes, Financial Content, PR-Wirein, iCN Internal Distribution, Extended Distribution, English


Latest sign up for jQuery.com is verified as active online. The jQuery sign up page is available to register a new account with the jQuery sign up form and establish a profile.
This jQuery.com sign up link has additional details tied to it. The information we show is pulled directly from the source for verification purposes to confirm a sign up for jQuery online via their app or website.
Compressed and uncompressed copies of code files are available. The uncompressed file is best used during development or debugging.
Problems or trouble with jQuery can happen and you can check your account process for a verification through email, phone, or SMS mobile.
If the links below are blank a sign up for jQuery may not be in our records at the time of your request. More than one URL shown below indicates that a sign up page for jQuery.com is likely among them.
The official sign up for jQuery.com should be compared to the verification image shown on the jQuery sign up page and is viewable as a representation for the newest jQuery sign up we have a record available for.
Review and weigh a rating for this sign up page at jQuery.com if time permits.
One rating per person and session of the jQuery registration can be voted on.


text:
AICH:EHJ23FK2QIIDIKHOWAQXFCEXPSGQ2VS6
CRC32:D2474E47
eDonkey:36D84015C8359C08B82BBF0FA8A0BA2E
MD5:FBC1EA872A1C26F534DEC5DF821D13BF
SHA1:RBPNCLQUEHJ7F5QP26WDBYTAWURRDMGI
TTH:QYZLYJKLU6LMILBIO75CPW64SL4CPQHWHV4T65I
SHA256:7246A5D8DC31462B74003F5AE366CCDA34E7FD470F28C5FEFFE53EA610DABB2C Title: Inaugural speeches from the presidents of the United States: complete edition Volume:
Author(s): George Washington, John Adams, Thomas Jefferson, James Madison, James Monroe, John Quincy Adams, Andrew Jackson, Martin Van Buren, William Henry Harrison, James Knox Polk, Zachary Taylor, Franklin Pierce, James Buchanan, Abraham Lincoln, Ulysses S. Grant, Rutherford B. Hayes, James A. Garfield, Grover Cleveland, Benjamin Harrison, William McKinley, Theodore Roosevelt, William Howard Taft, Woodrow Wilson, Warren G. Harding, Calvin Coolidge, Herbert Hoover, Franklin D. Roosevelt, Harry S. Truman, Dwight D. Eisenhower, John F. Kennedy, Lyndon Baines Johnson, Richard Milhous Nixon, Jimmy Carter, Ronald Reagan, George Bush, Bill Clinton, George W. Bush, Barack Obama
Series: Periodical:
Publisher: e-artnow City: United States
Language: English Pages (biblio\tech): \0
ISBN: 978-80-268-7299-3, 8026872991 ID: 2626309
Size: 689 kB (705513 B) Extension: epub
Topic: Tags: Political oratory;Political oratory--United States; >>
Presidents;Presidents--United States;Speeches, addresses, etc;;Presidents -- United States -- Inaugural addresses;Political oratory -- United States;United States
Libgen Libgen.pw Gen.lib.rus.ec B-ok.org Bookfi.net Ed2k Torrent DC++ Torrent per 1000 books Gnutella
This carefully crafted ebook collection contains all inaugural addresses by United States Presidents, from Washington to Obama, from 1789 to 2013. The edition presents a comprehensive overview of American politics shaped by the words of newly elected presidents. It gives us a deep insight into the rise and development of the United States of America through ambitions and desires of American presidents presented to the public during the inaugural address. Discover the incredible aspirations and promises of our leaders, all the changes that happened through time in America, the challenges and different events which influenced the collective way of thinking and the expectations of people during different times. Read the words of men who changed the course of history, who made impact with their plans and aspirations. The inauguration of the President of the United States is a ceremony to mark the commencement of a new four-year term of a president of the United States. An inauguration ceremony takes place for each term of a president, even if the president continues in office for a second term. The "inaugural address" is a speech given during this ceremony which informs the people of his intentions as a leader.


Antiretroviral therapy (ART) is treatment of people infected with human immunodeficiency virus (HIV) using anti-HIV drugs. The standard treatment consists of a combination of at least three drugs (often called "highly active antiretroviral therapy" or HAART) that suppress HIV replication. Three drugs are used in order to reduce the likelihood of the virus developing resistance. ART has the potential both to reduce mortality and morbidity rates among HIV-infected people, and to improve their quality of life. Peer review refers to the work done during the screening of submitted manuscripts and funding applications. This process encourages authors to meet the accepted standards of their discipline and reduces the dissemination of irrelevant findings, unwarranted claims, unacceptable interpretations, and personal views. Publications that have not undergone peer review are likely to be regarded with suspicion by academic scholars and professionals.


Pearls Expectations and Prices on the Rise!
"Buying appeared vigorous and dealers felt it was a much stronger show than last year," says pearl expert Lois H. Berger reporting on pearl sales during the Tucson Gem Shows for The Guide's Gem Market News.
"In the Chinese freshwater cultured pearl [CFWCP] arena, there was a standout hot item called 'Petal Pearls,'" says Berger, G.G., NAJA, professional appraiser with Fuller and Associates, McLean, Va. She notes that their shape somewhat resembles a dogwood flower petal.
Coin CFWCP prices were up also. "For example—round circle strands gauging 9.5 x 10 mm were $75 per strand; 10 x 11 mm priced at $225 per strand; and 11 x 12 mm were priced at $200 per strand." Last year, for example, the 11 x 12 mm strands were priced at $150.
There was no shortage of Chinese pearls in Tucson. Sizes ranged from 1.8 x 2 mm to 15 x 16 mm, in off rounds to rounds, potato shapes, button shapes, semibaroques, ba-roques, and ovals.
Akoyas Mix It Up. "One dealer mentioned that close to harvest time the Chinese akoya are taken out of the Chinese warmer waters and transported to Japanese colder waters for the last three months of cultivation resulting in better quality," Berger says. It is believed that nacre is layered in a tighter configuration, producing higher luster, when akoyas are grown in colder temperatures, "Of course, Japan is the main processor of both Chinese and Japanese akoya cultured pearls," says Berger.
"I've been told that strands of both Chinese and Japanese akoya cultured pearls are mixed, especially in smaller sizes up to 8 mm," Berger adds. Berger was also told that the highest-quality strands, from 5 x 5.5 mm to 9 x 9.5 mm, use only Japanese akoya. Dealers we asked just shrugged their shoulders and said that they look only for quality, not origin.
South Seas. White South Sea round cultured pearls were not a big seller at this show, but the South Sea keshi baroque cultured pearls were popular and sold well, notes Berger. "Trends come and go, but I think the South Sea keshi cultured pearl popularity was unexpected," she says. She also notes that baroque keshi shapes make a fashion statement.
Berger says Indonesian farms are now cultivating a smaller-size first crop of round 6 to 8 mm pearls, and she notes that these pearls are reportedly in the water for a shorter period for more rapid production. Once these smaller pearls are harvested, producers implant a larger shell bead into that empty pearl sac. This yields a larger second-generation pearl of 9 to 14 mm.
Tahitian South Sea cultured pearls were a huge success, says Berger. Mixed strands were also popular. "I saw a metallic light-pastel strand that was outstanding," she says. The strand contained primarily Tahitians, with some Indonesian and Chinese freshwaters. Pearls measured 11.2 x 9 mm, oval, very high luster, very slight blemish, excellent match, and priced at $3,000.
The information in this report is intended to provide a cross section of what is available in the current pearl market. The grading methodology used by Berger for this report is the GIA pearl-grading system.
Special thanks to Lois Berger, Gina Latendresse and American Pearl Company, Marc Freeman and Freeman Pearl Company, Betty Sue King and King's Ransom, Jack Lynch and Sea Hunt Pearls, Fuji Voll and Pacific Pearls, Sonny Sethi and Tara & Sons Inc., Albert Tsai and Otimo International, Joseph Nakamura and Shogun Trading Company, David Ohlgisser and King Plutarco Inc., Sayoko Adachi and Adachi American Corp., Fran Mastaloni and Frank Mastoloni & Sons Inc., and Avi Raz and A&Z Pearls Inc.


text:
// Copyright 2010 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ------------------------------------------------------------------------

#include <ctype.h>  // for isspace()

#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#include <vector>

#include "engine/globals.h"
#include "public/commandlineflags.h"
#include "public/logging.h"

#include "utilities/sysutils.h"
#include "utilities/strutils.h"
#include "utilities/timeutils.h"

#include "engine/memory.h"
#include "engine/utils.h"
#include "engine/opcode.h"
#include "engine/map.h"
#include "engine/scope.h"
#include "engine/type.h"
#include "engine/node.h"
#include "engine/symboltable.h"
#include "engine/scanner.h"
#include "engine/proc.h"
#include "engine/error.h"

DEFINE_string(szl_includepath,
              "",
              "Comma-separated list of directories in which to search for "
              "include files if they are not found in the directory of the "
              "including file, and for program files if they are not found in "
              "the current directory.");

DEFINE_string(protocol_compiler,
              "/usr/local/bin/protoc",
              "file name of protocol-compiler binary");

DEFINE_string(protocol_compiler_plugin,
              "/usr/local/bin/protoc_gen_szl",
              "file name of protocol-compiler szl plugin binary");

DEFINE_string(protocol_compiler_temp,
              "/tmp",
              "temporary directory for protocol compiler output");

namespace sawzall {

// currently we do not report more then one error per line to
// reduce the number of spurious errors caused by a previous
// error - however, sometimes that masks a real problem and
// for debugging purposes it is useful to see all error msgs
DEFINE_bool(report_all_errors, false, "report all errors, even if on the same line");

const char* FileContents(Proc* proc, const char* name, string* contents);

// Returns a command that will run protocol-compiler.
// The return value is a freshly-malloced string, which the caller must free.
static string ProtocolCompilerCommand(szl_string file_name,
                                      const char* source_dir) {
  vector<string> parts;
  SplitStringAtCommas(FLAGS_szl_includepath, &parts);

  string command = FLAGS_protocol_compiler +
                   " --plugin=" + FLAGS_protocol_compiler_plugin +
                   " --szl_out=" + FLAGS_protocol_compiler_temp;
  if (source_dir != NULL) {
    command.append(" --proto_path=");
    command.append(source_dir);
  }
  for (int i = 0; i < parts.size(); i++) {
    if (!parts[i].empty()) {
      command.append(" --proto_path=");
      command.append(parts[i]);
    }
  }
  command.append(" ");
  command.append(file_name);
  return command;
}

// Look up a file name and make sure it exists.
// If it starts with /, must exist there.
// If it's in the current directory of the source, look there.
//   (If source_dir is NULL, check the current directory of the process.)
// If not, but it starts ./, return the original string and let caller complain
// If not, see if it can be found in an include directory.
// If not, return NULL
const char* Scanner::FindIncludeFile(Proc* proc, const char* file_name,
                                     const char* source_dir) {
  // rooted path must exist
  if (file_name[0] == '/')
    return file_name;

  // see if file exists in current directory
  const char* tmp;
  if (source_dir != NULL)
    tmp = proc->PrintString("%s/%s", source_dir, file_name);
  else
    tmp = file_name;
  if (access(tmp, R_OK) == 0)  // yes
    return tmp;

  // if it mentions ./ explicitly, don't use the path
  if (strncmp(file_name, "./", 2) == 0)
    return file_name;

  // see if it exists in supplied directory
  vector<string> parts;
  SplitStringAtCommas(FLAGS_szl_includepath, &parts);
  for (int i = 0; i < parts.size(); i++) {
    if (!parts[i].empty()) {
      tmp = proc->PrintString("%s/%s", parts[i].c_str(), file_name);
      if (access(tmp, R_OK) == 0)
        return tmp;
    }
  }
  return NULL;
}

// ------------------------------------------------------------------------------
// Support for keywords

// An alphabetically sorted array of Keyword entries
// mapping each keyword to its corresponding symbol.
// Note: The identifiers must appear in sorted order!

#define DEF(keyword, symbol) { keyword, "'" keyword "'", symbol},
struct Keyword {
  const char* ident_;
  const char* quoted_ident_;  // ident_ enclosed in '
  Symbol sym_;
};

static struct Keyword keywords_[] = {
  DEF("all", ALL)
  DEF("and", AND)
  DEF("array", ARRAY)
  DEF("break", BREAK)
  DEF("case", CASE)
  DEF("continue", CONTINUE)
  DEF("default", DEFAULT)
  DEF("do", DO)
  DEF("each", EACH)

  DEF("else", ELSE)
  DEF("emit", EMIT)
  DEF("file", FILE_)
  DEF("for", FOR)
  DEF("format", FORMAT)
  DEF("function", FUNCTION)
  DEF("if", IF)
  DEF("include", INCLUDE)
  DEF("job", JOB)  // SuperSawzall
  DEF("keyby", KEYBY)  // SuperSawzall
  DEF("map", MAP)
  DEF("merge", MERGE)  // SuperSawzall
  DEF("mill", MILL)  // reserved for future use

  DEF("millmerge", MILLMERGE)  // reserved for future use
  DEF("not", NOT)
  DEF("of", OF)
  DEF("or", OR)
  DEF("parsedmessage", PARSEDMESSAGE)
  DEF("pipeline", PIPELINE)  // SuperSawzall
  DEF("proc", PROC)
  DEF("proto", PROTO)
  DEF("rest", REST)
  DEF("return", RETURN)
  DEF("skip", SKIP)

  DEF("some", SOME)
  DEF("static", STATIC)
  DEF("submatch", SUBMATCH)
  DEF("switch", SWITCH)
  DEF("table", TABLE)
  DEF("type", TYPE)
  DEF("weight", WEIGHT)
  DEF("when", WHEN)
  DEF("while", WHILE)
};
#undef DEF

// Returns true if the keywords_ array is sorted,
// returns false otherwise. Used for debug assertion
// only.
#ifndef NDEBUG  // avoid gcc complaints in optimized mode
static bool KeywordsAreSorted() {
  const int n = ARRAYSIZE(keywords_);
  for (int i = 1; i < n; i++)
    if (strcmp(keywords_[i-1].ident_, keywords_[i].ident_) >= 0)
      return false;
  for (int i = 0; i < n; i++)
    if (keywords_[i].sym_ != FIRST_KEYWORD + i)
      return false;
  return true;
}
#endif

// Lookup ident and return the corresponding
// symbol. Uses E.W. Dijkstra's binary search
// from the book  "Methodik des Programmierens".
static Symbol LookupSymbol(const char* ident) {
  const int n = ARRAYSIZE(keywords_);
  assert(n > 0);
  int low = 0;
  int high = n;
  while (low + 1 != high) {
    int mid = (low + high) / 2;  // low < mid < high
    if (strcmp(ident, keywords_[mid].ident_) < 0)  // ident < keywords_[mid]
      high = mid;
    else  // keywords_[mid] <= ident
      low = mid;
  }
  // low + 1 == high
  if (strcmp(ident, keywords_[low].ident_) == 0)
    return keywords_[low].sym_;
  else
    return IDENT;
}

// Lookup sym and return the corresponding quoted
// keyword string. Returns NULL if not found.
static const char* LookupKeyword(Symbol sym) {
  if (sym >= FIRST_KEYWORD && sym <= LAST_KEYWORD)
    return keywords_[sym-FIRST_KEYWORD].quoted_ident_;
  else
    return NULL;  // not found
}

// ------------------------------------------------------------------------------
// Symbols

bool IsKeyword(const char* ident) {
  return LookupSymbol(ident) != IDENT;
}

const char* Symbol2String(Symbol sym) {
  switch (sym) {
    // errors
    case SCANEOF:
      return "EOF";
    case ILLEGAL:
      return "illegal symbol";

    // literals
    case BYTES:
      return "bytes literal";
    case CHAR:
      return "char literal";
    case INT:
      return "int literal";
    case FINGERPRINT:
      return "fingerprint literal";
    case TIME:
      return "time literal";
    case FLOAT:
      return "float literal";
    case STRING:
      return "string literal";
    case UINT:
      return "uint literal";
    case IDENT:
      return "identifier";

    // special char sequences
    case PLUS:
      return "'+'";
    case MINUS:
      return "'-'";
    case TIMES:
      return "'*'";
    case DIV:
      return "'/'";
    case MOD:
      return "'%'";
    case BITAND:
      return "'&'";
    case BITOR:
      return "'|'";
    case BITXOR:
      return "'^'";
    case SHL:
      return "'<<'";
    case SHR:
      return "'>>'";
    case EQL:
      return "'=='";
    case NEQ:
      return "'!='";
    case LSS:
      return "'<'";
    case LEQ:
      return "'<='";
    case GTR:
      return "'>'";
    case GEQ:
      return "'>='";
    case AT:
      return "'@'";
    case LPAREN:
      return "'('";
    case RPAREN:
      return "')'";
    case LBRACK:
      return "'['";
    case RBRACK:
      return "']'";
    case LBRACE:
      return "'{'";
    case RBRACE:
      return "'}'";
    case CONDAND:
      return "'&&'";
    case CONDOR:
      return "'||'";
    case BITNOT:
      return "'~'";
    case NOT:
      return "'not' or '!'";
    case PERIOD:
      return "'.'";
    case COMMA:
      return "','";
    case SEMICOLON:
      return "';'";
    case COLON:
      return "':'";
    case ASSIGN:
      return "'='";
    case LARROW:
      return "'<-'";
    case RARROW:
      return "'->'";
    case DOLLAR:
      return "'$'";
    case QUERY:
      return "'?'";
    case INC:
      return "'++'";
    case DEC:
      return "'--'";

    // keywords and unknown symbols
    default:
      { const char* keyword = LookupKeyword(sym);
        if (keyword != NULL)
          return keyword;
      }
      return "<unknown symbol>";
  }
  ShouldNotReachHere();
  return NULL;
}

// ------------------------------------------------------------------------------
// Implementation of Source

Source::Source(const SourceFile* files, int num_files, const char* src) {
  assert(num_files > 0);
  // Make a copy of the sources files array; array may be a local variable
  // in the caller.  We do require the actual strings to outlast the caller,
  // but that's a less onerous restriction.
  num_files_ = num_files;
  files_ = new SourceFile[num_files];  // explicitly deallocated
  memmove(const_cast<SourceFile*>(files_), files, num_files * sizeof files[0]);
  file_num_ = 0;
  src_ = NULL;
  file_name_ = NULL;
  scanner_ = NULL;
  error_count_ = 0;
  if (src != NULL) {
    file_ = NULL;
    src_ = src;
  } else {
    OpenNextFile();
  }
  line_ = 1;
  nbytes_ = 0;
}

Source::~Source() {
  if (file_ != NULL) {
    fclose(file_);
  }
  delete[] files_;
}

void Source::OpenNextFile() {
  struct stat s;
  file_name_ = NULL;
  file_ = fopen(file_name(), "r");
  if (file_ == NULL) {
    F.fprint(2, "could not open '%s': %r\n", file_name());
  } else if (fstat(fileno(file_), &s) == 0 && S_ISDIR(s.st_mode)) {
    F.fprint(2, "'%s': is a directory\n", file_name());
    fclose(file_);
    file_ = NULL;
  }
  if (file_ == NULL) {
    // fopen failed or file is a directory => continue
    // with /dev/null to get to an EOF immediately
    error_count_++;
    file_ = fopen("/dev/null",  "r");
    CHECK(file_ != NULL) << ": couldn't open /dev/null";
  }
  if (scanner_ != NULL)
    scanner_->RegisterFile(file_name());
  line_ = 1;
}

int Source::FileGetc() {
  assert(file_ != NULL);
  int c = fgetc(file_);
  if (c == EOF) {
    // Advance to next file, if possible
    if (file_num_ < num_files_ - 1) {
      fclose(file_);
      file_num_++;
      OpenNextFile();
      c = fgetc(file_);
    }
  }
  return c;
}

int Source::ReadByte() {
  if (src_ == NULL)
    return FileGetc();

  if (*src_ != '\0')
    return *src_++;
  return EOF;
}

void Source::UnloadBytes(int i) {
  int nleft = nbytes_ - i;
  assert(nleft >= 0);
  for (int j = 0; j < nleft; j++)
    bytes_[j] = bytes_[i++];
  nbytes_ = nleft;
}

int Source::ReadChar() {
  int c;
  if (nbytes_ == 0) {
    // usual case: nothing saved, one byte does it; easy out
    c = ReadByte();
    if (c == EOF || c < Runeself)
      return c;
    bytes_[nbytes_++] = c;
  }
  // rare case: we are in a multi-byte sequence
  while (!fullrune(bytes_, nbytes_)) {
    c = ReadByte();
    if (c == EOF)
      return Runeerror;
    bytes_[nbytes_++] = c;
    if (nbytes_ > UTFmax) {
      UnloadBytes(1);  // skip one byte; hope to recover
      return Runeerror;
    }
  }
  Rune r;
  UnloadBytes(chartorune(&r, bytes_));
  return r;
}

int Source::NextChar() {
  ch_ = ReadChar();
  // count lines
  if (ch_ == '\n')
    line_++;
  return ch_;
}

void Source::SetFileLine(const char* file, int line) {
  assert(file == NULL || strlen(file) > 0);
  assert(line > 0);
  if (file != NULL)
    file_name_ = file;
  line_ = line;
}

// ------------------------------------------------------------------------------
// Implementation of Scanner

void Scanner::negate_int_value() {
  if ((unsigned long long)int_value_ == 1ULL<<63)
    Error("overflow making '%lld' positive for subtraction", int_value());
  int_value_ = -int_value_;
}

void Scanner::negate_float_value() {
  float_value_ = -float_value_;
}

// prettyprint source line
int Scanner::SzlFileLineFmt(Fmt::State* f) {
  FileLine* fl = FMT_ARG(f, FileLine*);
  return F.fmtprint(f, "%s:%d", fl->file(), fl->line());
}

// prettyprint source line traceback
int Scanner::SzlSourceLineFmt(Fmt::State* f) {
  Scanner* s = FMT_ARG(f, Scanner*);
  int n = 0;
  for (int i = 0; i < s->include_level_; i++) {
    n += F.fmtprint(f, "%s:%d: ", s->states_[i]->file_name(), s->states_[i]->line());
  }
  n += F.fmtprint(f, "%s:%d:", s->file_name(), s->line());
  return n;
}

// print a symbol
int Scanner::SymbolFmt(Fmt::State* f) {
  Symbol s = (Symbol)FMT_ARG(f, int);
  return Fmt::fmtstrcpy(f, Symbol2String(s));
}

// Only dependable if sym is most recently seen.
const char* Scanner::PrintSymbol(Symbol sym) {
  switch (sym) {
    case ILLEGAL:
      return proc_->PrintString("illegal char '%C' (0x%x)", illegal_value(), illegal_value());
    case CHAR:
      return proc_->PrintString("%k", int_value());
    case INT:
      return proc_->PrintString("'%d'", int_value());
    case FINGERPRINT:
      return proc_->PrintString("'" SZL_FINGERPRINT_FMT "'", int_value());
    case TIME:
      return proc_->PrintString("'" SZL_TIME_FMT "'", int_value());
    case UINT:
      return proc_->PrintString("'" SZL_UINT_FMT "'", int_value());
    case STRING:
      return proc_->PrintString("%q", string_value());
    case FLOAT:
      return proc_->PrintString("'%s'", string_value());
    case IDENT:
      return proc_->PrintString("'%s'", string_value());
    case BYTES:
      // Likely to give poor results, so fall through
    default:
      return proc_->PrintString("%s", Symbol2String(sym));
  }
}

// helper functions

static bool is_letter(int ch) {
  return ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z') || ch == '_';
}

static bool is_digit(int ch) {
  return '0' <= ch && ch <= '9';
}

static int digit_val(int ch) {
  if ('0' <= ch && ch <= '9')
    return ch - '0';
  if ('a' <= ch && ch <= 'f')
    return ch - 'a' + 10;
  if ('A' <= ch && ch <= 'F')
    return ch - 'A' + 10;
  return 16;  // larger than any digit in any legal base
}

Scanner::Scanner(Proc* proc, Source* source)
  : source_(proc) {
#ifndef NDEBUG
  assert(KeywordsAreSorted());
#endif
  assert(source != NULL);
  proc_ = proc;
  include_level_ = 0;
  current_ = source;
  current_offset_ = 0;
  line_ = 1;
  offset_ = 0;
  allocated_len_ = 0;
  string_value_ = NULL;
  last_error_line_ = -1;  // reset to enable next error message
  current_->SetScanner(this);
  // but the first file is already open:
  RegisterFile(current_->file_name());
  next();  // sets ch_
}

Scanner::~Scanner() {
  while (include_level_ > 0)
    CloseInclude();
  delete[] string_value_;
}

void Scanner::Error(const char* fmt, ...) {
  va_list args;
  va_start(args, fmt);
  Errorv(false, fmt, &args);
  va_end(args);
}

void Scanner::Errorv(bool is_warning, const char* fmt, va_list* args) {
  // only report and count an error if it's on a different line
  if (FLAGS_report_all_errors || last_error_line_ != line()) {
    proc_->error()->Reportv(this, is_warning, fmt, args);
    if (!is_warning)
      last_error_line_ = line();
  }
}

int Scanner::error_count() const {
  return proc_->error()->count();
}

void Scanner::RegisterFile(const char* fname) {
  // The initial newline is a sentinel for searching backwards
  AddSourceString("\n#line ");
  AddSourceString(fname);
  AddSourceString(":1\n");
}

void Scanner::AddSourceChar(Rune ch) {
  current_offset_ = source_.length();
  char buf[UTFmax];
  int len = runetochar(buf, &ch);
  for (int i = 0; i < len; i++)
    source_.Append(buf[i]);
}

void Scanner::AddSourceString(const char* s) {
  while (*s != '\0')
    source_.Append(*s++);
}

void Scanner::EraseToEnd(int pos) {
  while (pos < source_.length())
    source_[pos++] = ' ';
}

void Scanner::EnsureStringSpace(int n) {
  if (string_len_ + n > allocated_len_) {
    // possibly not enough space left => grow
    // string_value_ (via amortized doubling) -
    char* old = string_value_;
    allocated_len_ *= 2;
    // note: one could get rid of this 'if' by
    // allocating a string_value in the constructor
    if (string_len_ + n > allocated_len_)
      allocated_len_ = string_len_ + n;
    string_value_ = new char[allocated_len_];  // explicitly deallocated
    memmove(string_value_, old, string_len_);
    delete[] old;
  }
  assert(string_len_ + n <= allocated_len_);
}

void Scanner::AddStringChar(Rune ch) {
  EnsureStringSpace(UTFmax);
  string_len_ += runetochar(&string_value_[string_len_], &ch);
}

void Scanner::AddBytesChar(int ch) {
  if (ch > 0xFF) {
    Error("character %k (\\u%.4x) is out of range for bytes literal", ch, ch);
    return;
  }
  EnsureStringSpace(1);
  string_value_[string_len_++] = ch;
}

void Scanner::next() {
  ch_ = current_->NextChar();
  // collect all chars so we have the original source code
  // (used for logging/security of all Sawzall programs)
  if (ch_ != EOF)
    AddSourceChar(ch_);
}

void Scanner::ScanLineDirective() {
  ScanIdent();  // always succeeds
  if (strcmp(string_value(), "line") != 0 || ch_ != ' ')
    return;
  next();  // consume ' '

  // parse an optional file name terminated by a colon
  StartString();
  while (ch_ != ':') {
    if (ch_ == '\n' || ch_ == EOF)
      return;
    // file names do not contain unicode, no need to call ScanUnicode()
    AddStringChar(ch_);
    next();
  }
  TerminateString();  // empty string if no file name provided
  const char* file = NULL;
  if (*string_value() != '\0')
    file = proc_->CopyString(string_value());
  next(); // consume ':'

  // parse line number
  int line = 0;
  while (isdigit(ch_)) {
    line = line * 10 + (ch_ - '0');
    if (line < 0)
      return;  // overflow
    next();
  }
  if (line == 0)
    return;  // either no digit found or 0 parsed

  // there must be nothing else after the directive
  // (note that we could also see EOF in which case
  // we probably don't want to accept the directive
  // since this file may have been included and the
  // directive would affect the file containing the
  // include)
  if (ch_ != '\n')
    return;

  // successfully parsed directive
  current_->SetFileLine(file, line);
}

void Scanner::SkipWhitespaceAndComments() {
  while (isspace(ch_) || ch_ == '#') {
    while (isspace(ch_))  // skip whitespace
      next();
    if (ch_ == '#') {  // skip comment
      next();  // consume '#'
      if (ch_ == 'l')  // look for #line directive
        ScanLineDirective();
      // skip rest of comment
      while (ch_ != '\n' && ch_ != EOF)
        next();
    }
  }
}

Rune Scanner::ScanEscape(int base, int num_digits, bool exact_count) {
  szl_int x = 0;
  int n = 0;  // number of correct digits found
  for (int d; n < num_digits && (d = digit_val(ch_)) < base; n++) {
    x = x * base + d;
    if (x > Runemax) {
      // only one error is printed per line, so this won't be noisy
      Error("unicode value too large (>0x%x) in character escape", Runemax);
    }
    next();
  }
  if (n == 0)  // this assumes num_digits > 0
    Error("digit in base %d expected; found %k", base, ch_);
  if (n < num_digits && exact_count)
    Error("found %d digits in %d-digit base %d character escape", n, num_digits, base);
  return x;
}

int Scanner::ScanDigits(int base, int max_digit) {
  for (int d; (d = digit_val(ch_)) < base; ) {
    AddStringChar(ch_);
    if (d > max_digit) max_digit = d;
    next();
  }
  if (max_digit < 0)
    Error("digit in base %d expected; found %k", base, ch_);
  return max_digit;
}

// assemble the characters for a number; convert the
// result after assembly.
Symbol Scanner::ScanNumber(bool negative, bool seen_period) {
  assert(is_digit(ch_));  // the first digit of the number or the fraction

  StartString();  // collect number chars as string

  int max_digit = -1;  // highest digit value seen so far
  if (seen_period) {
    // we have already seen a decimal point of the float
    AddStringChar('.');  // add it to the float string

  } else {
    // int or float
    int base = 10;
    int offset = 0;  // size of base-determining prefix, e.g. 2 for 0x.
    if (ch_ == '0') {
      // possibly a base specifier - look at next char
      AddStringChar(ch_);
      next();
      if (ch_ == 'b' || ch_ == 'B') {
        AddStringChar(ch_);
        next();
        base = 2;
        offset = 2;
      } else if ( ch_ == 'x' || ch_ == 'X') {
        AddStringChar(ch_);
        next();
        base = 16;
        offset = 2;
      } else {
        base = 8;
        max_digit = 0;
        offset = 1;
      }
    }

    // if first digit was 0, accept decimal for cases like 09.2e4
    max_digit = ScanDigits((base == 8 ? 10 : base), max_digit);

    if (base == 8 || base == 10) {
      // floating point is acceptable
      if (ch_ == '.' || ch_ == 'e' || ch_ == 'E') {
        // we have a float - consume '.' if any
        if (ch_ == '.') {
          AddStringChar(ch_);
          next();
          seen_period = true;
        }
        base = 10;
      } else if (max_digit >= base) {
        // we have an int, make sure octals are in range
        Error("illegal digit %d in octal literal", max_digit);
      }
    }
    if (!seen_period && (base != 10 || (ch_ != 'e' && ch_ != 'E'))) {
      TerminateString();
      const char* digits = string_value() + offset;
      errno = 0;  // for error handling below
      if (ch_ == 'P' || ch_ == 'p') {
        // fingerprint literal
        int_value_ = strtoull(digits, NULL, base);
        if (errno == ERANGE)
          Error("overflow in fingerprint literal %s%c", string_value(), ch_);
        if (negative)
          Error("fingerprint literal %s%c must be positive",
                string_value(), ch_);
        next();
        return FINGERPRINT;
      } else if (ch_ == 'T' || ch_ == 't') {
        // time literal
        int_value_ = strtoull(digits, NULL, base);
        if (errno == ERANGE)
          Error("overflow in time literal %s%c", string_value(), ch_);
        if (negative)
          Error("time literal %s%c must be positive", string_value(), ch_);
        next();
        return TIME;
      } else if (ch_ == 'U' || ch_ == 'u') {
        // uint literal
        int_value_ = strtoull(digits, NULL, base);
        if (errno == ERANGE)
          Error("overflow in uint literal %s%c", string_value(), ch_);
        if (negative)
          Error("uint literal %s%c must be positive", string_value(), ch_);
        next();
        return UINT;
      } else {
        // Integer literal.
        // The other integer cases must *not* have a '-' because they convert unsigned.
        // Converting and then negating causes overflow for largest negative integer,
        // so we put it back explicitly.  The 0x or 0b prefix is already processed.
        // This feels like too much work to squeeze out one special int, but so be it.
        if (negative) {
          // careful: -2^63 is representable but +2^63 is not, so cannot use strtoll then negate
          int_value_ = - strtoull(digits, NULL, base);  // unsigned!
          // values in [0,2^63) behave in the obvious way; result is non-positive and in range
          // 2^63 becomes -2^63 which is correct, non-positive and in range
          // values in (2^63,2^64) become positive and out of range
          // (negation maps them to unsigned (0,2^63); conversion to signed has no effect)
          if (errno == 0 && int_value_ > 0)
            errno = ERANGE;
        } else {
           int_value_ = strtoll(digits, NULL, base);
        }
       if (errno == ERANGE)
          Error("overflow in integer literal %s", string_value());
        return INT;
      }
    }
  }

  // we have a float and the decimal point, if any, has been absorbed.
  // absorb fractional part, if any
  ScanDigits(10, max_digit);
  if (ch_ == 'e' || ch_ == 'E') {
    AddStringChar(ch_);
    next();
    if (ch_ == '+' || ch_ == '-') {
      // scan sign
      AddStringChar(ch_);
      next();
    }
    ScanDigits(10, -1);  // minus sign (if any) still in the token
  }
  TerminateString();
  errno = 0;
  float_value_ = strtod(string_value(), NULL);
  // Catch underflow (ERANGE and value is zero) and overflow (ERANGE and
  // value is large) but ignore partial underflow (ERANGE and value is small).
  // Work around apparent bug in Ubuntu strtod - returns EDOM instead of ERANGE
  // in the underflow range [1.0e-324, 2.470e-324]
  if ((errno == ERANGE || errno == EDOM) &&
      (float_value_ == 0.0 || float_value_ > 1.0))
    Error("%serflow in floating-point literal %s",
      (float_value_ == 0.0)? "und" : "ov", string_value());
  else if (negative)
    float_value_ = -float_value_;
  return FLOAT;
}

void Scanner::ScanIdent() {
  assert(is_letter(ch_));
  StartString();
  do {
    AddStringChar(ch_);
    next();
  } while (is_letter(ch_) || is_digit(ch_));
  TerminateString();
}

// Keep in sync with utils/IsValidUnicode.
// This one is always called with a Rune value, never a szl_int.
Rune Scanner::ValidUnicode(Rune r) {
  if (r <= 0 || r > Runemax) {
    Error("unicode value 0x%x out of range", r);
    r = '?';  // avoid encoding trouble
  }
  if (0xD800 <= r && r <= 0xDFFF) {
    Error("unicode value 0x%x is a surrogate code point", r);
    r = '?';  // avoid encoding trouble
  }
  return r;
}

// Checks bytes but always operates on values from ScanEscape, which
// returns Runes.
Rune Scanner::ValidByte(Rune b) {
  if (b < 0 || b > 0xff) {
    Error("byte value 0x%x out of range", b);
    b = '?';  // avoid encoding trouble
  }
  return b;
}

Rune Scanner::ScanUnicode() {
  if (ch_ == '\\') {
    next();
    switch (ch_) {
      case 'a':
        next();
        return '\a';
      case 'b':
        next();
        return '\b';
      case 'f':
        next();
        return '\f';
      case 'n':
        next();
        return '\n';
      case 'r':
        next();
        return '\r';
      case 't':
        next();
        return '\t';
      case 'u':
        // hexadecimal escape - 4 digits
        next();
        return ValidUnicode(ScanEscape(16, 4, true));
      case 'U':
        // hexadecimal escape - 8 digits
        next();
        return ValidUnicode(ScanEscape(16, 8, true));
      case 'v':
        next();
        return '\v';
      case '0': case '1': case '2': case '3':
      case '4': case '5': case '6': case '7':
        // octal escape
        return ValidByte(ScanEscape(8, 3, false));
      case 'x':
        // hexadecimal escape
        next();
        return ValidByte(ScanEscape(16, 1000000 /* arbitrarily large */, false));
    }
  }
  // all other cases
  if (ch_ != EOF) {
    Rune ch = ch_;
    next();
    return ch;
  } else {
    // handle gracefully but report error
    Error("string or char not terminated");
    return 0;
  }
}

void Scanner::ScanChar() {
  assert(ch_ == '\'');
  next();
  if (ch_ == '\n' || ch_ == EOF)
    Error("unterminated character constant");
  else if (ch_ == '\'')
    Error("empty character constant");
  else
    int_value_ = ScanUnicode();

  if (ch_ == '\'')
    next();
  else
    Error("expected single quote, found %k", ch_);
}

// Does modify current_ when the terminating quote of the string
// is not followed by another character and EOF is encountered.
void Scanner::ScanString() {
  assert(ch_ == '"' || ch_ == '`');
  Rune quote = ch_;
  next();
  StartString();
  while (ch_ != quote) {
    if (ch_ == '\n' || ch_ == EOF) {
      Error("unterminated string");
      break;
    }
    if (quote == '"') {
      // interpret backslashes
      AddStringChar(ScanUnicode());
    } else {
      AddStringChar(ch_);
      next();
    }
  }
  TerminateString();
  if (ch_ == quote)
    next();
}

void Scanner::ScanByteString() {
  assert(ch_ == '"' || ch_ == '`');
  Rune quote = ch_;
  next();
  StartString();
  while (ch_ != quote) {
    if (ch_ == '\n' || ch_ == EOF) {
      Error("unterminated string");
      break;
    }
    if (quote == '"') {
      // interpret backslashes
      AddBytesChar(ScanUnicode());
    } else {
      AddBytesChar(ch_);
      next();
    }
  }
  if (ch_ == quote)
    next();
}

int Scanner::HexChar(int quote) {
  int value = digit_val(ch_);
  if (value < 16) {
    // valid char
    next();
  } else {
    // invalid char
    if (ch_ == quote)
      Error("hexadecimal bytes literal needs an even number of digits");
    else
      Error("invalid character %k in hexadecimal bytes literal");
    value = 0;
  }
  return value;
}

void Scanner::ScanHexByteString() {
  assert(ch_ == '"' || ch_ == '`');
  Rune quote = ch_;
  next();
  StartString();
  while (ch_ != quote) {
    if (ch_ == '\n' || ch_ == EOF) {
      Error("unterminated string");
      break;
    }
    // Need exactly two hex characters
    int c1 = HexChar(quote);
    int c2 = HexChar(quote);
    AddBytesChar((c1 << 4) | c2);
  }
  if (ch_ == quote)
    next();
}

void Scanner::ScanTime() {
  assert(ch_ == '"'|| ch_ == '`');
  ScanString();
  szl_time t;
  if (!date2uint64(string_value_, "", &t))
    Error("%q is not a legal time literal", string_value_);
  int_value_ = t;
}

bool Scanner::IsOpenInclude(const char* file_name, int include_level) {
  // If the include level is larger than the current include level, we
  // already closed the file and are back to some file in the including chain
  // and have possibly advanced to a different include branch that is shorter.
  if (include_level > include_level_)
    return false;

  // If the file's include level equals or greater than the current include
  // level, we are either in the current file or its children or we have already
  // closed it and advanced to a different include brach that is at least of the
  // same length. The name of the file at the include level will tell us.
  Source* src_at_include_level = NULL;
  if (include_level == include_level_)
    src_at_include_level = current_;
  else
    src_at_include_level = states_[include_level];
  // TODO: is it safe enough to use just the full file path?
  return (strcmp(src_at_include_level->file_name(), file_name) == 0);
}

// If generated_proto_source is NULL, this is a regular sawzall include file
// that should be read from file_name.
void Scanner::OpenInclude(const char* file_name,
                          const char* generated_proto_source) {
  // indicate include begin in raw source by inserting a line directive
  AddSourceString("\n#line ");
  AddSourceString(file_name);
  if (generated_proto_source != NULL)
    AddSourceString("_generated");
  AddSourceString(":1\n");
  if (proc_->AlreadyIncluded(file_name)) {
    AddSourceString("### ALREADY INCLUDED\n");
    if (ch_ != EOF) {
      // indicate include end in raw source by inserting a line directive,
      // unless including file is completely consumed (ch_ == EOF)
      AddSourceString(proc_->PrintString("\n#line %s:%d\n",
                                         current_->file_name(), current_->line()));
      // skip the newline character of the include line for correct line numbers
      if (ch_ != '\n')
        AddSourceChar(ch_);  // the last char was consumed before the include
    }
    return;
  }
  // switch to include file
  SourceFile include = { file_name, current_->source_dir() };
  Source* s = new Source(&include, 1, generated_proto_source);
  if (s->IsValid()) {
    if (include_level_ >= MAX_INCLUDE_LEVEL) {
      FatalError(
         "too many includes (perhaps due to recursion?), latest is %q",
         file_name);
    }
    states_[include_level_++] = current_;
    current_ = s;  // s will be deallocated in CloseInclude
    next();
  } else {
    delete s;
  }
  last_error_line_ = -1;  // reset to enable next error message
}

void Scanner::CloseInclude() {
  // switch back to including file
  assert(include_level_ > 0);
  delete current_;
  current_ = states_[--include_level_];
  ch_ = current_->LastChar();
  last_error_line_ = -1;  // reset to enable next error message
  if (ch_ != EOF) {
    // indicate include end in raw source by inserting a line directive, unless
    // including file is completely consumed (ch_ == EOF)
    AddSourceString(proc_->PrintString("\n#line %s:%d\n",
                                       current_->file_name(), current_->line()));
    // skip the newline character of the include line for correct line numbers
    if (ch_ != '\n')
      AddSourceChar(ch_);  // the last char was consumed before the include
  }
}

bool Scanner::IncludeFile(const char* incl_file_name) {
  const char* file_name = FindIncludeFile(proc_, incl_file_name,
                                        FileDir(proc_, current_->file_name()));
  if (file_name != NULL) {
    OpenInclude(file_name, NULL);
    return true;
  } else {
    Error("could not find include file %q: %r", incl_file_name);
    AddSourceChar(ch_);  // the last char was consumed before the include
    return false;
  }
}

// Scans the include clause, opens the included file, then advances to its
// first symbol. Returns this first symbol on success and the next symbol of
// the current file on error or in case of ignored multiple inclusion.
Symbol Scanner::ScanInclude() {
  assert(strcmp(string_value(), "include") == 0);
  int pos = source_.length() - 8;  // position of 'i' of 'include' in raw source
  assert(source_[pos] == 'i');
  SkipWhitespaceAndComments();

  bool file_specified = false;
  if (ch_ == '"' || ch_ == '`') {
    ScanString();
    if (*string_value() != '\0') {
      file_specified = true;
      const char* incl_name = proc_->CopyString(string_value());
      const char* file_type = strrchr(incl_name, '.');
      if (file_type != NULL && strcmp(file_type, ".proto") == 0)
        Error("including .proto file - use reserved word \"proto\" instead");
      EraseToEnd(pos);  // remove include from raw source
      IncludeFile(incl_name);
    }
  }

  if (!file_specified)
    Error("include expects a file name");

  return Scan();
}

// Scans the proto clause. If the next symbol is a filename string, uses
// protocol compiler to generate Sawzall code and opens the file, so the next
// call to Scan() can advance to its first symbol. If this is an ignored
// multiple inclusion or an error, the next call to Scan() will advance to the
// next symbol after the clause in the including file. Returns the include
// level of the proto file if opened, and of the current file otherwise.
//
// After the call, string_value() will be the proto filename from the clause
// (if any) and current_file_name() will be the full path of the file at the
// returned include level.
int Scanner::ScanProto() {
  assert(strcmp(string_value(), "proto") == 0);
  int pos = source_.length() - 6;  // position of 'p' of 'proto' in raw source
  assert(source_[pos] == 'p');
  SkipWhitespaceAndComments();

  bool file_specified = false;
  if (ch_ == '"' || ch_ == '`') {
    ScanString();
    if (*string_value() != '\0') {
      file_specified = true;
      const char* proto_name = proc_->CopyString(string_value());
      const char* file_name = FindIncludeFile(proc_, proto_name,
                                       FileDir(proc_, current_->file_name()));
      const char* slash = strchr(file_name, '/');
      const char* basename = (slash != NULL) ? slash+1 : file_name;
      const char* dot = strchr(basename, '.');
      int beforedot = (dot == NULL) ? strlen(basename) : (dot - basename);
      string output_name = FLAGS_protocol_compiler_temp + "/" +
        string(basename, beforedot) + ".szl";
      EraseToEnd(pos);  // remove proto invocation from raw source
      // indicate proto begin in raw source
      AddSourceString("\n### INSTANTIATE PROTO ");
      AddSourceString(proto_name);
      if (file_name != NULL) {
        string command = ProtocolCompilerCommand(file_name,
                                        FileDir(proc_, current_->file_name()));
        // Put the generated source code in a string allocated in this object.
        // It will be live for as long as needed by the Source object, then it may
        // be overwritten by a later include, and it will eventually be deleted
        // when the Scanner is.
        if (include_level_ + 1 >= MAX_INCLUDE_LEVEL) {
          FatalError(
              "too many includes (perhaps due to recursion?), latest is %q",
              file_name);
        }
        string* generated_proto_src =
            &generated_proto_sources_[include_level_ + 1];
        if (!RunCommand(command.c_str(), generated_proto_src)) {
          Error("Error compiling %q", proto_name);
        } else if (!generated_proto_src->empty()) {
          Error("Unexpected stdout from protocol compiler");
        } else {
          const char* error = FileContents(proc_, output_name.c_str(),
                                           generated_proto_src);
          if (error == NULL) {
            AddSourceString(proc_->PrintString("\n### COMMAND: %s",
                                               command.c_str()));
            OpenInclude(file_name, generated_proto_src->c_str());
          }
        }
      } else {
        Error("could not find proto file %q: %r", proto_name);
        AddSourceChar(ch_);  // the last char was consumed before the include
      }
    }
  }

  if (!file_specified)
    Error("proto expects a file name");

  return include_level_;
}

Symbol Scanner::IfNextThenElse(int ch, Symbol then, Symbol else_) {
  next();
  if (ch_ == ch) {
    next();
    return then;
  } else {
    return else_;
  }
}

Symbol Scanner::Scan() {
  last_end_offset_ = current_offset_;
  SkipWhitespaceAndComments();
  // the current file, line number  and offset is the location for the symbol
  file_name_ = current_->file_name();
  line_ = current_->line();
  offset_ = current_offset_;

  // a big switch over all chars
  switch (ch_) {
    // special chars (ASCII sorted)
    case '!':
      return IfNextThenElse('=', NEQ, NOT);
    case '"': case '`':
      ScanString();
      return STRING;
    case '$':
      next();
      return DOLLAR;
    case '%':
      next();
      return MOD;
    case '&':
      return IfNextThenElse('&', CONDAND, BITAND);
    case '\'':
      ScanChar();
      return CHAR;
    case '(':
      next();
      return LPAREN;
    case ')':
      next();
      return RPAREN;
    case '*':
      next();
      return TIMES;
    case '+':
      return IfNextThenElse('+', INC, PLUS);
    case ',':
      next();
      return COMMA;
    case '-':
      next();
      if (proc_->RecognizePipelineKeywords() && ch_ == '>') {
        next();
        return RARROW;
      }
      if (is_digit(ch_))
        return ScanNumber(true, false);
      if (ch_ == '-') {
        next();
        return DEC;
      }
      return MINUS;
    case '.':
      next();
      if (is_digit(ch_))
        return ScanNumber(false, true);
      return PERIOD;
    case '/':
      next();
      return DIV;
    case ':':
      next();
      return COLON;
    case ';':
      next();
      return SEMICOLON;
    case '<':
      next();
      if (ch_ == '-') {
        next();
        return LARROW;
      } else if (ch_ == '=') {
        next();
        return LEQ;
      } else if (ch_ == '<') {
        next();
        return SHL;
      }
      return LSS;
    case '=':
      return IfNextThenElse('=', EQL, ASSIGN);
    case '>':
      next();
      if (ch_ == '=') {
        next();
        return GEQ;
      } else if (ch_ == '>') {
        next();
        return SHR;
      }
      return GTR;
    case '@':
      next();
      return AT;
    case '?':
      next();
      return QUERY;
    case '[':
      next();
      return LBRACK;
    case ']':
      next();
      return RBRACK;
    case '^':
      next();
      return BITXOR;
    case '{':
      next();
      return LBRACE;
    case '|':
      return IfNextThenElse('|', CONDOR , BITOR );
    case '}':
      next();
      return RBRACE;
    case '~':
      next();
      return BITNOT;

    // digits
    case '0': case '1': case '2': case '3': case '4':
    case '5': case '6': case '7': case '8': case '9':
      return ScanNumber(false, false);

    // capital letters (don't start keywords)
    case 'A': case 'B': case 'C': case 'D': case 'E':
    case 'F': case 'G': case 'H': case 'I': case 'J':
    case 'K': case 'L': case 'M': case 'N': case 'O':
    case 'P': case 'Q': case 'R': case 'S': case 'T':
    case 'U': case 'V': case 'W': case 'X': case 'Y':
    case 'Z': case '_':
      ScanIdent();
      if (ch_ == '"' || ch_ == '`') {
        if(strcmp(string_value(), "T") == 0) {
          ScanTime();
          return TIME;
        }
        if(strcmp(string_value(), "B") == 0) {
          ScanByteString();
          return BYTES;
        }
        if(strcmp(string_value(), "X") == 0) {
          ScanHexByteString();
          return BYTES;
        }
      }
      return IDENT;

    // lower-case letters (may start keywords)
    case 'a': case 'b': case 'c': case 'd': case 'e':
    case 'f': case 'g': case 'h': case 'i': case 'j':
    case 'k': case 'l': case 'm': case 'n': case 'o':
    case 'p': case 'q': case 'r': case 's': case 't':
    case 'u': case 'v': case 'w': case 'x': case 'y':
    case 'z':
      { ScanIdent();
        Symbol sym = LookupSymbol(string_value());
        switch (sym) {
          case INCLUDE:
            // include clauses are scanned right away, invisible to the parser
            return ScanInclude();
          case PROTO:
            return PROTO;
          case JOB:
          case PIPELINE:
          case MERGE:
          case KEYBY:
            if (!proc_->RecognizePipelineKeywords())
              return IDENT;
            // fall through
          default:
            return sym;
        }
        ShouldNotReachHere();
      }

    case EOF:
      if (include_level_ > 0) {
        CloseInclude();
        return Scan();
      } else {
        return SCANEOF;
      }
  }

  // everything else is illegal. throw it away.
  illegal_value_ = ch_;
  next();  // make some progress
  return ILLEGAL;
}

int Scanner::FirstByteNextSymbol() const {
  // skip whitespace, comments and # directives
  int n = 0;
  int ch = current_->LastChar();
  while (ch != '\0') {
    if (isspace(ch)) {  // skip whitespace
      ch = current_->Lookahead(n++);
    } else if (ch == '#') {  // skip comment or directive
      while (ch != '\0' && ch != '\n')
        ch = current_->Lookahead(n++);
    } else {
      break;
    }
  }
  return ch;
}

}  // namespace sawzall

redpajama_set_name: RedPajamaGithub


I have a 1974 Chevelle wagon. Needs doors baaaad. Good ol Canadian salt. I have a line on a Malibu 4 door. Just wondering if anyone might know if the doors are the same before I make the lengthy drive to go look at em. Thanks all!
Not the proof positive you're looking for but, it's always been my understanding that they are the same. My Hollander Interchange Manual doesn't mention station wagons...so, I can't confirm 100%.
I apreciate the reply. There's another wrecking yard closer to me with a 4 door sedan. The doors are rotted right out but they're $40 each. Might just go grab one to see.
For the sake of others on this site with wagons or 4-drs, were you able to confirm that the doors were interchangeable?
Change the glass and good to go. If you were close to SW Iowa. I have my old set of doors from the SS350 wagon I had.
buy the doors and bolt them on. if glass doesn't line up change then.
73-77 4 door rear door windows curve to follow the roofline.
Sorry for the late UPDATE. Took a bit to be ready.
So, change the glass and bolt em on! It's just that easy!
The glass curves on the 4 door but is flat on the wagon.