# Questions tagged [parsing]

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

178 questions
Filter by
Sorted by
Tagged with
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: <...
388 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, have ...
302 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 ...
4k 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 ...
694 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, ...
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 ...
1k 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 ...
592 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 ...
279 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 ...
122 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 ...
4k views

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 ...
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 (...
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 #. ...
499 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. ...
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): ...
505 views

Art stolen from What size is the digit? 7-segment digits can be represented in ASCII using _| characters. Here are the digits ...
198 views

The task A string S is constructed with the following process: Start with S being the empty string. Insert at some position of ...
536 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 ...
2k views

148 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 ...
752 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 ...
506 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-...
242 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....
449 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 <...
443 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 the ...
231 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 ...
422 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 ...
370 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 ...
491 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 ...
404 views

### Please parse this aLL1en language

Background 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 ...
1k views

### Santa's Decision

Santa's Decision: In this challenge, you will help Santa Claus decide whether somebody on their list has been naughty or nice, and subsequently get coal or ...
1k views

### Mixed Number to an Improper Fraction

Mixed Number to an Improper Fraction In this challenge you will be converting a mixed number to an improper fraction. Because improper fractions use fewer numbers, your code will need to be as short ...
803 views

### Symbolic Integration of Polynomials

Apply an indefinite integral to a given string. The only rules you will be using are defined as such: ∫cx^(n)dx = (c/(n+1))x^(n+1) + C, n ≠ -1 c, C, and n are all constants. Specifications: You ...
841 views

### Parse a two-dimensional syntax

Background Alice and Bob are creating a golfing language to win every single PPCG challenge. Alice wants to make a two-dimensional language, like ><>, but Bob prefers a prefix-infix syntax like in ...
496 views

### Convert between SI prefixes

Introduction The International System of Units is a system of measuring all around the world, except for a few countries including the US. The SI system (or metric system) is based on powers of ten, ...
7k views

### Well that's odd… no wait, that's even!

Preamble Integers are always either even or odd. Even integers are divisible by two, odd integers are not. When you add two integers you can infer whether the result will be even or odd based on ...
285 views

### Black Friday Queue Managment

Introduction You are the manager of the electronics department in a major retail store and the biggest sales day of the year is this Friday. To help manage the crowds, your store is implementing a ...
667 views

### Drawing Lewis Structures of Alkanes

I just had a lesson in school about alkanes and figured it would probably make for a great code golf challenge! Don't worry, it isn't as complicated as it may look! A Quick Rehash (Please Note: To ...
704 views

### Help me manage my time

I have been recently told to read an entire physics textbook by the new year (true story, unfortunately). I need your help to determine what chapters I should read each day. This is where you come in. ...
530 views

### DCSS morgue file parser

In this challenge, you need to parse morgue files from the roguelike game Dungeon Crawl Stone Soup and output it to STDOUT. What are these morgue files?? When you die, a text file is generated with ...
1k views

### De-Parenthesizing a String

Given a properly-parenthesized string as input, output a list of all nonempty substrings within matching parentheses (or outside of all parentheses), with nested parentheses removed. Each substring ...
4k views

I came across SVGCaptcha, and immediately knew it was a bad idea. I would like you to show just how bad an idea this is by extracting the validation code from the SVG images that code produces. An ...
155 views

### Write a Blade Templating Engine

Blade is a PHP templating engine. For this challenge, you only need to implement a modified version one feature -- text replacement. Challenge Description Given an input file and a map of keys to ...
584 views

### Reverse a regex

The Challenge Given a valid regex, output a regex that that matches the same set of strings, but reversed. The Task This challenge uses the most basic regex operations: ...
678 views

### Who has the most stars in The Nineteenth Byte?

Note: this challenge involves downloading and sifting through HTML webpages. If your language cannot handle this you might not want to participate in this challenge. Introduction There are always ...
14k views

### The World's Smallest Web Browser

Backstory: You enjoy your new programming job at a mega-multi-corporation. However, you aren't allowed to browse the web since your computer only has a CLI. They also run sweeps of all employees' ...
77 views

### Simple regex parser [duplicate]

Let's parse some regex. Not quite the regex you are used to, but the formal regular expressions taught in courses on automata theory. Wikipedia knows what I'm talking about. We have four operations. ...
1k views

### Help! My calculator broke! (Turn integer expression into calculator keystrokes)

Introduction Help! I accidentally dropped my TI-84 calculator out my window (don't ask how) and it broke. I have a math test tomorrow and the only calculator I can find is one with these buttons: <...