Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.sixtyplus > #148475

Re: Impeachment

From mixed nuts <melopsitticus@undulatus.budgie>
Newsgroups alt.sixtyplus
Subject Re: Impeachment
Date 2019-12-11 14:05 -0500
Organization here and there
Message-ID <qsrem0$1k2p$1@gioia.aioe.org> (permalink)
References <fc3e2800-3be0-4df5-af2b-a62edb3651b5@googlegroups.com> <qspt0m$2i8$1@gioia.aioe.org> <4n12ved0k429p5bgk46d09s03cm90tsqkp@4ax.com> <qsr4tg$3bq$1@gioia.aioe.org> <1oifjr3.ajd6duf8frbxN%onion@anon.invalid>

Show all headers | View raw


On 12/11/2019 12:14 PM, Mr On!on wrote:
> mixed nuts <melopsitticus@undulatus.budgie> wrote:
> 
>> Shytshow Gerk has spoken (and very strongly, with great (absolute, in
>> the biblical sense) authorativity (his daddy was born in Germany and
>> deported - great genius wisdom).
>>
>   + + +   UNMATCHED PARENTHESISIS ERROR   + + +
>   
>            + + +   REDO FROM START   + + +

Will this work?

#include<stdio.h>

int brace,brack,paren;

void incomment();
void inquote(int c);
void search(int c);

int main(void)
{
     int c;

     extern int brace,brack,paren;

     while((c=getchar())!=EOF)
         if( c == '/')
             if((c=getchar())== '*')
                 incomment();
             else
                 search(c);
         else if( c == '\'' || c == '"')
             inquote(c);
         else
             search(c);

     if( brace < 0)
     {
         printf("Unmatched Braces\n");
         brace = 0;
     }
     else if( brack < 0)
     {
         printf("Unmatched brackets\n");
         brack = 0;
     }
     else if( paren < 0)
     {
         printf("Unmatched parenthesis\n");
         paren = 0;
     }

     if(brace > 0)
         printf("Unmatched braces\n");
     else if(brack > 0)
         printf("Unmatched brackets\n");
     else if(paren > 0)
         printf("Unmatched parenthesis\n");

     return 0;
}

void incomment()
{
     int c,d;

     c = getchar();
     d = getchar();

     while(c != '*' || d != '/')
     {
         c = d;
         d = getchar();
     }
}

void inquote(int c)
{
     int d;

     putchar(c);

     while((d=getchar())!=c)
         if( d == '\\')
             getchar();
}

void search(int c)
{
     extern int brace,brack,paren;

     if ( c == '{')
         --brace;
     else if ( c == '}')
         ++brace;
     else if( c == '(')
         --brack;
     else if( c == ')')
         ++brack;
     else if( c == '[')
         --paren;
     else if( c == ']')
         ++paren;
}


-- 
Grizzly H.

Back to alt.sixtyplus | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Impeachment Philippe Sinclair <pasnovember@gmail.com> - 2019-12-10 20:26 -0800
  Re: Impeachment mixed nuts <melopsitticus@undulatus.budgie> - 2019-12-10 23:57 -0500
    Re: Impeachment Philippe Sinclair <pasnovember@gmail.com> - 2019-12-10 23:54 -0800
    Re: Impeachment "Sir Hømer Hall,  Esq." <greghall@høme.fake> - 2019-12-11 10:17 -0500
      Re: Impeachment mixed nuts <melopsitticus@undulatus.budgie> - 2019-12-11 11:18 -0500
        Re: Impeachment onion@anon.invalid (Mr On!on) - 2019-12-11 17:14 +0000
          Re: Impeachment mixed nuts <melopsitticus@undulatus.budgie> - 2019-12-11 14:05 -0500
            Re: Impeachment onion@anon.invalid (Mr On!on) - 2019-12-11 20:02 +0000
  Re: Impeachment Philippe Sinclair <pasnovember@gmail.com> - 2019-12-11 00:04 -0800
    Re: Impeachment "Sir Hømer Hall,  Esq." <greghall@høme.fake> - 2019-12-11 10:22 -0500
  Re: Impeachment Philippe Sinclair <pasnovember@gmail.com> - 2019-12-11 00:59 -0800
    Re: Impeachment Steve <steve-usenet-posts@gmx.com> - 2019-12-11 11:12 +0000
      Re: Impeachment VictoriaB <prairiedove73505@privacy.com> - 2019-12-11 05:56 -0600
  Re: Impeachment "Sir Hømer Hall,  Esq." <greghall@høme.fake> - 2019-12-11 10:09 -0500

csiph-web