This tag denotes challenges where parsing input is a large / the main part of the challenge.

learn more… | top users | synonyms

9
votes
10answers
267 views

Interpret loose ranges

Interpret loose ranges ListSharp is an interpreted programming language that has many features, one of those features is a 1 index based range creator that works like this: You define a range as (...
16
votes
14answers
1k views

Translate number pairs to guitar notes

A guitar fretboard diagram looks like this: 0 1 2 3 4 5 6 7 8 9 10 11 12 <- Fret number (0 means it's open) |-E--F--F#-G--G#-A--A#-B--C--C#-D--D#-E |-B--C--C#-D--D#-E--F--F#-G--G#-A--...
23
votes
20answers
2k views

Jimmy these arrays down

My coworker, Jimmy is kinda new to C/C++. He's also kind of a slow learner. Now, to be fair, his code always compiles, but he has some really sloppy habits. For example, everybody knows that you can ...
8
votes
2answers
307 views

The ten hundred most common words

This question is written because "Thing Explainer" is fun to read, and gave me an idea. Write "stuff that makes computer do things" that reads/takes a set of letters, numbers and things like this "#%|...
24
votes
30answers
3k views

Decode the chmod

Challenge Given a three digit octal permissions number, output the permissions that it grants. chmod On UNIX OSes file permissions are changed using the chmod command. There are few different ways ...
29
votes
20answers
3k views

Parse the comments out of my esoteric code

Earlier this week, we learned about how to format esoteric languages for commenting. Today, we're going to do the inverse of that. I need you to write a program or function that parses some well-...
11
votes
2answers
273 views

What's on the TV?

Challenge Write a program which, using the XML data from the site here, display the name of the programme which is currently showing on BBC 1. Information All times are given at London time (GMT+1 ...
5
votes
2answers
259 views

Number Plate Golf: Parsing

See Also: Recognition Introduction You've now been taken off the speed camera development team (let's face it, your code is nowhere near production code standards) and are now working on a program ...
17
votes
23answers
2k views

Quick Golf: The Gold Leader

Challenge Using data from the API here, output the names of the three countries with the most Olympic gold medals at the 2016 Rio Olympic Games (i.e. the first element of the returned list). For ...
52
votes
57answers
8k views

Count of “a”s and “b”s must be equal. Did you get it computer?

In the popular (and essential) computer science book, An Introduction to Formal Languages and Automata by Peter Linz, the following formal language is frequently stated: mainly because this ...
8
votes
3answers
264 views

Parse and Process the Key-Language Input

Let's parse and process Key-Language! Given the input of a sequence of keyboard keypresses and/or special keys, write a program, function, etc. that outputs the product when all the actions are ...
11
votes
26answers
1k views

What's the second non-repeating character?

Based on this question from Code Review Given a non-empty string of printable ASCII characters, output the second non-repeating character. For example, for input DEFD, output F. Input A single ...
13
votes
3answers
187 views

Convert an Expression to Panfix Notation

I was browsing esolangs, and chanced upon this language: https://github.com/catseye/Quylthulg. One interesting thing about this language, is that it doesn't use prefix, postfix, or infix, it uses all ...
25
votes
7answers
603 views

Decode a Microsoft MS-DOS 5.0 FAT directory entry

The Microsoft FAT file system has a directory table to represent which "files" are in which "folders" on the disk. For the time, these entries crammed a lot of information into a small amount of bits. ...
16
votes
11answers
622 views

Is my emoji dry?

This is my pet emoji, Billy: -_- Emojis don't like to be in the rain, so Billy is sad... Let's draw him an umbrella to make him feel better! /\ / \ / \ -_- This is good, he is entirely ...
2
votes
5answers
242 views

Is the gas lighter than air?

Air balloons need a gas that is lighter than air. However, hydrogen is flammable, while helium is not sustainable, so we need a replacement! You must write code that determines whether any given gas ...
13
votes
1answer
267 views

Parse a 1D language

Given a string containing only 0's 1's, 2's and brackets, output the grammar tree of the string. A 2 requires 2 arguments - one to the left and one to the right A 1 requires a single argument - to ...
12
votes
1answer
238 views

Convert ASCII box drawing into Unicode

I am shamelessly posting a request for something I would actually find useful. The task is to take an arbitrary ascii box drawing like this | +----+----+ | state A +---+ +---------+ | ...
2
votes
1answer
231 views

Find the last three words of each paragraph if they are shorter than 20 characters in total

Based on my SO question, but more specifically: Find a RegEx such that, given a text where paragraphs end with an empty line (or $ at the very end), match the up to twenty last characters of a ...
28
votes
8answers
2k views

Remove unnecessary parentheses

You are given a string composed with the characters 0123456789+*(). You can assume that string is always a valid mathematical expression. Your task is to remove the unnecessary parentheses, assuming ...
8
votes
15answers
1k views

Traveling on a flat Earth

Coordinates in the flat-Earth world consist of latitude (x) and longitude (y), which are integers in the range 0...9999. Much like Gaussian integers, but they are always written using this notation: ...
8
votes
9answers
336 views

Create a Boolean parser (continued)

Continuation of this challenge because the author is gone and the question is closed. What you need to do is create a Boolean parser. Boolean expressions, in case you haven't heard of them yet, ...
10
votes
3answers
206 views

How many 14ers did I climb?

In mountaineering terminology, a "14er" is any mountain with an elevation of 14 000 feet or more. However, there is another distinction. For a peak to count as a 14er, it must also have a "geographic ...
34
votes
24answers
3k views

Expand a C array

In the C programming language, arrays are defined like this: int foo[] = {4, 8, 15, 16, 23, 42}; //Foo implicitly has a size of 6 The size of the array is inferred from the initializing ...
13
votes
10answers
640 views

Determine the type of an input

The challenge is simple: Determine the type of an input, and output an identifier telling what type it is. "UI", Unsigned integer: 0, 1,34, 111111111111111111111111111111111111111111 "SI", Signed ...
25
votes
10answers
2k views

Parse a Quaternion

If you don't know already, a quaternion is basically a 4-part number. For the purposes of this challenge, it has a real component and three imaginary components. The imaginary components are ...
11
votes
2answers
349 views

Solve a Linear Equation

This challenge but with a better spec. Spec Your program will take a linear equation containing a single variable x and output the value of x. Input / Parsing The input will only contain numbers, ...
2
votes
1answer
235 views

Translate Java methods to fields

So, recently, I found myself reformatting my code for Vitsy to using anonymous class instances for commands rather than the normal method approach. For those who don't know, anonymous class instance ...
-5
votes
4answers
192 views

Solve an algebraic expression

The Challenge Your task is to create a program that can solve an algebraic equation. Input Input will consist of a String. The string will be an equality involving the variable x, and follows the ...
4
votes
3answers
88 views

Symbolic Differentiation of Composed Functions

Symbolic Differentiation 2: Back on the Chain Gang Task Write a program that takes in a certain sort of function from stdin and differentiates it with respect to x, using the chain rule.* The input ...
29
votes
23answers
3k views

Robot on a ladder

Background I have a ladder leaning on a wall, and a remote-controlled robot that can climb it. I can send three different commands to the robot: UP: the robot takes one step upwards. If it was on ...
40
votes
23answers
5k views

Translate oOo CODE

Given an input of a program written in oOo CODE, output the BF code that it represents. Here is a short description of how oOo CODE works: First, all non-alphabetic characters are removed (...
30
votes
20answers
1k views

Locate and rotate

The task This is a simple challenge. Your input is a single non-empty string, containing only digits 0123456789 and hashes #. It will contain exactly one run of digits, which encodes a nonnegative ...
10
votes
0answers
210 views

Resolve SAS macro variables

The SAS programming language is a clunky, archaic language dating back to 1966 that's still in use today. The original compiler was written in PL/I, and indeed much of the syntax derives from PL/I. ...
10
votes
4answers
1k views

What character is that HTML entity?

The goal is really simple. Receiving a string as input, parse all the HTML entities that correspond to the following characters (including their uppercase variants): áàãâäéèêëíìîïóòõôöúùûüýÿ ...
21
votes
8answers
482 views

Read a retro display

Art stolen from What size is the digit? 7-segment digits can be represented in ASCII using _| characters. Here are the digits 0-9: _ _ _ _ _ _ _ _ | | | _| _| |_| |_ |_ | |...
16
votes
1answer
73 views

Parse nested digit-lead strings

The task A string S is constructed with the following process: Start with S being the empty string. Insert at some position of S a string of the form ds, where d is a nonzero digit and s is a ...
14
votes
5answers
442 views

Translate a Glypho program

Given an input of any valid Glypho program, output its "human-readable" counterpart. Glypho is an interesting esolang idea: The instruction reference is given here. For each instruction, the ...
15
votes
4answers
1k views

What's the Language?

Recently, the PPCG design leaderboard has been having some trouble parsing answer html headers. In this challenge you'll be taking your own shot at parsing answer headers. Example Test Cases ...
6
votes
0answers
112 views

Implement FBLint

(FB, or Functional-Basic, as found here Interpret Functional-Basic) Task Implement a linting program for FB, similar to JSLint for JavaScript. Error types Invalid identifier Identifiers can only ...
18
votes
6answers
632 views

Parse RNA into codons

Introduction RNA is the less famous cousin of DNA. Its main purpose is to control the production of proteins in cells through a process called translation. In this challenge, your task is to ...
14
votes
4answers
423 views

Make a simple pretty-comment tool

Challenge: Some ascii-art is a pain to make, but makes code comments easier to read, especially when the code is dense. The challenge is to make a simple tool that converts comments to simple ascii-...
10
votes
2answers
219 views

The absent-minded linguist

Background Your friend, a linguist, has recorded and analyzed some simple conversation snippets in various languages. Being quite absent-minded, they have forgotten which language each snippet was in....
15
votes
3answers
376 views

Tokenize a Stack-Based language

I've been working on another stack-based golfing language called Stackgoat. In this challenge you'll be writing a Tokenizer for Stackgoat (or really any general stack-based languages). Examples "...
11
votes
6answers
332 views

Can a fraction be simplified using Anomalous Cancellation?

Anomalous Cancellation (from Wolfram Alpha): Anomalous cancellation is a "canceling" of digits of a and b in the numerator and denominator of a fraction a/b which results in a fraction equal to ...
7
votes
2answers
189 views

In a string or not?

Recently I've been having some trouble with the new TeaScript interpreter. The biggest problem is identifying whether or not a string contains any special characters. Challenge A special character ...
8
votes
8answers
392 views

Is it an integer, a string, or a decimal?

Your challenge is to determine whether the given input is an integer, a string, or a decimal. Rules A string is any input that is not an integer or a float An integer must contain only numeric ...
12
votes
3answers
305 views

Recreate the sentence

This challenge consists of two parts. The winner will be the solution with the lowest total byte count. The same language must be used for both challenges. Part 1: Write a function or program that ...
18
votes
1answer
334 views

Count common Game of Life patterns

The task here is to read from a Golly .rle or plaintext file (your choice) whose filename is provided (on STDIN or as a command line argument) and identify and count the common patterns in the grid ...
7
votes
0answers
201 views

Please parse this aLL1en language

Due to some unfortunate accident during coding you are now teleported and stranded on an alien planet. You really hope that the locals will be helpful and point to the general direction of how to get ...